Fix
This commit is contained in:
parent
65b8880e24
commit
c570d9aa2c
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});
|
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue