From 446292b057b831e31a51a81e87884c9ac085314f Mon Sep 17 00:00:00 2001 From: benji7425 Date: Sun, 12 Nov 2017 19:34:04 +0000 Subject: [PATCH] Fix wrong feed being removed when the remove-feed command used --- app/commands/remove-feed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/commands/remove-feed.js b/app/commands/remove-feed.js index c16990f..51633e0 100644 --- a/app/commands/remove-feed.js +++ b/app/commands/remove-feed.js @@ -9,9 +9,9 @@ module.exports = new Core.Command({ }); function invoke({ message, params, guildData, client }) { - const idx = guildData.feeds.findIndex(feed => feed.id === params[2]); + const idx = guildData.feeds.findIndex(feed => feed.id === params[0]); if (!Number.isInteger(idx)) - return Promise.reject("Can't find feed with id " + params[2]); + return Promise.reject("Can't find feed with id " + params[0]); guildData.feeds.splice(idx, 1); return Promise.resolve("Feed removed!");