forked from Supositware/Haha-Yes
Add slowmode
This commit is contained in:
parent
0385b17115
commit
1b88c08398
1 changed files with 26 additions and 0 deletions
26
commands/admin/slowmode.js
Normal file
26
commands/admin/slowmode.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class CustomResponseCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'slowmode',
|
||||
aliases: ['slow'],
|
||||
group: 'admin',
|
||||
memberName: 'slowmode',
|
||||
description: `Custom auto response`,
|
||||
userPermissions: ['MANAGE_CHANNELS'],
|
||||
clientPermissions: ['MANAGE_CHANNELS'],
|
||||
args: [
|
||||
{
|
||||
key: 'slowmodeNumber',
|
||||
prompt: 'How many seconds should the slowmode be? ( 0 to remove it )',
|
||||
type: 'integer',
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, { slowmodeNumber }) {
|
||||
message.channel.setRateLimitPerUser(slowmodeNumber);
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue