Use direct unicode

This commit is contained in:
Daniel Odendahl Jr
2017-09-08 01:28:33 +00:00
parent 612cb39747
commit c12b736590
14 changed files with 25 additions and 29 deletions
+3 -5
View File
@@ -12,7 +12,7 @@ const client = new Client({
messageSweepInterval: 120
});
const SequelizeProvider = require('./providers/Sequelize');
const { dBots, dBotsOrg, filterTopics, parseTopic } = require('./structures/Util');
const { postStats, filterTopics, parseTopic } = require('./structures/Util');
client.registry
.registerDefaultTypes()
@@ -83,16 +83,14 @@ client.on('guildCreate', async guild => {
console.log(`[GUILD] I have joined ${guild.name}! (${guild.id})`);
const guilds = await client.shard.fetchClientValues('guilds.size');
const count = guilds.reduce((prev, val) => prev + val, 0);
dBots(count, client.user.id);
dBotsOrg(count, client.user.id);
postStats(count, client.user.id);
});
client.on('guildDelete', async guild => {
console.log(`[GUILD] I have left ${guild.name}... (${guild.id})`);
const guilds = await client.shard.fetchClientValues('guilds.size');
const count = guilds.reduce((prev, val) => prev + val, 0);
dBots(count, client.user.id);
dBotsOrg(count, client.user.id);
postStats(count, client.user.id);
});
client.login(TOKEN);
+5 -5
View File
@@ -2,17 +2,17 @@
"if900hp": "All cars unlocked!",
"i'm an easter egg": "You're also an example.",
"not a valid tag": "No, it's not valid at all.",
"easter egg": "This command is *tag*, not *easter egg* :yum:",
"easter egg": "This command is _tag_, not _easter egg_ 😋",
"tag": "Invalid tag!",
"snek": "*Blame :snake:*",
"snek": "_Blame 🐍_",
"snekfetch": "The best.",
"xiaobot": "That's my name.",
"dragonfire535": "http://dragonfire535.tk",
"dragonfire535": "http://dragonfire.space",
"heroes of dreamland": "https://www.wattpad.com/story/8712240",
"neopets": "I got robbed by the pant devil.",
"koneko-chan": "https://i.ytimg.com/vi/YStwTmG4Ex0/hqdefault.jpg",
"shrug": "¯\\_(ツ)_/¯",
"vulcan": ":vulcan:",
"vulcan": "🖖",
"soundboard": "Rest in Peace...",
"me": "You.",
"no u": "no u",
@@ -32,7 +32,7 @@
"token": "[REDACTED]",
"nom": "https://cdn.discordapp.com/attachments/256055608279695360/308434352377954304/tumblr_ojzfs3jjoJ1qz64n4o1_540.gif",
"good vs evil": "https://cdn.discordapp.com/attachments/256055608279695360/308404323392684033/837631b64ef351ddabe8c2200c2feca54d81af62_hq.jpg",
"ebearskittychan": "The best :heart:",
"ebearskittychan": "The best ",
"i am your father": "NOOOOOOOOOOOOOO!",
"waifu": "I'm your waifu, right?",
"no": "yes",
+1 -1
View File
@@ -1,5 +1,5 @@
const Command = require('../../structures/Command');
const fishes = [':fish:', ':tropical_fish:', ':blowfish:', ':wrench:'];
const fishes = ['🐟', '🐠', '🐡', '🔧'];
module.exports = class FishyCommand extends Command {
constructor(client) {
+1 -1
View File
@@ -1,6 +1,6 @@
const Command = require('../../structures/Command');
const { stripIndents } = require('common-tags');
const slots = [':grapes:', ':tangerine:', ':pear:', ':cherries:', ':lemon:'];
const slots = ['🍇', '🍊', '🍐', '🍒', '🍋'];
module.exports = class SlotsCommand extends Command {
constructor(client) {
+1 -1
View File
@@ -23,7 +23,7 @@ module.exports = class MagicBallCommand extends Command {
const { question } = args;
return msg.say(stripIndents`
Question: ${question}
:8ball: ${answers[Math.floor(Math.random() * answers.length)]} :8ball:
🎱 ${answers[Math.floor(Math.random() * answers.length)]} 🎱
`);
}
};
+1 -1
View File
@@ -23,7 +23,7 @@ module.exports = class MagicConchCommand extends Command {
const { question } = args;
return msg.say(stripIndents`
Question: ${question}
:shell: ${answers[Math.floor(Math.random() * answers.length)]} :shell:
🐚 ${answers[Math.floor(Math.random() * answers.length)]} 🐚
`);
}
};
+4 -4
View File
@@ -7,14 +7,14 @@ module.exports = class BCommand extends Command {
aliases: ['🅱'],
group: 'text-edit',
memberName: 'b',
description: ':b:.',
description: '🅱.',
args: [
{
key: 'text',
prompt: 'What text would you like to :b:?',
prompt: 'What text would you like to 🅱?',
type: 'string',
validate: text => {
if (text.replace(/(b|d|g|p|q)/gi, ':b:').length < 2000) return true;
if (text.replace(/(b|d|g|p|q)/gi, '🅱').length < 2000) return true;
return 'Your text is too long.';
}
}
@@ -24,6 +24,6 @@ module.exports = class BCommand extends Command {
run(msg, args) {
const { text } = args;
return msg.say(text.replace(/(b|d|g|p|q)/gi, ':b:'));
return msg.say(text.replace(/(b|d|g|p|q)/gi, '🅱'));
}
};
+1 -1
View File
@@ -57,7 +57,7 @@ module.exports = class HelpCommand extends Command {
}
try {
await msg.direct({ embed });
return msg.say(':mailbox_with_mail: Sent you a DM with information.');
return msg.say('📬 Sent you a DM with information.');
} catch (err) {
return msg.say('Failed to send DM. You probably have DMs disabled.');
}
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class InfoCommand extends Command {
.addField(' Memory Usage',
`${Math.round(memory.reduce((prev, val) => prev + val, 0) / 1024 / 1024)}MB`, true)
.addField(' Uptime',
duration(this.client.uptime).format, true)
duration(this.client.uptime).format(), true)
.addField(' Version',
`v${version}`, true)
.addField(' Node Version',
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports = class PingCommand extends Command {
async run(msg) {
const message = await msg.say('Pinging...');
return message.edit(stripIndents`
:ping_pong: Pong! \`${Math.round(message.createdTimestamp - msg.createdTimestamp)}ms\`
🏓 Pong! \`${Math.round(message.createdTimestamp - msg.createdTimestamp)}ms\`
Heartbeat: \`${Math.round(this.client.ping)}ms\`
`);
}
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class ShardInfoCommand extends Command {
.addField(' Memory Usage',
`${Math.round(memory[shard] / 1024 / 1024)}MB`, true)
.addField(' Uptime',
duration(uptime[shard]).format, true);
duration(uptime[shard]).format(), true);
return msg.embed(embed);
}
};
+1 -1
View File
@@ -13,6 +13,6 @@ module.exports = class UptimeCommand extends Command {
}
run(msg) {
return msg.say(duration(this.client.uptime).format);
return msg.say(duration(this.client.uptime).format());
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "37.5.0",
"version": "37.5.1",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {
+3 -5
View File
@@ -14,16 +14,13 @@ class Util {
.replace(/(\[i\]|\[\/i\])/g, '*');
}
static dBots(count, id) {
static postStats(count, id) {
snekfetch
.post(`https://bots.discord.pw/api/bots/${id}/stats`)
.set({ Authorization: DBOTS_KEY })
.send({ server_count: count })
.then(() => console.log('[DBOTS] Successfully posted to Discord Bots.'))
.catch(err => console.error(`[DBOTS] Failed to post to Discord Bots. ${err}`));
}
static dBotsOrg(count, id) {
snekfetch
.post(`https://discordbots.org/api/bots/${id}/stats`)
.set({ Authorization: DBOTSORG_KEY })
@@ -39,6 +36,7 @@ class Util {
return c.topic.includes(`<${setting}>`);
} catch (err) {
console.error(stripIndents`
${err.name}: ${err.message}
Guild memberCount: ${c.guild.memberCount}
GuildMemberStore size: ${c.guild.members.size}
permissionsFor ClientUser: ${c.permissionsFor(c.client.user)}
@@ -97,7 +95,7 @@ class Util {
hours: hrs,
minutes: min,
seconds: sec,
format: `${hrs < 10 ? `0${hrs}` : hrs}:${min < 10 ? `0${min}` : min}:${sec < 10 ? `0${sec}` : sec}`
format: () => `${hrs < 10 ? `0${hrs}` : hrs}:${min < 10 ? `0${min}` : min}:${sec < 10 ? `0${sec}` : sec}`
};
}
}