From c93c34f08c06b3544239c1620a464cc958fc677d Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 6 Sep 2020 22:22:29 +0200 Subject: [PATCH] Fix updating donators Signed-off-by: loicbersier --- commands/owner/addDonator.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/owner/addDonator.js b/commands/owner/addDonator.js index 58b23d7..8337561 100644 --- a/commands/owner/addDonator.js +++ b/commands/owner/addDonator.js @@ -65,7 +65,7 @@ class addDonatorCommand extends Command { message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] }) .then(messages => { let messageContent = messages.map(messages => messages.content); - if (messageContent === 'y' || messageContent === 'yes') { + if (messageContent[0] === 'y' || messageContent[0] === 'yes') { const body = {comment: userComment}; donator.update(body, {where: {userID: args.id}}); console.log(userComment); @@ -76,7 +76,8 @@ class addDonatorCommand extends Command { } } }) - .catch(() => { + .catch(err => { + console.error(err); return message.channel.send('Took too long to answer. didin\'t update anything.'); }); }