Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #13 from Mirasaki/dev
Browse files Browse the repository at this point in the history
adjust command throttling/cooldown
  • Loading branch information
Mirasaki authored May 16, 2022
2 parents e5906af + 8c3b75b commit 1f3e53a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/commands/dayz/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},

Expand Down
2 changes: 1 addition & 1 deletion src/listeners/interaction/applicationCommandInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down
1 change: 0 additions & 1 deletion src/modules/cftClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit 1f3e53a

Please sign in to comment.