#```if this deferred this replied return
1 messages · Page 1 of 1 (latest)
const {MessageEmbed, Message, Client, CommandInteraction, Interaction} = require('discord.js')
module.exports = {
name: 'slowmode',
description: 'set the slowmode of the current channel',
UserPerms: ['MANAGE_MESSAGES'],
options: [
{
name: 'amount',
type: 'INTEGER',
description: 'amount of slowmode',
required: true
}
],
/**
* @param {Client} client
* @param {CommandInteraction} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const sm = message.options.getInteger('amount')
message.channel.setRateLimitPerUser(sm)
const embed = new MessageEmbed()
.setDescription(`Slowmode Set to \`${sm}\` seconds`)
.setColor('DARK_BUT_NOT_BLACK')
message.followUp({embeds: [embed],ephemeral: true})
}
}```