Make --remove work withtout having to provide the response args
This commit is contained in:
parent
11e50470cc
commit
a7f549dcd9
1 changed files with 9 additions and 8 deletions
|
@ -16,18 +16,15 @@ class TagCommand extends Command {
|
||||||
start: 'What word or sentence should trigger it?',
|
start: 'What word or sentence should trigger it?',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'response',
|
|
||||||
type: 'string',
|
|
||||||
match: 'rest',
|
|
||||||
prompt: {
|
|
||||||
start: 'What word or sentence should the response be?',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'remove',
|
id: 'remove',
|
||||||
match: 'flag',
|
match: 'flag',
|
||||||
flag: '--remove'
|
flag: '--remove'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'response',
|
||||||
|
type: 'string',
|
||||||
|
match: 'rest',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
channelRestriction: 'guild',
|
channelRestriction: 'guild',
|
||||||
|
@ -55,6 +52,10 @@ class TagCommand extends Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!args.response) {
|
||||||
|
return message.channel.send('Please provide the response for that tag');
|
||||||
|
}
|
||||||
|
|
||||||
if (!tag) {
|
if (!tag) {
|
||||||
const body = {trigger: args.trigger, response: args.response, ownerID: message.author.id, serverID: message.guild.id};
|
const body = {trigger: args.trigger, response: args.response, ownerID: message.author.id, serverID: message.guild.id};
|
||||||
await Tag.create(body);
|
await Tag.create(body);
|
||||||
|
|
Loading…
Reference in a new issue