Browse Source

Fix wrong feed being removed when the remove-feed command used

shorten
benji7425 4 years ago
parent
commit
446292b057
  1. 4
      app/commands/remove-feed.js

4
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!");
Loading…
Cancel
Save