Remove all useless async

This commit is contained in:
Daniel Odendahl Jr
2017-03-24 12:16:58 +00:00
parent 33b7d18d54
commit 0ce7eb3ee1
95 changed files with 287 additions and 287 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ module.exports = class YouTubeCommand extends commando.Command {
key: config.youtubekey
});
if (!response.body.items[0].snippet) {
message.channel.send(':x: Error! No Video Found!');
return message.channel.send(':x: Error! No Video Found!');
}
else {
const embed = new Discord.RichEmbed()
@@ -44,11 +44,11 @@ module.exports = class YouTubeCommand extends commando.Command {
.setAuthor(`YouTube - ${response.body.items[0].snippet.channelTitle}`, 'https://cdn3.iconfinder.com/data/icons/social-icons-5/607/YouTube_Play.png')
.setURL(`https://www.youtube.com/watch?v=${response.body.items[0].id.videoId}`)
.setThumbnail(response.body.items[0].snippet.thumbnails.default.url);
message.channel.sendEmbed(embed);
return message.channel.sendEmbed(embed);
}
}
catch (err) {
message.channel.send(":x: Error! An error has occurred! Try again later! (If this continues to occur, the daily quota may have been reached).");
return message.channel.send(":x: Error! An error has occurred! Try again later! (If this continues to occur, the daily quota may have been reached).");
}
}
};