diff --git a/backend/src/plugins/Tags.ts b/backend/src/plugins/Tags.ts index abcdbde9..812162dc 100644 --- a/backend/src/plugins/Tags.ts +++ b/backend/src/plugins/Tags.ts @@ -183,8 +183,20 @@ export class TagsPlugin extends ZeppelinPlugin { msg.channel.createMessage(successMessage(`Tag set! Use it with: \`${prefix}${args.tag}\``)); } - @d.command("tag", "") - async tagSourceCmd(msg: Message, args: { tag: string }) { + @d.command("tag", "", { + options: [ + { + name: "delete", + shortcut: "d", + isSwitch: true, + }, + ], + }) + async tagSourceCmd(msg: Message, args: { tag: string; delete?: boolean }) { + if (args.delete) { + return this.deleteTagCmd(msg, { tag: args.tag }); + } + const tag = await this.tags.find(args.tag); if (!tag) { msg.channel.createMessage(errorMessage("No tag with that name"));