bluecord/patches/slashcommands/textreplacegen-array.py
Ave Ozkal cdc9b03ebf
slashcommands: Add lenny, small, smaller, flip, clap, owo
Also I did minor optimizations on the performance of message speed by
ensuring that message starts with / before sending it through
slashCommands function

OwO is untested.
2019-05-21 17:53:03 +03:00

103 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

smol = {
"a": "",
"b": "ʙ",
"c": "",
"d": "",
"e": "",
"f": "",
"g": "ɢ",
"h": "ʜ",
"i": "ɪ",
"j": "",
"k": "",
"l": "ʟ",
"m": "",
"n": "ɴ",
"o": "",
"p": "",
"q": "ǫ",
"r": "ʀ",
"s": "s",
"t": "",
"u": "",
"v": "",
"w": "",
"x": "x",
"y": "ʏ",
"z": ""
}
smoller = {
"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": ""
}
flipped = {
"a": "ɐ",
"b": "q",
"c": "ɔ",
"d": "p",
"e": "ǝ",
"f": "ɟ",
"g": "ƃ",
"h": "ɥ",
"i": "ı",
"j": "ɾ",
"k": "ʞ",
"l": "ן",
"m": "ɯ",
"n": "u",
"o": "o",
"p": "d",
"q": "b",
"r": "ɹ",
"s": "s",
"t": "ʇ",
"u": "n",
"v": "ʌ",
"w": "ʍ",
"x": "x",
"y": "ʎ",
"z": "z"
}
code = """
const-string v0, "before"
const-string v1, "after"
invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object p0"""
fw = flipped
for entry in fw:
if entry in ["\\", "\""]:
continue
print(code.replace("before", entry).replace("after", fw[entry]))