More Formatting Woot

This commit is contained in:
Daniel Odendahl Jr
2017-03-23 02:02:42 +00:00
parent 40a4af36c4
commit 3b007758aa
38 changed files with 51 additions and 43 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ module.exports = class DefineCommand extends commando.Command {
href = querystring.parse(href.replace('/url?', ''));
msg.edit(href.q);
}).catch(function(err) {
message.channel.send(':x: Error! No Results Found!');
msg.edit(':x: Error! No Results Found!');
});
});
}
+1 -1
View File
@@ -29,7 +29,7 @@ module.exports = class IMDBCommand extends commando.Command {
name: queryMovie
}, (err, response) => {
movie = response;
if (movie === undefined) {
if (!movie) {
message.channel.send(":x: Error! Movie not found!");
}
else {
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class OsuCommand extends commando.Command {
type: 'string'
})
.then(function(response) {
if (response.body[0] === undefined) {
if (!response.body[0]) {
message.channel.send(":x: Error! User not found!");
}
else {
+3 -3
View File
@@ -25,13 +25,13 @@ module.exports = class UrbanDictionary extends commando.Command {
console.log("[Command] " + message.content);
let wordToDefine = message.content.split(" ").slice(1).join(" ");
urban(wordToDefine).first(function(response) {
if (response === undefined) {
if (!response) {
message.channel.send(":x: Error! Word not found!");
}
else if (response.definition === '') {
else if (!response.definition) {
message.channel.send(":x: Error! Word has no definition!");
}
else if (response.example !== '') {
else if (response.example) {
const embed = new Discord.RichEmbed()
.setColor(0x32a8f0)
.setAuthor('Urban Dictionary', 'http://a1.mzstatic.com/eu/r30/Purple71/v4/66/54/68/6654683f-cacd-4a55-1784-f14257f77874/icon175x175.png')
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports = class WikipediaCommand extends commando.Command {
let description = response.body.query.pages[0].extract;
let name = response.body.query.pages[0].title;
thingToSearch = thingToSearch.split(")").join("%29");
if (description === undefined) {
if (!description) {
message.channel.send(":x: Error! Entry Not Found!");
}
else {
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class YouTubeCommand extends commando.Command {
key: config.youtubekey
})
.then(function(response) {
if (response.body.items[0].snippet === undefined) {
if (!response.body.items[0].snippet) {
message.channel.send(':x: Error! No Video Found!');
}
else {