cutthecord/patches/slashcommands/900.patch

1220 lines
34 KiB
Diff
Raw Normal View History

Only in com.discord-900: build
Only in com.discord-900: dist
diff -crB com.discord-900-base/smali/com/discord/stores/StoreMessages.smali com.discord-900/smali/com/discord/stores/StoreMessages.smali
*** com.discord-900-base/smali/com/discord/stores/StoreMessages.smali 2019-05-19 21:52:46.439797252 +0300
2019-05-19 23:07:27 +00:00
--- com.discord-900/smali/com/discord/stores/StoreMessages.smali 2019-05-20 02:01:19.969867668 +0300
***************
*** 432,437 ****
--- 432,441 ----
invoke-static {p5, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
+ invoke-static {p5}, Lcom/discord/stores/StoreMessages;->interceptEditMessage(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p5
+
.line 167
invoke-direct {p0, p3, p4}, Lcom/discord/stores/StoreMessages;->getMessageQueue(J)Lcom/discord/utilities/messagesend/MessageQueue;
***************
*** 948,953 ****
2019-05-19 23:07:27 +00:00
--- 952,2136 ----
return-void
.end method
+ .method public static final slashUpper(Ljava/lang/String;)Ljava/lang/String;
+ .locals 1
+
+ # Length of command + space
+ const/4 v0, 0x7
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ invoke-virtual {p0}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashLower(Ljava/lang/String;)Ljava/lang/String;
+ .locals 1
+
+ # Length of command + space
+ const/4 v0, 0x7
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ invoke-virtual {p0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashBold(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command + space
+ const/4 v0, 0x6
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, "**"
+
+ invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashSpoiler(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command + space
+ const/16 v0, 0x9
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, "||"
+
+ invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashMe(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command + space
+ const/4 v0, 0x4
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, "*"
+
+ invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashSt(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command + space
+ const/4 v0, 0x4
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, "~~"
+
+ invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashShrug(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command (no space)
+ const/4 v0, 0x6
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, " ¯\\_(ツ)_/¯"
+
+ invoke-direct {v0, p0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashTableflip(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command (no space)
+ const/16 v0, 0xa
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, " (╯°□°)╯︵ ┻━┻"
+
+ invoke-direct {v0, p0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashUnflip(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command (no space)
+ const/16 v0, 0x7
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ new-instance v0, Ljava/lang/StringBuilder;
+
+ const-string v1, " ┬─┬ ( ゜-゜ノ)"
+
+ invoke-direct {v0, p0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
+
+ invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
+
+ invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final slashFw(Ljava/lang/String;)Ljava/lang/String;
+ .locals 2
+
+ # Length of command + space
+ const/16 v0, 0x4
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, " "
+
+ const-string v1, " "
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ # Start of automatically generated code with textreplacegen.py
+
+ const-string v0, "!"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "#"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "$"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "%"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "&"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "'"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "("
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, ")"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "*"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "+"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, ","
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "-"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "."
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "/"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "0"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "1"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "2"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "3"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "4"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "5"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "6"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "7"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "8"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "9"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, ":"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, ";"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "<"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "="
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, ">"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "?"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "@"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "A"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "B"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "C"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "D"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "E"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "F"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "G"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "H"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "I"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "J"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "K"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "L"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "M"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "N"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "O"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "P"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "Q"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "R"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "S"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "T"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "U"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "V"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "W"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "X"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "Y"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "Z"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "["
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "]"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "^"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "_"
+
+ const-string v1, "_"
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "`"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "a"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "b"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "c"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "d"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "e"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "f"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "g"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "h"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "i"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "j"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "k"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "l"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "m"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "n"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "o"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "p"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "q"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "r"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "s"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "t"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "u"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "v"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "w"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "x"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "y"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "z"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "{"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "|"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "}"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ const-string v0, "~"
+
+ const-string v1, ""
+
+ invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
+
+ move-result-object p0
+
+ # End of automatically generated code by textreplacegen.py
+
+ return-object p0
+ .end method
+
2019-05-19 23:07:27 +00:00
+ .method public static final slashCommands(Ljava/lang/String;)Ljava/lang/String;
+ .locals 1
+
+ # Ideas for commands (by luna): lower [done], upper [done], fw [done], bold [done], shrug [done]
+ # Ideas for commands (by bela): small, smaller
+ # Discord's defaults: me [done], tableflip [done], unflip [done], spoiler [done]
+
+ # Trim input before anything
+ invoke-virtual {p0}, Ljava/lang/String;->trim()Ljava/lang/String;
+
+ move-result-object p0
+
+ # Upper command
+ const-string v0, "/upper "
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_1
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashUpper(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Lower command
+ :cond_1
+ const-string v0, "/lower "
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_2
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashLower(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Bold command
+ :cond_2
+ const-string v0, "/bold "
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_3
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashBold(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Spoiler command
+ :cond_3
+ const-string v0, "/spoiler "
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_4
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashSpoiler(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Me command
+ :cond_4
+ const-string v0, "/me "
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_5
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashMe(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # St (strikethrough) command
+ :cond_5
+ const-string v0, "/st "
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_6
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashSt(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Shrug command
+ :cond_6
+ const-string v0, "/shrug"
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_7
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashShrug(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Tableflip command
+ :cond_7
+ const-string v0, "/tableflip"
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_8
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashTableflip(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Unflip command
+ :cond_8
+ const-string v0, "/unflip"
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_9
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashUnflip(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ # Fw command
+ :cond_9
+ const-string v0, "/fw"
+
+ invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
+
+ move-result v0
+
+ if-eqz v0, :cond_0
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashFw(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ goto :goto_0
+
+ :cond_0
+ :goto_0
+ # And finally, trim output before sending it back
+ invoke-virtual {p0}, Ljava/lang/String;->trim()Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
2019-05-19 23:07:27 +00:00
+
+ .method public static final interceptSendMessage(Ljava/lang/String;)Ljava/lang/String;
+ .locals 1
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashCommands(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
+ .method public static final interceptEditMessage(Ljava/lang/String;)Ljava/lang/String;
+ .locals 1
+
+ invoke-static {p0}, Lcom/discord/stores/StoreMessages;->slashCommands(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p0
+
+ return-object p0
+ .end method
+
.method public final sendMessage(JLcom/discord/models/domain/ModelUser;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Lrx/Observable;
.locals 8
.annotation system Ldalvik/annotation/Signature;
***************
*** 977,982 ****
2019-05-19 23:07:27 +00:00
--- 2160,2169 ----
invoke-static {p4, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-05-19 23:07:27 +00:00
+ invoke-static {p4}, Lcom/discord/stores/StoreMessages;->interceptSendMessage(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object p4
+
const/4 v0, 0x1
if-eqz p6, :cond_0