Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 2aba9a2

Browse files
committed
Cooldown Updates
To prevent rate-llimits somehow.
1 parent 08b3663 commit 2aba9a2

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

commands/fetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports.run = async (bot, message, args) => {
2121
usedCommand.add(message.author.id);
2222
setTimeout(() => {
2323
usedCommand.delete(message.author.id);
24-
}, 300000);
24+
}, 3600000); //1 hour
2525
}
2626
}
2727

commands/help.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ module.exports.run = async (bot, message, args) => {
1515
.setDescription('')
1616
.setThumbnail('https://i.imgur.com/ypxq7B9.png')
1717
.addFields(
18-
{ name: config.prefix +'help', value: 'To show all of the available bot commands.\nCommand Cooldown: 3 seconds' },
19-
{ name: config.prefix +'fetch', value: 'To fetch/update all the data cache. \nCommand Cooldown: 5 Minutes' },
18+
{ name: config.prefix +'help', value: 'To show all of the available bot commands.\nCommand Cooldown: 3 second(s)' },
19+
{ name: config.prefix +'fetch', value: 'To fetch/update all the data cache. \nCommand Cooldown: 1 Hour(s)' },
2020

21-
{ name: config.prefix +'krole <role>', value: 'Kick all the users to the specific role. \nCommand Cooldown: 5 seconds' },
22-
{ name: config.prefix +'urole <role>', value: 'List all the users with the mentioned role. \nCommand Cooldown: 5 seconds' },
21+
{ name: config.prefix +'krole <role>', value: 'Kick all the users to the specific role. \nCommand Cooldown: 30 Minute(s)' },
22+
{ name: config.prefix +'urole <role>', value: 'List all the users with the mentioned role. \nCommand Cooldown: 15 Minute(s)' },
2323

24-
{ name: config.prefix +'knorole', value: 'Kick all the users without role. \nCommand Cooldown: 5 seconds' },
25-
{ name: config.prefix +'unorole', value: 'List all the users without role. \nCommand Cooldown: 5 seconds' },
24+
{ name: config.prefix +'knorole', value: 'Kick all the users without role. \nCommand Cooldown: 30 Minute(s)' },
25+
{ name: config.prefix +'unorole', value: 'List all the users without role. \nCommand Cooldown: 15 Minute(s)' },
26+
2627
{ name: config.prefix +'roles', value: 'List and count all the roles in the server. \nCommand Cooldown: 5 seconds' },
2728
{ name: config.prefix +'roleid <role>', value: 'Print the Role ID of the specific role. \nCommand Cooldown: 5 seconds' },
2829

2930
{ name: 'Important Note:', value: 'User must have Administrator Permission to be able to use this, You MUST "fetch" the data first to get the latest or updated data to this server to be able to kick or list the latest users and roles.' },
31+
{ name: 'Problem with Cooldowns?', value: 'To avoid being rate-limited and banned, I decided to set this time to prevent it some how and If you are not happy with it use the source code and modify it.' },
3032
{ name: 'Support the Developer:', value: 'https://ko-fi.com/mashwishi' }
3133
)
3234
.setTimestamp()

commands/knorole.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports.run = async (bot, message, args) => {
3737
await listMsg.react("👎");
3838
const filter = (reaction, user) => ["◀️", "▶️", "👍","👎"].includes(reaction.emoji.name) && user.id === message.author.id;
3939
const collector = listMsg.createReactionCollector(filter, {
40-
time: 120000
40+
time: 900000 //15 minutes
4141
});
4242
collector.on('collect', (reaction, user) => {
4343
reaction.emoji.reaction.users.remove(user.id);
@@ -136,7 +136,7 @@ module.exports.run = async (bot, message, args) => {
136136
usedCommand.add(message.author.id);
137137
setTimeout(() => {
138138
usedCommand.delete(message.author.id);
139-
}, 5000);
139+
}, 1800000); //30 minutes
140140
}
141141
}
142142

commands/krole.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports.run = async (bot, message, args) => {
4747
await listMsg.react("👎");
4848
const filter = (reaction, user) => ["◀️", "▶️", "👍","👎"].includes(reaction.emoji.name) && user.id === message.author.id;
4949
const collector = listMsg.createReactionCollector(filter, {
50-
time: 120000
50+
time: 900000 //15 minutes
5151
});
5252
collector.on('collect', (reaction, user) => {
5353
reaction.emoji.reaction.users.remove(user.id);
@@ -144,7 +144,7 @@ module.exports.run = async (bot, message, args) => {
144144
usedCommand.add(message.author.id);
145145
setTimeout(() => {
146146
usedCommand.delete(message.author.id);
147-
}, 5000);
147+
}, 1800000); //30 minutes
148148
}
149149
}
150150

commands/unorole.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports.run = async (bot, message, args) => {
3131
await listMsg.react("▶️");
3232
const filter = (reaction, user) => ["◀️", "▶️"].includes(reaction.emoji.name) && user.id === message.author.id;
3333
const collector = listMsg.createReactionCollector(filter, {
34-
time: 120000
34+
time: 900000 //15 minutes
3535
});
3636
collector.on('collect', (reaction, user) => {
3737
reaction.emoji.reaction.users.remove(user.id);
@@ -90,7 +90,7 @@ module.exports.run = async (bot, message, args) => {
9090
usedCommand.add(message.author.id);
9191
setTimeout(() => {
9292
usedCommand.delete(message.author.id);
93-
}, 5000);
93+
}, 900000);//15 minutes
9494
}
9595
}
9696

commands/urole.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports.run = async (bot, message, args) => {
4646
await listMsg.react("▶️");
4747
const filter = (reaction, user) => ["◀️", "▶️"].includes(reaction.emoji.name) && user.id === message.author.id;
4848
const collector = listMsg.createReactionCollector(filter, {
49-
time: 120000
49+
time: 900000 //15 minutes
5050
});
5151
collector.on('collect', (reaction, user) => {
5252
reaction.emoji.reaction.users.remove(user.id);
@@ -109,7 +109,7 @@ module.exports.run = async (bot, message, args) => {
109109
usedCommand.add(message.author.id);
110110
setTimeout(() => {
111111
usedCommand.delete(message.author.id);
112-
}, 5000);
112+
}, 900000);//15 minutes
113113
}
114114
}
115115

0 commit comments

Comments
 (0)