mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
MeesageEmbed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const math = require('mathjs');
|
||||
const { operations, difficulties, maxValues } = require('../../assets/json/math-game');
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = class MathGameCommand extends Command {
|
||||
const value2 = Math.floor(Math.random() * maxValues[difficulty]) + 1;
|
||||
const expression = `${value1} ${operation} ${value2}`;
|
||||
const answer = math.eval(expression).toString();
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle('You have 10 seconds to answer:')
|
||||
.setDescription(expression);
|
||||
await msg.embed(embed);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = class QuizCommand extends Command {
|
||||
encode: 'url3986'
|
||||
});
|
||||
const answer = body.results[0].correct_answer.toLowerCase();
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle('You have 15 seconds to answer this question:')
|
||||
.setDescription(stripIndents`
|
||||
**${decodeURIComponent(body.results[0].category)}**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { sentences, difficulties, times } = require('../../assets/json/typing-game');
|
||||
|
||||
module.exports = class TypingGameCommand extends Command {
|
||||
@@ -29,7 +29,7 @@ module.exports = class TypingGameCommand extends Command {
|
||||
const { difficulty } = args;
|
||||
const sentence = sentences[Math.floor(Math.random() * sentences.length)];
|
||||
const time = times[difficulty];
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`You have ${time / 1000} seconds to type:`)
|
||||
.setDescription(sentence);
|
||||
await msg.embed(embed);
|
||||
|
||||
Reference in New Issue
Block a user