mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Bug Fixes
This commit is contained in:
@@ -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.'];
|
||||
randomSentence = randomSentence[Math.floor(Math.random() * randomSentence.length)];
|
||||
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;
|
||||
switch (level) {
|
||||
case "easy":
|
||||
time = 25000;
|
||||
levelWord = "twenty-five";
|
||||
break;
|
||||
case "medium":
|
||||
time = 20000;
|
||||
levelWord = "twenty";
|
||||
break;
|
||||
case "hard":
|
||||
time = 15000;
|
||||
levelWord = "fifteen";
|
||||
break;
|
||||
case "extreme":
|
||||
time = 10000;
|
||||
levelWord = "ten";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class UnbanCommand extends commando.Command {
|
||||
args: [{
|
||||
key: 'memberID',
|
||||
prompt: 'What member do you want to unban? Please enter the ID of the user.',
|
||||
type: 'integer',
|
||||
type: 'string',
|
||||
validate: userID => {
|
||||
if (userID.length === 18) {
|
||||
return true;
|
||||
@@ -55,7 +55,7 @@ module.exports = class UnbanCommand extends commando.Command {
|
||||
let okHandMsg = await message.say(":ok_hand:");
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
|
||||
.setColor(0xFF0000)
|
||||
.setColor(0x00AE86)
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${unbanUser.username}#${unbanUser.discriminator} (${unbanUser.id})\n**Action:** Ban\n**Reason:** ${reason}`);
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class DefineCommand extends commando.Command {
|
||||
.get(`https://www.google.com/search?q=${thingToSearch}`);
|
||||
const $ = cheerio.load(response.text);
|
||||
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?', ''));
|
||||
return searchMsg.edit(href.q);
|
||||
}
|
||||
|
||||
@@ -32,32 +32,22 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let user = args.user;
|
||||
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;
|
||||
switch (user.presence.status) {
|
||||
case "online":
|
||||
stat = "<:vpOnline:212789758110334977> Online";
|
||||
color = 0x00AE86;
|
||||
break;
|
||||
case "idle":
|
||||
stat = "<:vpAway:212789859071426561> Idle";
|
||||
color = 0xFFFF00;
|
||||
break;
|
||||
case "dnd":
|
||||
stat = "<:vpDnD:230093576355184640> Do Not Disturb";
|
||||
color = 0xFF0000;
|
||||
break;
|
||||
case "offline":
|
||||
stat = "<:vpOffline:212790005943369728> Offline";
|
||||
color = 0x808080;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user