mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const moment = require('moment');
|
||||
const filterLevels = ['Off', 'No Role', 'Everyone'];
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = class GuildInfoCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.setThumbnail(msg.guild.iconURL())
|
||||
.addField('❯ Name',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class BanCommand extends Command {
|
||||
@@ -62,7 +62,7 @@ module.exports = class BanCommand extends Command {
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the ban to the mod logs.');
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFF0000)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class KickCommand extends Command {
|
||||
@@ -59,7 +59,7 @@ module.exports = class KickCommand extends Command {
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the kick to the mod logs.');
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFFA500)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class SoftbanCommand extends Command {
|
||||
@@ -63,7 +63,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the softban to the mod logs.');
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFF4500)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class UnbanCommand extends Command {
|
||||
@@ -53,7 +53,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the unban to the mod logs.');
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class WarnCommand extends Command {
|
||||
@@ -56,7 +56,7 @@ module.exports = class WarnCommand extends Command {
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the warn to the mod logs.');
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFFFF00)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const signs = require('../../assets/json/horoscope');
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = class HoroscopeCommand extends Command {
|
||||
const { text } = await snekfetch
|
||||
.get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today`);
|
||||
const body = JSON.parse(text);
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setTitle(`Horoscope for ${body.sunsign}...`)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class TodayCommand extends Command {
|
||||
@@ -19,7 +19,7 @@ module.exports = class TodayCommand extends Command {
|
||||
const body = JSON.parse(text);
|
||||
const events = body.data.Events;
|
||||
const event = events[Math.floor(Math.random() * events.length)];
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setURL(body.url)
|
||||
.setTitle(`On this day (${body.date})...`)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class WouldYouRatherCommand extends Command {
|
||||
@@ -17,7 +17,7 @@ module.exports = class WouldYouRatherCommand extends Command {
|
||||
async run(msg) {
|
||||
const { body } = await snekfetch
|
||||
.get('http://www.rrrather.com/botapi');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`${body.title}...`)
|
||||
.setURL(body.link)
|
||||
.setColor(0x9797FF)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { cleanXML } = require('../../structures/Util');
|
||||
const { promisifyAll } = require('tsubaki');
|
||||
@@ -32,7 +32,7 @@ module.exports = class AnimeCommand extends Command {
|
||||
.query({ q: query });
|
||||
const { anime } = await xml.parseStringAsync(text);
|
||||
const synopsis = cleanXML(anime.entry[0].synopsis[0].substr(0, 2000));
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x2D54A2)
|
||||
.setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png')
|
||||
.setURL(`https://myanimelist.net/anime/${anime.entry[0].id[0]}`)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { DBOTS_KEY } = process.env;
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = class BotSearchCommand extends Command {
|
||||
const { body } = await snekfetch
|
||||
.get(`https://bots.discord.pw/api/bots/${bot.id}`)
|
||||
.set({ Authorization: DBOTS_KEY });
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setAuthor('Discord Bots', 'https://i.imgur.com/lrKYBQi.jpg')
|
||||
.setTitle(body.name)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class BulbapediaCommand extends Command {
|
||||
@@ -36,7 +36,7 @@ module.exports = class BulbapediaCommand extends Command {
|
||||
formatversion: 2
|
||||
});
|
||||
if (body.query.pages[0].missing) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x3E7614)
|
||||
.setTitle(body.query.pages[0].title)
|
||||
.setAuthor('Bulbapedia', 'https://i.imgur.com/09eYo5T.png')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { WORDNIK_KEY } = process.env;
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = class DefineCommand extends Command {
|
||||
api_key: WORDNIK_KEY
|
||||
});
|
||||
if (!body.length) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setTitle(body[0].word)
|
||||
.setDescription(body[0].text);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class DiscrimCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -28,7 +28,7 @@ module.exports = class DiscrimCommand extends Command {
|
||||
run(msg, args) {
|
||||
const discrim = args.discrim || msg.author.discriminator;
|
||||
const users = this.client.users.filter((user) => user.discriminator === discrim).map((user) => user.username);
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`${users.length} Users with the discriminator: ${discrim}`)
|
||||
.setDescription(users.join(', '));
|
||||
return msg.embed(embed);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class ForecastCommand extends Command {
|
||||
@@ -31,7 +31,7 @@ module.exports = class ForecastCommand extends Command {
|
||||
});
|
||||
if (!body.query.count) return msg.say('Location Not Found.');
|
||||
const forecasts = body.query.results.channel.item.forecast;
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x0000FF)
|
||||
.setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png')
|
||||
.setURL(body.query.results.channel.link)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const moment = require('moment');
|
||||
const { GITHUB_LOGIN } = process.env;
|
||||
@@ -27,7 +27,7 @@ module.exports = class GithubCommand extends Command {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get(`https://${GITHUB_LOGIN}@api.github.com/repos/${repo}`);
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xFFFFFF)
|
||||
.setAuthor('Github', 'https://i.imgur.com/ajcPgJG.png')
|
||||
.setURL(body.html_url)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { cleanXML } = require('../../structures/Util');
|
||||
const { promisifyAll } = require('tsubaki');
|
||||
@@ -32,7 +32,7 @@ module.exports = class MangaCommand extends Command {
|
||||
.query({ q: query });
|
||||
const { manga } = await xml.parseStringAsync(text);
|
||||
const synopsis = cleanXML(manga.entry[0].synopsis[0].substr(0, 2000));
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x2D54A2)
|
||||
.setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png')
|
||||
.setURL(`https://myanimelist.net/manga/${manga.entry[0].id[0]}`)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { OSU_KEY } = process.env;
|
||||
|
||||
@@ -31,7 +31,7 @@ module.exports = class OsuCommand extends Command {
|
||||
type: 'string'
|
||||
});
|
||||
if (!body.length) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xFF66AA)
|
||||
.setAuthor('osu!', 'https://i.imgur.com/EmnUp00.png')
|
||||
.setURL('https://osu.ppy.sh/')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class RecipeCommand extends Command {
|
||||
@@ -28,7 +28,7 @@ module.exports = class RecipeCommand extends Command {
|
||||
const body = JSON.parse(text);
|
||||
if (!body.results.length) return msg.say('No Results.');
|
||||
const recipe = body.results[Math.floor(Math.random() * body.results.length)];
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xC20000)
|
||||
.setURL(recipe.href)
|
||||
.setTitle(recipe.title)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { SOUNDCLOUD_KEY } = process.env;
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = class SoundCloudCommand extends Command {
|
||||
client_id: SOUNDCLOUD_KEY
|
||||
});
|
||||
if (!body.length) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xF15A22)
|
||||
.setAuthor('SoundCloud', 'https://i.imgur.com/lFIz7RU.png')
|
||||
.setTitle(body[0].title)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class UrbanCommand extends Command {
|
||||
@@ -26,7 +26,7 @@ module.exports = class UrbanCommand extends Command {
|
||||
.get('http://api.urbandictionary.com/v0/define')
|
||||
.query({ term: query });
|
||||
if (!body.list.length) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x32A8F0)
|
||||
.setAuthor('Urban Dictionary', 'https://i.imgur.com/fzFuuL7.png')
|
||||
.setURL(body.list[0].permalink)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const moment = require('moment');
|
||||
const { WATTPAD_KEY } = process.env;
|
||||
@@ -32,7 +32,7 @@ module.exports = class WattpadCommand extends Command {
|
||||
})
|
||||
.set({ Authorization: `Basic ${WATTPAD_KEY}` });
|
||||
if (!body.stories.length) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xF89C34)
|
||||
.setAuthor('Wattpad', 'https://i.imgur.com/Rw9vRQB.png')
|
||||
.setURL(body.stories[0].url)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class WeatherCommand extends Command {
|
||||
@@ -29,7 +29,7 @@ module.exports = class WeatherCommand extends Command {
|
||||
format: 'json'
|
||||
});
|
||||
if (!body.query.count) return msg.say('Location Not Found.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x0000FF)
|
||||
.setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png')
|
||||
.setURL(body.query.results.channel.link)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class WikipediaCommand extends Command {
|
||||
@@ -35,7 +35,7 @@ module.exports = class WikipediaCommand extends Command {
|
||||
formatversion: 2
|
||||
});
|
||||
if (body.query.pages[0].missing) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xE7E7E7)
|
||||
.setTitle(body.query.pages[0].title)
|
||||
.setAuthor('Wikipedia', 'https://i.imgur.com/a4eeEhh.png')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class XKCDCommand extends Command {
|
||||
@@ -28,7 +28,7 @@ module.exports = class XKCDCommand extends Command {
|
||||
const current = await snekfetch
|
||||
.get('https://xkcd.com/info.0.json');
|
||||
if (type === 'today') {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`${current.body.num} - ${current.body.title}`)
|
||||
.setURL(`https://xkcd.com/${current.body.num}`)
|
||||
.setImage(current.body.img)
|
||||
@@ -38,7 +38,7 @@ module.exports = class XKCDCommand extends Command {
|
||||
const random = Math.floor(Math.random() * current.body.num) + 1;
|
||||
const { body } = await snekfetch
|
||||
.get(`https://xkcd.com/${random}/info.0.json`);
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`${body.num} - ${body.title}`)
|
||||
.setURL(`https://xkcd.com/${body.num}`)
|
||||
.setImage(body.img)
|
||||
@@ -49,7 +49,7 @@ module.exports = class XKCDCommand extends Command {
|
||||
if (isNaN(choice) || current.body.num < choice || choice < 1) return msg.say('Invalid Number.');
|
||||
const { body } = await snekfetch
|
||||
.get(`https://xkcd.com/${choice}/info.0.json`);
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`${body.num} - ${body.title}`)
|
||||
.setURL(`https://xkcd.com/${body.num}`)
|
||||
.setImage(body.img)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { GOOGLE_KEY } = process.env;
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = class YouTubeCommand extends Command {
|
||||
key: GOOGLE_KEY
|
||||
});
|
||||
if (!body.items.length) return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xDD2825)
|
||||
.setTitle(body.items[0].snippet.title)
|
||||
.setDescription(body.items[0].snippet.description)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class YuGiOhCommand extends Command {
|
||||
@@ -26,7 +26,7 @@ module.exports = class YuGiOhCommand extends Command {
|
||||
const { body } = await snekfetch
|
||||
.get(`http://yugiohprices.com/api/card_data/${query}`);
|
||||
if (body.status === 'fail') return msg.say('No Results.');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0xBE5F1F)
|
||||
.setTitle(body.data.name)
|
||||
.setDescription(body.data.text)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class EmbedCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -21,7 +21,7 @@ module.exports = class EmbedCommand extends Command {
|
||||
|
||||
run(msg, args) {
|
||||
const { text } = args;
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const snekfetch = require('snekfetch');
|
||||
const codes = require('../../assets/json/translate');
|
||||
const { YANDEX_KEY } = process.env;
|
||||
@@ -58,7 +58,7 @@ module.exports = class TranslateCommand extends Command {
|
||||
lang: from ? `${from}-${to}` : to
|
||||
});
|
||||
const lang = body.lang.split('-');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.addField(`❯ From: ${codes[lang[0]]}`,
|
||||
text)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const moment = require('moment');
|
||||
const statuses = require('../../assets/json/user-info');
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = class UserInfoCommand extends Command {
|
||||
run(msg, args) {
|
||||
const member = args.member || msg.member;
|
||||
const status = member.user.presence.status;
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(member.displayHexColor)
|
||||
.setThumbnail(member.user.displayAvatarURL())
|
||||
.addField('❯ Name',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class HelpCommand extends Command {
|
||||
@@ -29,7 +29,7 @@ module.exports = class HelpCommand extends Command {
|
||||
const showAll = command && command.toLowerCase() === 'all';
|
||||
if (command && !showAll) {
|
||||
if (commands.length === 1) {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`Command ${commands[0].name}`)
|
||||
.setDescription(stripIndents`
|
||||
${commands[0].description}
|
||||
@@ -48,7 +48,7 @@ module.exports = class HelpCommand extends Command {
|
||||
return msg.say(`Could not identify command. Use ${msg.usage(null)} to view a list of commands.`);
|
||||
}
|
||||
} else {
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(!showAll ? `Commands Available in ${msg.guild ? msg.guild.name : 'this DM'}` : 'All Commands')
|
||||
.setDescription(`Use ${msg.usage('<command>')} to view detailed information about a command.`)
|
||||
.setColor(0x00AE86);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { version } = require('../../package');
|
||||
const moment = require('moment');
|
||||
require('moment-duration-format');
|
||||
@@ -20,7 +20,7 @@ module.exports = class InfoCommand extends Command {
|
||||
async run(msg) {
|
||||
const guilds = await this.client.shard.fetchClientValues('guilds.size');
|
||||
const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.setFooter('©2017 dragonfire535#8081')
|
||||
.addField('❯ Servers',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const moment = require('moment');
|
||||
require('moment-duration-format');
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = class ShardInfoCommand extends Command {
|
||||
const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed');
|
||||
const uptime = await this.client.shard.fetchClientValues('uptime');
|
||||
const guilds = await this.client.shard.fetchClientValues('guilds.size');
|
||||
const embed = new RichEmbed()
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`Shard ${shard}`)
|
||||
.setColor(0x00AE86)
|
||||
.addField('❯ Servers',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<ol>
|
||||
<li>Avatar image Editing, including Bob Ross, RIP, Wanted, Triggered, Steam Card, and more!</li>
|
||||
<li>Profile Trading Cards, with random rarity!</li>
|
||||
<li>Battle! Challenge your friends in real turn-based matches!</li>
|
||||
<li>Battle! Challenge your friends or the AI in real turn-based matches!</li>
|
||||
<li>Fun Games including Hangman, Lottery, Math, Quiz, Rock Paper Scissors, Slots, and Typing!</li>
|
||||
<li>Server and User Information!</li>
|
||||
<li>Minecraft Achievement Generation!</li>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<ol>
|
||||
<li>Avatar image Editing, including Bob Ross, RIP, Wanted, Triggered, Steam Card, and more!</li>
|
||||
<li>Profile Trading Cards, with random rarity!</li>
|
||||
<li>Battle! Challenge your friends in real turn-based matches!</li>
|
||||
<li>Battle! Challenge your friends or the AI in real turn-based matches!</li>
|
||||
<li>Fun Games including Hangman, Lottery, Math, Quiz, Rock Paper Scissors, Slots, and Typing!</li>
|
||||
<li>Server and User Information!</li>
|
||||
<li>Minecraft Achievement Generation!</li>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "26.2.0",
|
||||
"version": "26.2.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/dragonfire535/xiaobot#readme",
|
||||
"engines": {
|
||||
"node": "8.1.2"
|
||||
"node": "8.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"bufferutil": "^3.0.1",
|
||||
|
||||
Reference in New Issue
Block a user