mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
return and await
This commit is contained in:
@@ -24,12 +24,16 @@ module.exports = class SayCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let copycat = message.content.split(" ").slice(1).join(" ");
|
||||
if (!copycat) {
|
||||
message.channel.send(":x: Error! Nothing to say!");
|
||||
return message.channel.send(":x: Error! Nothing to say!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(copycat);
|
||||
if (message.channel.type === 'dm') return;
|
||||
message.delete();
|
||||
if (message.channel.type === 'dm') {
|
||||
return message.channel.send(copycat);
|
||||
}
|
||||
else {
|
||||
await message.delete();
|
||||
return message.channel.send(copycat);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user