Added deferreply to lessen the bugs.

This commit is contained in:
2023-03-16 17:20:07 +01:00
parent 679dfdeb2e
commit 091d36c67f
7 changed files with 16 additions and 30 deletions

View File

@@ -11,16 +11,19 @@ module.exports = {
.setDescription('Send a message to a channel.')
.addStringOption(option =>
option
.setName('message')
.setDescription('The message to send.'))
.setName('message')
.setDescription('The message to send.'))
.addChannelOption(option =>
option
.setName('channel')
.setDescription('The channel to send the message to.'))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply();
const message = interaction.options.getString('message');
const channel = interaction.options.getChannel('channel');