forked from Supositware/Haha-Yes
trying to see why it dosent work on a sepcific server
This commit is contained in:
parent
cfc343e5dc
commit
8a3bb73af6
1 changed files with 24 additions and 19 deletions
|
@ -28,26 +28,31 @@ class PruneCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message,args) {
|
async exec(message,args) {
|
||||||
let slowmodeNumber = args.slowmodeNumber;
|
try {
|
||||||
let realtime = args.realtime;
|
let slowmodeNumber = args.slowmodeNumber;
|
||||||
|
let realtime = args.realtime;
|
||||||
if (slowmodeNumber > 120)
|
|
||||||
return message.channel.send('Slowmode can only be set to 120 seconds or lower!');
|
if (slowmodeNumber > 120)
|
||||||
|
return message.channel.send('Slowmode can only be set to 120 seconds or lower!');
|
||||||
message.channel.setRateLimitPerUser(slowmodeNumber);
|
|
||||||
|
message.channel.setRateLimitPerUser(slowmodeNumber);
|
||||||
if (realtime) {
|
|
||||||
let time = 60000 * realtime;
|
if (realtime) {
|
||||||
message.channel.send(`Slowmode have been set to ${slowmodeNumber} seconds and will end in ${realtime} minutes!`);
|
let time = 60000 * realtime;
|
||||||
setTimeout (function (){
|
message.channel.send(`Slowmode have been set to ${slowmodeNumber} seconds and will end in ${realtime} minutes!`);
|
||||||
message.channel.setRateLimitPerUser(0);
|
setTimeout (function (){
|
||||||
return message.channel.send('Slowmode is now disabled!');
|
message.channel.setRateLimitPerUser(0);
|
||||||
}, time);
|
return message.channel.send('Slowmode is now disabled!');
|
||||||
} else {
|
}, time);
|
||||||
if (slowmodeNumber == 0)
|
} else {
|
||||||
return message.channel.send('Slowmode have been disabled!');
|
if (slowmodeNumber == 0)
|
||||||
return message.channel.send(`Slowmode have been set to ${slowmodeNumber} seconds!`);
|
return message.channel.send('Slowmode have been disabled!');
|
||||||
|
return message.channel.send(`Slowmode have been set to ${slowmodeNumber} seconds!`);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue