mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
Remove tons of faulty awaits
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = class RinSayCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let rinContent = message.content.split(" ").slice(1).join(" ");
|
||||
await request
|
||||
return request
|
||||
.post(config.webhook)
|
||||
.send({
|
||||
content: rinContent
|
||||
|
||||
@@ -138,7 +138,7 @@ module.exports = class TranslateCommand extends commando.Command {
|
||||
return message.channel.send(":x: Error! Please keep translations below 200 characters!");
|
||||
}
|
||||
else {
|
||||
await translate(thingToTranslate, {
|
||||
return translate(thingToTranslate, {
|
||||
to: languageto
|
||||
}).then(res => {
|
||||
let languagefrom = res.from.language.iso.toLowerCase();
|
||||
|
||||
@@ -23,7 +23,7 @@ module.exports = class YodaCommand extends commando.Command {
|
||||
return message.channel.send(':x: Error! Nothing to translate!');
|
||||
}
|
||||
else {
|
||||
await request
|
||||
return request
|
||||
.get('https://yoda.p.mashape.com/yoda')
|
||||
.set({
|
||||
'X-Mashape-Key': config.mashapekey,
|
||||
|
||||
Reference in New Issue
Block a user