mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Remove all useless async
This commit is contained in:
@@ -26,7 +26,7 @@ module.exports = class WikipediaCommand extends commando.Command {
|
||||
let description = response.body.query.pages[0].extract;
|
||||
let name = response.body.query.pages[0].title;
|
||||
if (!description) {
|
||||
message.channel.send(":x: Error! Entry Not Found!");
|
||||
return message.channel.send(":x: Error! Entry Not Found!");
|
||||
}
|
||||
else {
|
||||
description = description.substr(0, 1900);
|
||||
@@ -37,11 +37,11 @@ module.exports = class WikipediaCommand extends commando.Command {
|
||||
.setURL(`https://en.wikipedia.org/wiki/${thingToSearch}`)
|
||||
.setAuthor("Wikipedia", "https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/1122px-Wikipedia-logo-v2.svg.png")
|
||||
.setDescription(`${description} [Read the Rest Here](https://en.wikipedia.org/wiki/${thingToSearch})`);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Entry Not Found!");
|
||||
return message.channel.send(":x: Error! Entry Not Found!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user