diff --git a/backend/src/migrations/1650721595278-CreateTagAliasesTable.ts b/backend/src/migrations/1650721595278-CreateTagAliasesTable.ts new file mode 100644 index 00000000..4b69efc8 --- /dev/null +++ b/backend/src/migrations/1650721595278-CreateTagAliasesTable.ts @@ -0,0 +1,43 @@ +import { MigrationInterface, QueryRunner, Table } from "typeorm"; + +export class CreateTagAliasesTable1650721595278 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.createTable( + new Table({ + name: "tag_aliases", + columns: [ + { + name: "guild_id", + type: "bigint", + isPrimary: true, + }, + { + name: "alias", + type: "varchar", + length: "255", + isPrimary: true, + }, + { + name: "tag", + type: "varchar", + length: "255", + isPrimary: true, + }, + { + name: "user_id", + type: "bigint", + }, + { + name: "created_at", + type: "datetime", + default: "now()", + }, + ], + }), + ); + } + + public async down(queryRunner: QueryRunner): Promise { + queryRunner.dropTable("tag_aliases"); + } +} diff --git a/backend/src/plugins/Tags/commands/TagListAliasesCmd.ts b/backend/src/plugins/Tags/commands/TagListAliasesCmd.ts index 4d5482bc..b53a58fd 100644 --- a/backend/src/plugins/Tags/commands/TagListAliasesCmd.ts +++ b/backend/src/plugins/Tags/commands/TagListAliasesCmd.ts @@ -21,7 +21,7 @@ export const TagListAliasesCmd = tagsCmd({ aliasesArr = aliases.map((a) => a.alias); createChunkedMessage( msg.channel, - `Available aliases for tag \`${prefix + args.tag}\`: \`\`\`${aliasesArr.join(", ")}\`\`\``, + `Available aliases for tag \`${args.tag}\` (use with \`${prefix}alias\`: \`\`\`${aliasesArr.join(", ")}\`\`\``, ); return; },