diff --git a/assets/json/superscript.json b/assets/json/superscript.json new file mode 100644 index 00000000..c087d756 --- /dev/null +++ b/assets/json/superscript.json @@ -0,0 +1,63 @@ +{ + "a": "ᵃ", + "b": "ᵇ", + "c": "ᶜ", + "d": "ᵈ", + "e": "ᵉ", + "f": "ᶠ", + "g": "ᵍ", + "h": "ʰ", + "i": "ᶦ", + "j": "ʲ", + "k": "ᵏ", + "l": "ˡ", + "m": "ᵐ", + "n": "ⁿ", + "o": "ᵒ", + "p": "ᵖ", + "q": "ᑫ", + "r": "ʳ", + "s": "ˢ", + "t": "ᵗ", + "u": "ᵘ", + "v": "ᵛ", + "w": "ʷ", + "x": "ˣ", + "y": "ʸ", + "z": "ᶻ", + "A": "ᴬ", + "B": "ᴮ", + "C": "ᶜ", + "D": "ᴰ", + "E": "ᴱ", + "F": "ᶠ", + "G": "ᴳ", + "H": "ᴴ", + "I": "ᴵ", + "J": "ᴶ", + "K": "ᴷ", + "L": "ᴸ", + "M": "ᴹ", + "N": "ᴺ", + "O": "ᴼ", + "P": "ᴾ", + "R": "ᴿ", + "S": "ˢ", + "T": "ᵀ", + "U": "ᵁ", + "V": "ⱽ", + "W": "ᵂ", + "X": "ˣ", + "Y": "ʸ", + "Z": "ᶻ", + "0": "⁰", + "1": "¹", + "2": "²", + "3": "³", + "4": "⁴", + "5": "⁵", + "6": "⁶", + "7": "⁷", + "8": "⁸", + "9": "⁹" +} diff --git a/commands/text-edit/say.js b/commands/text-edit/say.js index 1949ba1b..ad7f571b 100644 --- a/commands/text-edit/say.js +++ b/commands/text-edit/say.js @@ -8,8 +8,6 @@ module.exports = class SayCommand extends Command { group: 'text-edit', memberName: 'say', description: 'Make XiaoBot say what you wish.', - guildOnly: true, - clientPermissions: ['MANAGE_MESSAGES', 'READ_MESSAGE_HISTORY'], args: [ { key: 'text', @@ -20,8 +18,7 @@ module.exports = class SayCommand extends Command { }); } - async run(msg, { text }) { - await msg.delete(); + run(msg, { text }) { return msg.say(text); } }; diff --git a/commands/text-edit/superscript.js b/commands/text-edit/superscript.js new file mode 100644 index 00000000..67871ba9 --- /dev/null +++ b/commands/text-edit/superscript.js @@ -0,0 +1,26 @@ +const { Command } = require('discord.js-commando'); +const { letterTrans } = require('custom-translate'); +const dictionary = require('../../assets/json/superscript'); + +module.exports = class SuperscriptCommand extends Command { + constructor(client) { + super(client, { + name: 'superscript', + aliases: ['tiny-text', 'small-text'], + group: 'text-edit', + memberName: 'superscript', + description: 'Makes text become tiny text.', + args: [ + { + key: 'text', + prompt: 'What text would you like to make tiny?', + type: 'string' + } + ] + }); + } + + run(msg, { text }) { + return msg.say(letterTrans(text, dictionary)); + } +}; diff --git a/package.json b/package.json index 66d92b90..d37d6758 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "47.0.3", + "version": "47.1.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {