forked from Supositware/Haha-Yes
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1008 B
JavaScript
29 lines
1008 B
JavaScript
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 }) {
|
|
if (slowmodeNumber < 120)
|
|
message.say("Slowmode can only be set to 120 seconds or lower!");
|
|
message.channel.setRateLimitPerUser(slowmodeNumber);
|
|
message.say(`Slowmode have been set to ${slowmodeNumber} seconds`);
|
|
}
|
|
}; |