mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
More Formatting Woot
This commit is contained in:
@@ -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!');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user