mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-08 15:19:14 +02:00
Stuff
This commit is contained in:
@@ -109,8 +109,8 @@ module.exports = class BattleCommand extends Command {
|
||||
this.fighting.delete(msg.channel.id);
|
||||
return msg.say(stripIndents`
|
||||
The match is over!
|
||||
**Winner:** ${userHP > oppoHP ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`}
|
||||
**Loser:** ${userHP > oppoHP ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`}
|
||||
**Winner**: ${userHP > oppoHP ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`}
|
||||
**Loser**: ${userHP > oppoHP ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`}
|
||||
`);
|
||||
} catch (err) {
|
||||
this.fighting.delete(msg.channel.id);
|
||||
|
||||
@@ -59,8 +59,8 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command {
|
||||
else ++oPts;
|
||||
await msg.say(stripIndents`
|
||||
${winner} won this round!
|
||||
**${msg.author.username}:** ${aPts}
|
||||
**${opponent.username}:** ${oPts}
|
||||
**${msg.author.username}**: ${aPts}
|
||||
**${opponent.username}**: ${oPts}
|
||||
`);
|
||||
}
|
||||
this.playing.delete(msg.channel.id);
|
||||
|
||||
@@ -47,7 +47,7 @@ module.exports = class BanCommand extends Command {
|
||||
try {
|
||||
await member.send(stripIndents`
|
||||
You were banned from ${msg.guild.name} by ${msg.author.tag}!
|
||||
**Reason:** ${reason}
|
||||
**Reason**: ${reason}
|
||||
`);
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM.');
|
||||
|
||||
@@ -47,7 +47,7 @@ module.exports = class KickCommand extends Command {
|
||||
try {
|
||||
await member.send(stripIndents`
|
||||
You were kicked from ${msg.guild.name} by ${msg.author.tag}!
|
||||
**Reason:** ${reason}
|
||||
**Reason**: ${reason}
|
||||
`);
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM.');
|
||||
|
||||
@@ -47,7 +47,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
try {
|
||||
await member.send(stripIndents`
|
||||
You were softbanned from ${msg.guild.name} by ${msg.author.tag}!
|
||||
**Reason:** ${reason}
|
||||
**Reason**: ${reason}
|
||||
`);
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM.');
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class CurrencyCommand extends Command {
|
||||
group: 'num-edit',
|
||||
memberName: 'currency',
|
||||
description: 'Converts a number from one currency to another.',
|
||||
details: `**Codes:** ${codes.join(', ')}`,
|
||||
details: `**Codes**: ${codes.join(', ')}`,
|
||||
args: [
|
||||
{
|
||||
key: 'base',
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class HoroscopeCommand extends Command {
|
||||
group: 'other',
|
||||
memberName: 'horoscope',
|
||||
description: 'Responds with today\'s horoscope for a particular sign.',
|
||||
details: `**Signs:** ${signs.join(', ')}`,
|
||||
details: `**Signs**: ${signs.join(', ')}`,
|
||||
clientPermissions: ['EMBED_LINKS'],
|
||||
args: [
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class SoundboardCommand extends Command {
|
||||
group: 'other',
|
||||
memberName: 'soundboard',
|
||||
description: 'Plays a sound in your voice channel.',
|
||||
details: `**Sounds:** ${sounds.join(', ')}`,
|
||||
details: `**Sounds**: ${sounds.join(', ')}`,
|
||||
guildOnly: true,
|
||||
throttling: {
|
||||
usages: 1,
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class RecipeCommand extends Command {
|
||||
.setColor(0xC20000)
|
||||
.setURL(recipe.href)
|
||||
.setTitle(recipe.title)
|
||||
.setDescription(`**Ingredients:** ${recipe.ingredients}`)
|
||||
.setDescription(`**Ingredients**: ${recipe.ingredients}`)
|
||||
.setThumbnail(recipe.thumbnail);
|
||||
return msg.embed(embed);
|
||||
} catch (err) {
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = class TranslateCommand extends Command {
|
||||
group: 'text-edit',
|
||||
memberName: 'translate',
|
||||
description: 'Translates text to a specified language.',
|
||||
details: `**Codes:** ${Object.keys(codes).join(', ')}`,
|
||||
details: `**Codes**: ${Object.keys(codes).join(', ')}`,
|
||||
clientPermissions: ['EMBED_LINKS'],
|
||||
args: [
|
||||
{
|
||||
|
||||
+10
-14
@@ -27,20 +27,16 @@ module.exports = class HelpCommand extends Command {
|
||||
const commands = this.client.registry.findCommands(command, false, msg);
|
||||
if (command) {
|
||||
if (commands.length === 1) {
|
||||
const embed = new MessageEmbed()
|
||||
.setTitle(`Command ${commands[0].name}`)
|
||||
.setDescription(stripIndents`
|
||||
${commands[0].description}
|
||||
${commands[0].details || ''}
|
||||
`)
|
||||
.setColor(0x00AE86)
|
||||
.addField('❯ Format',
|
||||
msg.anyUsage(`${commands[0].name} ${commands[0].format ? commands[0].format : ''}`))
|
||||
.addField('❯ Aliases',
|
||||
commands[0].aliases.join(', ') || 'None')
|
||||
.addField('❯ Group',
|
||||
commands[0].group.name);
|
||||
return msg.embed(embed);
|
||||
const data = commands[0];
|
||||
return msg.say(stripIndents`
|
||||
__**Command ${data.name}**__
|
||||
${data.description}
|
||||
_${data.details}_
|
||||
|
||||
**Format**: ${msg.anyUsage(data.name, data.format || '')}
|
||||
**Aliases**: ${data.aliases.join(', ') || 'None'}
|
||||
**Group**: ${data.group.name}
|
||||
`);
|
||||
} else if (commands.length > 1) {
|
||||
return msg.say(`Multiple commands found: ${commands.map(c => c.name).join(', ')}`);
|
||||
}
|
||||
|
||||
@@ -18,21 +18,20 @@ module.exports = class InfoCommand extends Command {
|
||||
|
||||
async run(msg) {
|
||||
const guilds = await this.client.shard.fetchClientValues('guilds.size');
|
||||
const users = await this.client.shard.fetchClientValues('users.size');
|
||||
const memory = await this.client.shard.broadcastEval('process.memoryUsage().heapUsed');
|
||||
const invite = await this.client.generateInvite('1345846343');
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.setFooter('©2017 dragonfire535#8081')
|
||||
.addField('❯ Servers',
|
||||
guilds.reduce((prev, val) => prev + val, 0), true)
|
||||
.addField('❯ Users',
|
||||
users.reduce((prev, val) => prev + val, 0), true)
|
||||
.addField('❯ Home Server',
|
||||
`[Here](https://${this.client.options.invite})`, true)
|
||||
.addField('❯ Invite',
|
||||
`[Here](${invite})`, true)
|
||||
.addField('❯ Shards',
|
||||
this.client.options.shardCount, true)
|
||||
.addField('❯ Commands',
|
||||
this.client.registry.commands.size, true)
|
||||
.addField('❯ Memory Usage',
|
||||
`${Math.round(memory.reduce((prev, val) => prev + val, 0) / 1024 / 1024)}MB`, true)
|
||||
.addField('❯ Uptime',
|
||||
duration(this.client.uptime).format(), true)
|
||||
.addField('❯ Version',
|
||||
|
||||
Reference in New Issue
Block a user