mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Emojify Command
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"a": ":regional_indicator_a:",
|
||||||
|
"b": ":regional_indicator_b:",
|
||||||
|
"c": ":regional_indicator_c:",
|
||||||
|
"d": ":regional_indicator_d:",
|
||||||
|
"e": ":regional_indicator_e:",
|
||||||
|
"f": ":regional_indicator_f:",
|
||||||
|
"g": ":regional_indicator_g:",
|
||||||
|
"h": ":regional_indicator_h:",
|
||||||
|
"i": ":regional_indicator_i:",
|
||||||
|
"j": ":regional_indicator_j:",
|
||||||
|
"k": ":regional_indicator_k:",
|
||||||
|
"l": ":regional_indicator_l:",
|
||||||
|
"m": ":regional_indicator_m:",
|
||||||
|
"n": ":regional_indicator_n:",
|
||||||
|
"o": ":regional_indicator_o:",
|
||||||
|
"p": ":regional_indicator_p:",
|
||||||
|
"q": ":regional_indicator_q:",
|
||||||
|
"r": ":regional_indicator_r:",
|
||||||
|
"s": ":regional_indicator_s:",
|
||||||
|
"t": ":regional_indicator_t:",
|
||||||
|
"u": ":regional_indicator_u:",
|
||||||
|
"v": ":regional_indicator_v:",
|
||||||
|
"w": ":regional_indicator_w:",
|
||||||
|
"x": ":regional_indicator_x:",
|
||||||
|
"y": ":regional_indicator_y:",
|
||||||
|
"z": ":regional_indicator_z:",
|
||||||
|
"0": ":zero:",
|
||||||
|
"1": ":one:",
|
||||||
|
"2": ":two:",
|
||||||
|
"3": ":three:",
|
||||||
|
"4": ":four:",
|
||||||
|
"5": ":five:",
|
||||||
|
"6": ":six:",
|
||||||
|
"7": ":seven:",
|
||||||
|
"8": ":eight:",
|
||||||
|
"9": ":nine:",
|
||||||
|
"?": ":question:",
|
||||||
|
"!": ":exclamation:",
|
||||||
|
"#": ":hash:"
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
const Command = require('../../structures/Command');
|
||||||
|
const { letterTrans } = require('custom-translate');
|
||||||
|
const dictionary = require('../../assets/json/emojify');
|
||||||
|
|
||||||
|
module.exports = class EmojifyCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'emojify',
|
||||||
|
aliases: ['regional-indicator'],
|
||||||
|
group: 'text-edit',
|
||||||
|
memberName: 'emojify',
|
||||||
|
description: 'Converts text to emoji form.',
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
key: 'text',
|
||||||
|
prompt: 'What text would you like to convert to emoji?',
|
||||||
|
type: 'string',
|
||||||
|
validate: text => {
|
||||||
|
if (letterTrans(text, dictionary).length < 2000) return true;
|
||||||
|
return 'Your text is too long.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
run(msg, args) {
|
||||||
|
const { text } = args;
|
||||||
|
return msg.say(letterTrans(text.toLowerCase(), dictionary));
|
||||||
|
}
|
||||||
|
};
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "30.3.3",
|
"version": "30.4.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user