This commit is contained in:
Ecolipsy 2021-12-02 20:59:51 +01:00
parent 65b8880e24
commit c570d9aa2c

View file

@ -139,11 +139,10 @@ client.on("interactionCreate", (int) => {
if(!allowed.includes(int.user.id)) return int.reply({content: "You don't have permissions to use this command.", ephemeral: true}); if(!allowed.includes(int.user.id)) return int.reply({content: "You don't have permissions to use this command.", ephemeral: true});
var channel = int.options.getChannel("channel") || int.channel; var channel = int.options.getChannel("channel") || int.channel;
var message = int.options.getString("message"); var message = int.options.getString("message");
int.deferReply();
channel.send(message).then(msg => { channel.send(message).then(msg => {
int.editReply({content: "Successfully sent message.", ephemeral: true}); int.reply({content: "Successfully sent message.", ephemeral: true});
}).catch(e => { }).catch(e => {
int.editReply({content: "An error has occured, check console."}); int.reply({content: "An error has occured, check console."});
console.log(e); console.log(e);
}); });
} }