Upside-Down Converter

This commit is contained in:
Daniel Odendahl Jr
2017-04-13 13:36:02 +00:00
parent 56ebf4fa1f
commit 363b7df867
6 changed files with 93 additions and 4 deletions
+56
View File
@@ -0,0 +1,56 @@
{
"dictionary": {
"a": "\u0250",
"b": "q",
"c": "\u0254",
"d": "p",
"e": "\u01DD",
"f": "\u025F",
"g": "\u0183",
"h": "\u0265",
"i": "\u1D09",
"j": "\u027E",
"k": "\u029E",
"m": "\u026F",
"n": "u",
"p": "d",
"q": "b",
"r": "\u0279",
"t": "\u0287",
"u": "n",
"v": "\u028C",
"w": "\u028D",
"y": "\u028E",
"A": "\u2200",
"C": "\u0186",
"E": "\u018E",
"F": "\u2132",
"G": "\u05E4",
"J": "\u017F",
"L": "\u02E5",
"M": "W",
"P": "\u0500",
"T": "\u2534",
"U": "\u2229",
"V": "\u039B",
"W": "M",
"Y": "\u2144",
"1": "\u0196",
"2": "\u1105",
"3": "\u0190",
"4": "\u3123",
"5": "\u03DB",
"6": "9",
"7": "\u3125",
"9": "6",
",": "'",
".": "\u02D9",
"'": ",",
"\"": ",,",
"_": "\u203E",
"&": "\u214B",
"!": "\u00A1",
"?": "\u00BF",
"`": ",",
}
}
+33
View File
@@ -0,0 +1,33 @@
const { Command } = require('discord.js-commando');
const translator = require('custom-translate');
const { dictionary } = require('./udmappings.json');
module.exports = class UpsideDownCommand extends Command {
constructor(client) {
super(client, {
name: 'upsidedown',
aliases: [
'upside-down',
'udown'
],
group: 'textedit',
memberName: 'upsidedown',
description: 'Flips text upside-down. (;upsidedown It\'s upside-down!)',
examples: [';upsidedown It\'s upside-down!'],
args: [{
key: 'text',
prompt: 'What text would you like to flip upside-down?',
type: 'string'
}]
});
}
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
const text = args.text;
const upsideDown = translator.letterTrans(text, dictionary);
return message.say(upsideDown);
}
};
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class InfoCommand extends Command {
.addField('Shards',
`${this.client.options.shardCount} (${this.client.shard.id})`, true)
.addField('Commands',
'109', true)
'110', true)
.addField('Owner',
'dragonfire535#8081', true)
.addField('Source Code',
+1 -1
View File
@@ -47,7 +47,7 @@
<h2>Information</h2>
<ul>
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
<li>Command Count: 109</li>
<li>Command Count: 110</li>
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
</ul>
</div>
+1 -1
View File
@@ -95,7 +95,7 @@
<h2>Information</h2>
<ul>
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
<li>Command Count: 109</li>
<li>Command Count: 110</li>
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
</ul>
</div>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "24.1.0",
"version": "24.2.0",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"repository": {