mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 15:57:43 +02:00
More Stoof
This commit is contained in:
@@ -55,7 +55,8 @@ module.exports = class QuizCommand extends Command {
|
||||
answers.push(correct);
|
||||
await msg.say(stripIndents`
|
||||
**You have 15 seconds to answer this question.**
|
||||
_${decodeURIComponent(body.results[0].category)}:_ ${decodeURIComponent(body.results[0].question)}
|
||||
_${decodeURIComponent(body.results[0].category)}_
|
||||
${decodeURIComponent(body.results[0].question)}
|
||||
${type === 'boolean' ? 'True or False?' : ''}${type === 'multiple' ? `${list(shuffle(answers), 'or')}?` : ''}
|
||||
`);
|
||||
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
const snekfetch = require('snekfetch');
|
||||
const { filterPkmn } = require('../../structures/Util');
|
||||
|
||||
@@ -10,7 +11,7 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
||||
group: 'games',
|
||||
memberName: 'whos-that-pokemon',
|
||||
description: 'Guess who that Pokémon is.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
clientPermissions: ['EMBED_LINKS']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,8 +21,12 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
||||
const { body } = await snekfetch.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}/`);
|
||||
const names = body.names.map(name => name.name.toLowerCase());
|
||||
const displayName = filterPkmn(body.names).name;
|
||||
const image = `https://www.serebii.net/sunmoon/pokemon/${'000'.slice(body.id.toString().length)}${body.id}.png`;
|
||||
await msg.say('**You have 15 seconds, who\'s that Pokémon?**', { files: [image] });
|
||||
const id = `${'000'.slice(body.id.toString().length)}${body.id}`;
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xED1C24)
|
||||
.setTitle('You have 15 seconds, who\'s that Pokémon?')
|
||||
.setImage(`https://www.serebii.net/sunmoon/pokemon/${id}.png`);
|
||||
await msg.embed(embed);
|
||||
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
|
||||
max: 1,
|
||||
time: 15000
|
||||
|
||||
Reference in New Issue
Block a user