mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
String Changes, Don't register tons of defaults
This commit is contained in:
@@ -20,7 +20,7 @@ module.exports = class QuizCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log('[Command] ' + message.content);
|
||||
try {
|
||||
const response = await request
|
||||
.get('http://jservice.io/api/random')
|
||||
@@ -28,7 +28,7 @@ module.exports = class QuizCommand extends commando.Command {
|
||||
count: 1
|
||||
});
|
||||
const data = response.body[0];
|
||||
const answer = data.answer.toLowerCase().split("<i>").join("").split("</i>").join("");
|
||||
const answer = data.answer.toLowerCase().split('<i>').join('').split('</i>').join('');
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle('You have **fifteen** seconds to answer this question:')
|
||||
.setDescription(`**Category: ${data.category.title}**\n${data.question}`);
|
||||
@@ -52,7 +52,7 @@ module.exports = class QuizCommand extends commando.Command {
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(":x: Error! Something went wrong!");
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user