mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
!tag_delete -> !tag delete
This commit is contained in:
parent
69fccbc2d8
commit
c8bc478126
1 changed files with 10 additions and 10 deletions
|
@ -32,16 +32,7 @@ export class TagsPlugin extends Plugin {
|
||||||
this.tags = GuildTags.getInstance(this.guildId);
|
this.tags = GuildTags.getInstance(this.guildId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@d.command("tag", "<tag:string> <body:string$>")
|
@d.command("tag delete", "<tag:string>")
|
||||||
@d.permission("create")
|
|
||||||
async tagCmd(msg: Message, args: { tag: string; body: string }) {
|
|
||||||
await this.tags.createOrUpdate(args.tag, args.body, msg.author.id);
|
|
||||||
|
|
||||||
const prefix = this.configValue("prefix");
|
|
||||||
msg.channel.createMessage(successMessage(`Tag set! Use it with: \`${prefix}${args.tag}\``));
|
|
||||||
}
|
|
||||||
|
|
||||||
@d.command("tag_delete", "<tag:string>")
|
|
||||||
@d.permission("create")
|
@d.permission("create")
|
||||||
async deleteTagCmd(msg: Message, args: { tag: string }) {
|
async deleteTagCmd(msg: Message, args: { tag: string }) {
|
||||||
const tag = await this.tags.find(args.tag);
|
const tag = await this.tags.find(args.tag);
|
||||||
|
@ -54,6 +45,15 @@ export class TagsPlugin extends Plugin {
|
||||||
msg.channel.createMessage(successMessage("Tag deleted!"));
|
msg.channel.createMessage(successMessage("Tag deleted!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@d.command("tag", "<tag:string> <body:string$>")
|
||||||
|
@d.permission("create")
|
||||||
|
async tagCmd(msg: Message, args: { tag: string; body: string }) {
|
||||||
|
await this.tags.createOrUpdate(args.tag, args.body, msg.author.id);
|
||||||
|
|
||||||
|
const prefix = this.configValue("prefix");
|
||||||
|
msg.channel.createMessage(successMessage(`Tag set! Use it with: \`${prefix}${args.tag}\``));
|
||||||
|
}
|
||||||
|
|
||||||
@d.event("messageCreate")
|
@d.event("messageCreate")
|
||||||
@d.permission("use")
|
@d.permission("use")
|
||||||
async onMessageCreate(msg: Message) {
|
async onMessageCreate(msg: Message) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue