forked from distok/cutthecord
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.
This commit is contained in:
parent
835d0dffe1
commit
cdc9b03ebf
3 changed files with 1053 additions and 20 deletions
File diff suppressed because it is too large
Load diff
|
@ -3,18 +3,26 @@
|
||||||
This patch adds a message intercept feature with minimal changes to the original code, and adds slash commands.
|
This patch adds a message intercept feature with minimal changes to the original code, and adds slash commands.
|
||||||
|
|
||||||
The following slash commands are supported:
|
The following slash commands are supported:
|
||||||
- /upper
|
- /upper -> Makes text uppercase
|
||||||
- /lower
|
- /lower -> Makes text lowercase
|
||||||
- /bold
|
- /bold -> Makes text bold
|
||||||
- /spoiler
|
- /spoiler -> Marks your message as a spoiler (same as Discord Desktop)
|
||||||
- /me
|
- /me -> Display text with emphasis (same as Discord Desktop)
|
||||||
- /st (strikethrough)
|
- /st -> Puts a strikethrough the message
|
||||||
- /shrug
|
- /shrug -> Appends ¯\\_(ツ)_/¯ to your message (same as Discord Desktop)
|
||||||
- /tableflip
|
- /tableflip -> Appends (╯°□°)╯︵ ┻━┻ to your message (same as Discord Desktop)
|
||||||
- /unflip
|
- /unflip -> Appends ┬─┬ ノ( ゜-゜ノ) to your message (same as Discord Desktop)
|
||||||
- /fw (fullwidth text)
|
- /lenny -> Appends ( ͡° ͜ʖ ͡°) to your message
|
||||||
|
- /owo -> Myakes tyext reawwy owo-ly, nya :3
|
||||||
|
|
||||||
Commands like fw can be generated by `textreplacegen.py` provided in this folder.
|
Following commands are supported, but create less accessible text (so you should probably ensure that no one around you will be affected before you use them):
|
||||||
|
- /fw -> Makes text fullwidth (like "Sent from my Android Device")
|
||||||
|
- /small -> Makes text smaller (like "ᴛʜɪs")
|
||||||
|
- /smaller -> Makes text even smaller (like "ᵗʰvˢ")
|
||||||
|
- /flip -> Flips text (like "ʇɥıs")
|
||||||
|
- /clap -> Please :clap: clap
|
||||||
|
|
||||||
|
Commands like fw can be generated by `textreplacegen.py` or `textreplacegen-array.py` provided in this folder.
|
||||||
|
|
||||||
#### Available and tested on:
|
#### Available and tested on:
|
||||||
- 9.0.0
|
- 9.0.0
|
||||||
|
|
102
patches/slashcommands/textreplacegen-array.py
Normal file
102
patches/slashcommands/textreplacegen-array.py
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
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]))
|
Loading…
Reference in a new issue