Fix
This commit is contained in:
parent
65b8880e24
commit
c570d9aa2c
1 changed files with 2 additions and 3 deletions
5
index.js
5
index.js
|
@ -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});
|
||||
var channel = int.options.getChannel("channel") || int.channel;
|
||||
var message = int.options.getString("message");
|
||||
int.deferReply();
|
||||
channel.send(message).then(msg => {
|
||||
int.editReply({content: "Successfully sent message.", ephemeral: true});
|
||||
int.reply({content: "Successfully sent message.", ephemeral: true});
|
||||
}).catch(e => {
|
||||
int.editReply({content: "An error has occured, check console."});
|
||||
int.reply({content: "An error has occured, check console."});
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue