mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
Zalgo myself, guys woot
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
{
|
||||
"up": [
|
||||
"̍",
|
||||
"̎",
|
||||
"̄",
|
||||
"̅",
|
||||
"̿",
|
||||
"̑",
|
||||
"̆",
|
||||
"̐",
|
||||
"͒",
|
||||
"͗",
|
||||
"͑",
|
||||
"̇",
|
||||
"̈",
|
||||
"̊",
|
||||
"͂",
|
||||
"̓",
|
||||
"̈",
|
||||
"͊",
|
||||
"͋",
|
||||
"͌",
|
||||
"̃",
|
||||
"̂",
|
||||
"̌",
|
||||
"͐",
|
||||
"̀",
|
||||
"́",
|
||||
"̋",
|
||||
"̏",
|
||||
"̒",
|
||||
"̓",
|
||||
"̔",
|
||||
"̽",
|
||||
"̉",
|
||||
"ͣ",
|
||||
"ͤ",
|
||||
"ͥ",
|
||||
"ͦ",
|
||||
"ͧ",
|
||||
"ͨ",
|
||||
"ͩ",
|
||||
"ͪ",
|
||||
"ͫ",
|
||||
"ͬ",
|
||||
"ͭ",
|
||||
"ͮ",
|
||||
"ͯ",
|
||||
"̾",
|
||||
"͛",
|
||||
"͆",
|
||||
"̚"
|
||||
],
|
||||
"middle": [
|
||||
"̕",
|
||||
"̛",
|
||||
"̀",
|
||||
"́",
|
||||
"͘",
|
||||
"̡",
|
||||
"̢",
|
||||
"̧",
|
||||
"̨",
|
||||
"̴",
|
||||
"̵",
|
||||
"̶",
|
||||
"͜",
|
||||
"͝",
|
||||
"͞",
|
||||
"͟",
|
||||
"͠",
|
||||
"͢",
|
||||
"̸",
|
||||
"̷",
|
||||
"͡",
|
||||
"҉"
|
||||
],
|
||||
"down": [
|
||||
"̖",
|
||||
"̗",
|
||||
"̘",
|
||||
"̙",
|
||||
"̜",
|
||||
"̝",
|
||||
"̞",
|
||||
"̟",
|
||||
"̠",
|
||||
"̤",
|
||||
"̥",
|
||||
"̦",
|
||||
"̩",
|
||||
"̪",
|
||||
"̫",
|
||||
"̬",
|
||||
"̭",
|
||||
"̮",
|
||||
"̯",
|
||||
"̰",
|
||||
"̱",
|
||||
"̲",
|
||||
"̳",
|
||||
"̹",
|
||||
"̺",
|
||||
"̻",
|
||||
"̼",
|
||||
"ͅ",
|
||||
"͇",
|
||||
"͈",
|
||||
"͉",
|
||||
"͍",
|
||||
"͎",
|
||||
"͓",
|
||||
"͔",
|
||||
"͕",
|
||||
"͖",
|
||||
"͙",
|
||||
"͚",
|
||||
"̣"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const zalgo = require('zalgolize');
|
||||
const zalgo = require('../../assets/json/zalgo');
|
||||
|
||||
module.exports = class ZalgoCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -24,6 +24,21 @@ module.exports = class ZalgoCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { text }) {
|
||||
return msg.say(zalgo(text));
|
||||
let result = '';
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
result += text[i];
|
||||
if (text[i].length > 1) continue;
|
||||
const counts = {
|
||||
up: Math.floor(Math.random() * 8) + 1,
|
||||
middle: Math.floor(Math.random() * 3),
|
||||
down: Math.floor(Math.random() * 8) + 1
|
||||
};
|
||||
for (const type of Object.keys(counts)) {
|
||||
const count = counts[type];
|
||||
const chars = zalgo[type];
|
||||
while (count--) result += chars[Math.floor(Math.random() * chars.length)];
|
||||
}
|
||||
}
|
||||
return msg.say(result);
|
||||
}
|
||||
};
|
||||
|
||||
+3
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "42.15.3",
|
||||
"version": "42.15.4",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
@@ -39,13 +39,12 @@
|
||||
"erlpack": "github:discordapp/erlpack",
|
||||
"mathjs": "^3.16.3",
|
||||
"node-opus": "^0.2.7",
|
||||
"pg": "^6.4.2",
|
||||
"pg": "^7.3.0",
|
||||
"pg-hstore": "^2.3.2",
|
||||
"sequelize": "^4.11.5",
|
||||
"snekfetch": "^3.4.1",
|
||||
"uws": "^8.14.1",
|
||||
"xml-js": "^1.4.2",
|
||||
"zalgolize": "^1.2.4"
|
||||
"xml-js": "^1.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^4.7.2",
|
||||
|
||||
Reference in New Issue
Block a user