mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 21:40:51 +02:00
return and await
This commit is contained in:
@@ -18,16 +18,16 @@ module.exports = class CowsayCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (!message.content.split(" ").slice(1).join(" ")) {
|
||||
message.channel.send(":x: Error! You entered nothing!");
|
||||
return message.channel.send(":x: Error! You entered nothing!");
|
||||
}
|
||||
else {
|
||||
let turnToCowsay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendCode(null, cowsay.say({
|
||||
return message.channel.sendCode(null, cowsay.say({
|
||||
text: turnToCowsay,
|
||||
e: "oO",
|
||||
T: "U "
|
||||
})).catch(error => {
|
||||
message.channel.send(':x: Error! Perhaps the content is too long?');
|
||||
return message.channel.send(':x: Error! Perhaps the content is too long?');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user