toLowerCase()

This commit is contained in:
loicbersier 2019-07-20 22:33:41 +02:00
parent 1a859350ce
commit 92204910f8

View file

@ -46,7 +46,7 @@ class TagCommand extends Command {
message.channel.awaitMessages(filter, {time: 5000, max: 1, errors: ['time'] })
.then(async messages => {
let messageContent = messages.map(messages => messages.content);
if (messageContent == 'y' || messageContent == 'yes') {
if (messageContent.tolowerCase() == 'y' || messageContent.tolowerCase() == 'yes') {
const body = {trigger: args.trigger, response: args.response, ownerID: message.author.id, serverID: message.guild.id};
await Tag.update(body, {where: {trigger: args.trigger, serverID: message.guild.id}});
return message.channel.send(`tag have been set to ${args.trigger} : ${args.response}`);