Fixiing send command

This commit is contained in:
2023-03-28 22:01:33 +02:00
parent 8b9de33abc
commit d15639b504

View File

@@ -22,18 +22,19 @@ module.exports = {
async execute(interaction) { async execute(interaction) {
await interaction.deferReply(); await interaction.deferReply({ ephemeral: true });
const message = interaction.options.getString('message'); const message = interaction.options.getString('message');
const channel = interaction.options.getChannel('channel'); const channel = interaction.options.getChannel('channel');
const embedColor = Number(color.replace("#", "0x"));
if (!message) { if (!message) {
interaction.reply({ content: 'Please provide a message to send.', ephemeral: true }) interaction.editReply({ content: 'Please provide a message to send.', ephemeral: true })
return return
} }
if (!channel) { if (!channel) {
interaction.reply({ content: 'Please provide a channel to send the message to.', ephemeral: true }) interaction.editReply({ content: 'Please provide a channel to send the message to.', ephemeral: true })
return return
} }
@@ -42,7 +43,7 @@ module.exports = {
{ {
title: interaction.guild.name, title: interaction.guild.name,
description: message, description: message,
color: color, color: embedColor,
thumbnail: { thumbnail: {
url: interaction.guild.iconURL({ dynamic: true }) url: interaction.guild.iconURL({ dynamic: true })
}, },