From 0db2acb154c5532116e0deac9e465b345636d070 Mon Sep 17 00:00:00 2001 From: Mirasaki Date: Mon, 16 May 2022 11:23:56 +0200 Subject: [PATCH 1/3] adjust commandThrottling to be server specific --- src/listeners/interaction/applicationCommandInteraction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listeners/interaction/applicationCommandInteraction.js b/src/listeners/interaction/applicationCommandInteraction.js index 74a5f16..84bac07 100644 --- a/src/listeners/interaction/applicationCommandInteraction.js +++ b/src/listeners/interaction/applicationCommandInteraction.js @@ -83,7 +83,7 @@ module.exports = (client, interaction) => { // Throttle the command // permLevel 4 = Developer if (member.permLevel < 4) { - const onCooldown = throttleCommand(clientCmd, `${guild.id}${member.id}`); + const onCooldown = throttleCommand(clientCmd, `${guild.id}`); if (onCooldown !== false) { interaction.reply({ content: onCooldown.replace('{{user}}', `${member}`) From 076a59f2ccfe77383b0bdabb7d9c4935dc744bed Mon Sep 17 00:00:00 2001 From: Mirasaki Date: Mon, 16 May 2022 11:24:07 +0200 Subject: [PATCH 2/3] remove cftoools-sdk withCache call --- src/modules/cftClient.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/cftClient.js b/src/modules/cftClient.js index 288d0b5..bf215f8 100644 --- a/src/modules/cftClient.js +++ b/src/modules/cftClient.js @@ -9,7 +9,6 @@ const { // export our CFTools client as unnamed default module.exports = new cftSDK.CFToolsClientBuilder() - .withCache() .withServerApiId(CFTOOLS_SERVER_API_ID) .withCredentials(CFTOOLS_API_APPLICATION_ID, CFTOOLS_API_SECRET) .build(); From 8c3b75b03633dffb41893127b8cf8acc818e432f Mon Sep 17 00:00:00 2001 From: Mirasaki Date: Mon, 16 May 2022 11:24:46 +0200 Subject: [PATCH 3/3] adjust leaderboard command cooldown to be compliant with API cooldowns --- src/commands/dayz/leaderboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/dayz/leaderboard.js b/src/commands/dayz/leaderboard.js index 683d97b..cfe5c93 100644 --- a/src/commands/dayz/leaderboard.js +++ b/src/commands/dayz/leaderboard.js @@ -64,8 +64,8 @@ module.exports = { // Setting a cooldown to avoid abuse // Allowed 2 times every 10 seconds per user cooldown: { - usages: 2, - duration: 10 + usages: 7, + duration: 60 } },