diff --git a/assets/json/cursive.json b/assets/json/cursive.json new file mode 100644 index 00000000..18f9b40b --- /dev/null +++ b/assets/json/cursive.json @@ -0,0 +1,54 @@ +{ + "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": "𝒫", + "Q": "𝒬", + "R": "𝑅", + "S": "𝒮", + "T": "𝒯", + "U": "𝒰", + "V": "𝒱", + "W": "𝒲", + "X": "𝒳", + "Y": "𝒴", + "Z": "𝒵" +} diff --git a/commands/text-edit/cursive.js b/commands/text-edit/cursive.js new file mode 100644 index 00000000..6ab0610c --- /dev/null +++ b/commands/text-edit/cursive.js @@ -0,0 +1,29 @@ +const { Command } = require('discord.js-commando'); +const { letterTrans } = require('custom-translate'); +const dictionary = require('../../assets/json/cursive'); + +module.exports = class CursiveCommand extends Command { + constructor(client) { + super(client, { + name: 'cursive', + group: 'text-edit', + memberName: 'cursive', + description: 'Converts text to cursive.', + args: [ + { + key: 'text', + prompt: 'What text would you like to convert to cursive?', + type: 'string', + validate: text => { + if (letterTrans(text, dictionary).length < 2000) return true; + return 'Invalid text, your text is too long.'; + } + } + ] + }); + } + + run(msg, { text }) { + return msg.say(letterTrans(text, dictionary)); + } +}; diff --git a/package.json b/package.json index 43ab47d8..e7dc3f27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "47.6.2", + "version": "47.7.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {