From 9cb90b3d1d2afed90517a1d1a6783c9f3c1bcdca Mon Sep 17 00:00:00 2001 From: Faith Date: Fri, 12 May 2017 12:30:39 -0400 Subject: [PATCH 1/2] remove duplicate code --- classes/argResolver.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/classes/argResolver.js b/classes/argResolver.js index 5c64ae01..5b0bfb76 100644 --- a/classes/argResolver.js +++ b/classes/argResolver.js @@ -13,15 +13,6 @@ module.exports = class ArgResolver { async msg(arg, currentUsage, possible, repeat, msg) { if (/^\d+$/.test(arg)) { - if (this.client.config.selfbot) { - const mes = await msg.channel.fetchMessages({ around: arg }).catch(() => { - if (currentUsage.type === "optional" && !repeat) { - return null; - } - throw `${currentUsage.possibles[possible].name} must be a valid message id.`; - }); - return mes.filter(ele => ele.id === arg).first(); - } const mes = await msg.channel.fetchMessage(arg).catch(() => { if (currentUsage.type === "optional" && !repeat) { return null; From c2e9298b37d958563174f674fd5f912926a2081d Mon Sep 17 00:00:00 2001 From: Faith Date: Fri, 12 May 2017 12:31:35 -0400 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0cd2ddb..a24724b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Command Cooldowns are now available through a new inhibitor/finalizer combo. Simply set command.conf.cooldown to an integer in seconds to put a cooldown on that command. ### Changed +- Changed fetchMessages to fetchMessage (backend change) - Backend is now class based. Users main files will need to be updated. The interface is the same as creating a discord.js client, only using komada, and with komada config. No more use of start, but client.login(token) is needed now. - Usage will no longer be calculated everytime a command is run, but instead stored in command.usage. - Usage has been refactored into a ParsedUsage class, and an argResolver class. (internal) @@ -29,7 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Use Discord.Permissions to generate and keep cached an implied permissions object, instead of generating a new object every time a command is run. ### Fixed -- +- ### Removed - generateInvite.js core function in favor of the Discord.JS generateInvite. @@ -377,4 +378,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/). [0.12.4]: https://github.com/dirigeants/komada/compare/0.12.0...0.12.4 [0.18.0]: https://github.com/dirigeants/komada/compare/0.12.4...0.18 [0.18.1]: https://github.com/dirigeants/komada/compare/0.12.4...0.18.1 -[0.19.0]: https://github.com/dirigeants/komada/compare/0.18.1...0.19.0 \ No newline at end of file +[0.19.0]: https://github.com/dirigeants/komada/compare/0.18.1...0.19.0