Bug Fixes

This commit is contained in:
Daniel Odendahl Jr
2017-03-30 21:05:26 +00:00
parent 34cbf278df
commit eff2025533
4 changed files with 11 additions and 31 deletions
+4 -14
View File
@@ -33,32 +33,22 @@ module.exports = class TypingGameCommand extends commando.Command {
let randomSentence = ['The quick brown fox jumps over the lazy dog.', 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.', 'How razorback-jumping frogs can level six piqued gymnasts!', 'Amazingly few discotheques provide jukeboxes.']; let randomSentence = ['The quick brown fox jumps over the lazy dog.', 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.', 'How razorback-jumping frogs can level six piqued gymnasts!', 'Amazingly few discotheques provide jukeboxes.'];
randomSentence = randomSentence[Math.floor(Math.random() * randomSentence.length)]; randomSentence = randomSentence[Math.floor(Math.random() * randomSentence.length)];
let time; let time;
switch (level) {
case "easy":
time = 25000;
break;
case "medium":
time = 20000;
break;
case "hard":
time = 15000;
break;
case "extreme":
time = 10000;
break;
}
let levelWord; let levelWord;
switch (level) { switch (level) {
case "easy": case "easy":
time = 25000;
levelWord = "twenty-five"; levelWord = "twenty-five";
break; break;
case "medium": case "medium":
time = 20000;
levelWord = "twenty"; levelWord = "twenty";
break; break;
case "hard": case "hard":
time = 15000;
levelWord = "fifteen"; levelWord = "fifteen";
break; break;
case "extreme": case "extreme":
time = 10000;
levelWord = "ten"; levelWord = "ten";
break; break;
} }
+2 -2
View File
@@ -16,7 +16,7 @@ module.exports = class UnbanCommand extends commando.Command {
args: [{ args: [{
key: 'memberID', key: 'memberID',
prompt: 'What member do you want to unban? Please enter the ID of the user.', prompt: 'What member do you want to unban? Please enter the ID of the user.',
type: 'integer', type: 'string',
validate: userID => { validate: userID => {
if (userID.length === 18) { if (userID.length === 18) {
return true; return true;
@@ -55,7 +55,7 @@ module.exports = class UnbanCommand extends commando.Command {
let okHandMsg = await message.say(":ok_hand:"); let okHandMsg = await message.say(":ok_hand:");
const embed = new Discord.RichEmbed() const embed = new Discord.RichEmbed()
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL) .setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
.setColor(0xFF0000) .setColor(0x00AE86)
.setFooter('XiaoBot Moderation', this.client.user.avatarURL) .setFooter('XiaoBot Moderation', this.client.user.avatarURL)
.setTimestamp() .setTimestamp()
.setDescription(`**Member:** ${unbanUser.username}#${unbanUser.discriminator} (${unbanUser.id})\n**Action:** Ban\n**Reason:** ${reason}`); .setDescription(`**Member:** ${unbanUser.username}#${unbanUser.discriminator} (${unbanUser.id})\n**Action:** Ban\n**Reason:** ${reason}`);
+1 -1
View File
@@ -34,7 +34,7 @@ module.exports = class DefineCommand extends commando.Command {
.get(`https://www.google.com/search?q=${thingToSearch}`); .get(`https://www.google.com/search?q=${thingToSearch}`);
const $ = cheerio.load(response.text); const $ = cheerio.load(response.text);
let href = $('.r').first().find('a').first().attr('href'); let href = $('.r').first().find('a').first().attr('href');
if (!href) return Promise.reject(new Error('NO RESULTS')); if (!href) return message.say(':x: Error! No Results Found!');
href = querystring.parse(href.replace('/url?', '')); href = querystring.parse(href.replace('/url?', ''));
return searchMsg.edit(href.q); return searchMsg.edit(href.q);
} }
+4 -14
View File
@@ -32,32 +32,22 @@ module.exports = class UserInfoCommand extends commando.Command {
console.log(`[Command] ${message.content}`); console.log(`[Command] ${message.content}`);
let user = args.user; let user = args.user;
let stat; let stat;
switch (user.presence.status) {
case "online":
stat = "<:vpOnline:212789758110334977> Online";
break;
case "idle":
stat = "<:vpAway:212789859071426561> Idle";
break;
case "dnd":
stat = "<:vpDnD:230093576355184640> Do Not Disturb";
break;
case "offline":
stat = "<:vpOffline:212790005943369728> Offline";
break;
}
let color; let color;
switch (user.presence.status) { switch (user.presence.status) {
case "online": case "online":
stat = "<:vpOnline:212789758110334977> Online";
color = 0x00AE86; color = 0x00AE86;
break; break;
case "idle": case "idle":
stat = "<:vpAway:212789859071426561> Idle";
color = 0xFFFF00; color = 0xFFFF00;
break; break;
case "dnd": case "dnd":
stat = "<:vpDnD:230093576355184640> Do Not Disturb";
color = 0xFF0000; color = 0xFF0000;
break; break;
case "offline": case "offline":
stat = "<:vpOffline:212790005943369728> Offline";
color = 0x808080; color = 0x808080;
break; break;
} }