From cbe2d46f909e17f3ee1d56759c031a45a9193b19 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 11 Aug 2019 19:31:51 +0200 Subject: [PATCH] fix for updating tag --- commands/admin/tag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/admin/tag.js b/commands/admin/tag.js index 15f6687..34bf77f 100644 --- a/commands/admin/tag.js +++ b/commands/admin/tag.js @@ -45,8 +45,8 @@ class TagCommand extends Command { const filter = m => m.content && m.author.id == message.author.id; message.channel.awaitMessages(filter, {time: 5000, max: 1, errors: ['time'] }) .then(async messages => { - let messageContent = messages.map(messages => messages.content); - if (messageContent.tolowerCase() == 'y' || messageContent.tolowerCase() == 'yes') { + let messageContent = messages.map(messages => messages.content.tolowerCase()); + if (messageContent == 'y' || messageContent == '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}`);