2020-12-21 22:29:15 +00:00
|
|
|
|
package com.discord.stores;
|
|
|
|
|
|
|
|
|
|
import com.PatchConfig;
|
|
|
|
|
import com.discord.models.domain.ModelAllowedMentions;
|
|
|
|
|
import com.discord.models.domain.ModelApplication;
|
|
|
|
|
import com.discord.models.domain.ModelMessage;
|
|
|
|
|
import com.discord.models.domain.ModelUser;
|
|
|
|
|
import com.discord.models.domain.activity.ModelActivity;
|
|
|
|
|
import com.discord.models.sticker.dto.ModelSticker;
|
|
|
|
|
import com.discord.utilities.messagesend.MessageResult;
|
|
|
|
|
import com.lytefast.flexinput.model.Attachment;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import lanchon.dexpatcher.annotation.DexAdd;
|
|
|
|
|
import lanchon.dexpatcher.annotation.DexEdit;
|
|
|
|
|
import lanchon.dexpatcher.annotation.DexWrap;
|
|
|
|
|
import rx.Observable;
|
|
|
|
|
|
|
|
|
|
@DexEdit
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public final class StoreMessages extends Store {
|
|
|
|
|
|
|
|
|
|
// TODO extra patch that allows @ user selection window to appear when entering a slash command
|
2020-12-21 22:29:15 +00:00
|
|
|
|
|
|
|
|
|
// slashmessages patch
|
|
|
|
|
|
|
|
|
|
// Wrap edit function to check for commands
|
2020-12-25 23:51:17 +00:00
|
|
|
|
@SuppressWarnings("InfiniteRecursion") // Wrapped method
|
2020-12-21 22:29:15 +00:00
|
|
|
|
@DexWrap
|
|
|
|
|
public final void editMessage(long j, long j2, String str) {
|
|
|
|
|
if (!PatchConfig.SLASH_COMMANDS_ENABLED) {
|
|
|
|
|
// Patch not enabled
|
|
|
|
|
editMessage(j, j2, str);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String interceptEditMessage = interceptEditMessage(str);
|
|
|
|
|
editMessage(j, j2, interceptEditMessage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Wrap send function to check for commands
|
2020-12-25 23:51:17 +00:00
|
|
|
|
@SuppressWarnings("InfiniteRecursion") // Wrapped method
|
2020-12-21 22:29:15 +00:00
|
|
|
|
@DexWrap
|
|
|
|
|
public final Observable<MessageResult> sendMessage(long j,
|
|
|
|
|
ModelUser modelUser,
|
|
|
|
|
String message,
|
|
|
|
|
List<? extends ModelUser> list,
|
|
|
|
|
List<? extends Attachment<?>> list2,
|
|
|
|
|
List<ModelSticker> list3,
|
|
|
|
|
ModelMessage.MessageReference messageReference,
|
|
|
|
|
ModelAllowedMentions modelAllowedMentions,
|
|
|
|
|
ModelApplication modelApplication,
|
|
|
|
|
ModelActivity modelActivity,
|
|
|
|
|
ModelMessage.Activity activity,
|
|
|
|
|
Long l,
|
|
|
|
|
Long l2,
|
|
|
|
|
Integer num) {
|
|
|
|
|
if (!PatchConfig.SLASH_COMMANDS_ENABLED) {
|
|
|
|
|
// Patch not enabled
|
|
|
|
|
return sendMessage(j, modelUser, message, list, list2, list3, messageReference, modelAllowedMentions, modelApplication, modelActivity, activity, l, l2, num);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String interceptEditMessage = interceptSendMessage(message);
|
|
|
|
|
return sendMessage(j, modelUser, interceptEditMessage, list, list2, list3, messageReference, modelAllowedMentions, modelApplication, modelActivity, activity, l, l2, num);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add in helper functions
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String interceptEditMessage(String str) {
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return str.startsWith("/") ? slashCommands(str) : str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String interceptSendMessage(String str) {
|
2020-12-21 22:29:15 +00:00
|
|
|
|
StoreStream.getUserSettings().setImageSpoiler(false);
|
|
|
|
|
return str.startsWith("/") ? slashCommands(str) : str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashCommands(String str) {
|
|
|
|
|
String msg = str.trim();
|
|
|
|
|
|
|
|
|
|
String command = "";
|
|
|
|
|
String remaining = "";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
|
2020-12-25 23:51:17 +00:00
|
|
|
|
int spacePos = str.indexOf(" ");
|
|
|
|
|
if (spacePos == -1) {
|
|
|
|
|
// Assume entire input is command
|
|
|
|
|
command = str.substring(1);
|
|
|
|
|
} else {
|
|
|
|
|
// Split command and remaining
|
|
|
|
|
command = str.substring(0, spacePos);
|
|
|
|
|
remaining = str.substring(spacePos + 1);
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
2020-12-25 23:51:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (msg.startsWith("/upper ")) {
|
|
|
|
|
msg = slashUpper(remaining);
|
|
|
|
|
} else if (msg.startsWith("/lower ")) {
|
|
|
|
|
msg = slashLower(remaining);
|
|
|
|
|
} else if (msg.startsWith("/bold ")) {
|
|
|
|
|
msg = slashBold(remaining);
|
|
|
|
|
} else if (msg.startsWith("/spoiler ")) {
|
|
|
|
|
msg = slashSpoiler(remaining);
|
|
|
|
|
} else if (msg.startsWith("/me ")) {
|
|
|
|
|
msg = slashMe(remaining);
|
|
|
|
|
} else if (msg.startsWith("/st ")) {
|
|
|
|
|
msg = slashSt(remaining);
|
|
|
|
|
} else if (msg.startsWith("/lenny")) {
|
|
|
|
|
msg = slashLenny(remaining);
|
|
|
|
|
} else if (msg.startsWith("/fw ")) {
|
|
|
|
|
msg = slashFw(remaining);
|
|
|
|
|
} else if (msg.startsWith("/small ")) {
|
|
|
|
|
msg = slashSmall(remaining);
|
|
|
|
|
} else if (msg.startsWith("/smaller ")) {
|
|
|
|
|
msg = slashSmaller(remaining);
|
|
|
|
|
} else if (msg.startsWith("/flip ")) {
|
|
|
|
|
msg = slashFlip(remaining);
|
|
|
|
|
} else if (msg.startsWith("/clap ")) {
|
|
|
|
|
msg = slashClap(remaining);
|
|
|
|
|
} else if (msg.startsWith("/owo ")) {
|
|
|
|
|
msg = slashOwo(remaining);
|
|
|
|
|
} else if (msg.startsWith("/morse ")) {
|
|
|
|
|
msg = slashMorse(remaining);
|
|
|
|
|
} else if (msg.startsWith("/spoilerimg")) {
|
|
|
|
|
msg = slashSpoilerImg(remaining);
|
|
|
|
|
} else if (msg.startsWith("/gordon ")) {
|
|
|
|
|
msg = slashGordon(remaining);
|
|
|
|
|
} else if (msg.startsWith("/slap ")) {
|
|
|
|
|
msg = slashSlap(remaining);
|
|
|
|
|
}
|
|
|
|
|
return msg.trim();
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashSlap(String remaining) {
|
|
|
|
|
return "*Slaps "+remaining+" around a bit with a large trout.*";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashBold(String remaining) {
|
|
|
|
|
return "**" + remaining + "**";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashClap(String remaining) {
|
|
|
|
|
return remaining.replace(" ", " :clap: ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
|
|
|
|
public static String slashCtc(String remaining) {
|
|
|
|
|
String subcommand = remaining.substring(5);
|
|
|
|
|
|
|
|
|
|
if (subcommand.startsWith("channelleak ")) {
|
|
|
|
|
StoreStream.getUserSettings().setLeakChannels(subcommand.substring(12).startsWith("false"));
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return "CTC: Successfully set channelleak state.";
|
2020-12-25 23:51:17 +00:00
|
|
|
|
} else if (subcommand.startsWith("showtyping ")) {
|
|
|
|
|
StoreStream.getUserSettings().setShowTyping(subcommand.substring(11).startsWith("true"));
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return "CTC: Successfully set showtyping state.";
|
2020-12-25 23:51:17 +00:00
|
|
|
|
} else if (subcommand.startsWith("token ")) {
|
|
|
|
|
StoreStream.getUserSettings().setStoredToken(subcommand.substring(6));
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return "CTC: Successfully changed token. Please restart application.";
|
2020-12-25 23:51:17 +00:00
|
|
|
|
} else if (subcommand.startsWith("token")) {
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return StoreStream.getUserSettings().getStoredToken();
|
|
|
|
|
} else {
|
2020-12-25 23:51:17 +00:00
|
|
|
|
if (subcommand.startsWith("account ")) {
|
|
|
|
|
String trim = subcommand.substring(8).trim();
|
2020-12-21 22:29:15 +00:00
|
|
|
|
StoreUserSettings userSettings = StoreStream.getUserSettings();
|
|
|
|
|
String accountToken = userSettings.getAccountToken(trim);
|
|
|
|
|
if (accountToken.startsWith("none")) {
|
|
|
|
|
return "CTC: No such account found.";
|
|
|
|
|
}
|
|
|
|
|
userSettings.setStoredToken(accountToken);
|
|
|
|
|
return "CTC: Successfully changed accounts. Please restart application.";
|
2020-12-25 23:51:17 +00:00
|
|
|
|
} else if (subcommand.startsWith("addaccount ")) {
|
|
|
|
|
String substring2 = subcommand.substring(11);
|
2020-12-21 22:29:15 +00:00
|
|
|
|
String substring3 = substring2.substring(substring2.indexOf(" "));
|
|
|
|
|
String trim2 = substring2.replace(substring3, "").trim();
|
|
|
|
|
String trim3 = substring3.trim();
|
|
|
|
|
StoreUserSettings userSettings2 = StoreStream.getUserSettings();
|
|
|
|
|
if (trim2.startsWith("current")) {
|
|
|
|
|
trim2 = userSettings2.getStoredToken();
|
|
|
|
|
}
|
|
|
|
|
userSettings2.setAccountToken(trim2, trim3);
|
|
|
|
|
return "CTC: Added account.";
|
2020-12-25 23:51:17 +00:00
|
|
|
|
} else if (subcommand.startsWith("nodelete ")) {
|
|
|
|
|
StoreStream.getUserSettings().setNoDelete(subcommand.substring(9).startsWith("true"));
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return "CTC: Successfully set nodelete state.";
|
2020-12-25 23:51:17 +00:00
|
|
|
|
} else if (!subcommand.startsWith("gifautoplay ")) {
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return "CTC: No known command supplied. (available: token, showtyping, channelleak, addaccount, account, nodelete, gifautoplay. Everything except specified token needs to be lowercase)";
|
|
|
|
|
} else {
|
2020-12-25 23:51:17 +00:00
|
|
|
|
StoreStream.getUserSettings().setAutoplayGifs(subcommand.substring(12).startsWith("true"));
|
2020-12-21 22:29:15 +00:00
|
|
|
|
return "CTC: Successfully set gifautoplay state.";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashFlip(String remaining) {
|
|
|
|
|
StringBuilder sb = new StringBuilder(remaining.toLowerCase());
|
2020-12-21 22:29:15 +00:00
|
|
|
|
sb.reverse();
|
|
|
|
|
return sb.toString().replace("a", "ɐ")
|
|
|
|
|
.replace("b", "q")
|
|
|
|
|
.replace("c", "ɔ")
|
|
|
|
|
.replace("d", "p")
|
|
|
|
|
.replace("e", "ǝ")
|
|
|
|
|
.replace("f", "ɟ")
|
|
|
|
|
.replace("g", "ƃ")
|
|
|
|
|
.replace("h", "ɥ")
|
|
|
|
|
.replace("i", "ı")
|
|
|
|
|
.replace("j", "ɾ")
|
|
|
|
|
.replace("k", "ʞ")
|
|
|
|
|
.replace("l", "ן")
|
|
|
|
|
.replace("m", "ɯ")
|
|
|
|
|
.replace("n", "u")
|
|
|
|
|
.replace("o", "o")
|
|
|
|
|
.replace("p", "d")
|
|
|
|
|
.replace("q", "b")
|
|
|
|
|
.replace("r", "ɹ")
|
|
|
|
|
.replace("s", "s")
|
|
|
|
|
.replace("t", "ʇ")
|
|
|
|
|
.replace("u", "n")
|
|
|
|
|
.replace("v", "ʌ")
|
|
|
|
|
.replace("w", "ʍ")
|
|
|
|
|
.replace("x", "x")
|
|
|
|
|
.replace("y", "ʎ")
|
|
|
|
|
.replace("z", "z");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashFw(String remaining) {
|
|
|
|
|
return remaining.replace(" ", " ")
|
2020-12-21 22:29:15 +00:00
|
|
|
|
.replace("!", "!")
|
|
|
|
|
.replace("#", "#")
|
|
|
|
|
.replace("$", "$")
|
|
|
|
|
.replace("%", "%")
|
|
|
|
|
.replace("&", "&")
|
|
|
|
|
.replace("'", "'")
|
|
|
|
|
.replace("(", "(")
|
|
|
|
|
.replace(")", ")")
|
|
|
|
|
.replace("*", "*")
|
|
|
|
|
.replace("+", "+")
|
|
|
|
|
.replace(",", ",")
|
|
|
|
|
.replace("-", "-")
|
|
|
|
|
.replace(".", ".")
|
|
|
|
|
.replace("/", "/")
|
|
|
|
|
.replace("0", "0")
|
|
|
|
|
.replace("1", "1")
|
|
|
|
|
.replace("2", "2")
|
|
|
|
|
.replace("3", "3")
|
|
|
|
|
.replace("4", "4")
|
|
|
|
|
.replace("5", "5")
|
|
|
|
|
.replace("6", "6")
|
|
|
|
|
.replace("7", "7")
|
|
|
|
|
.replace("8", "8")
|
|
|
|
|
.replace("9", "9")
|
|
|
|
|
.replace(":", ":")
|
|
|
|
|
.replace(";", ";")
|
|
|
|
|
.replace("<", "<")
|
|
|
|
|
.replace("=", "=")
|
|
|
|
|
.replace(">", ">")
|
|
|
|
|
.replace("?", "?")
|
|
|
|
|
.replace("@", "@")
|
|
|
|
|
.replace("A", "A")
|
|
|
|
|
.replace("B", "B")
|
|
|
|
|
.replace("C", "C")
|
|
|
|
|
.replace("D", "D")
|
|
|
|
|
.replace("E", "E")
|
|
|
|
|
.replace("F", "F")
|
|
|
|
|
.replace("G", "G")
|
|
|
|
|
.replace("H", "H")
|
|
|
|
|
.replace("I", "I")
|
|
|
|
|
.replace("J", "J")
|
|
|
|
|
.replace("K", "K")
|
|
|
|
|
.replace("L", "L")
|
|
|
|
|
.replace("M", "M")
|
|
|
|
|
.replace("N", "N")
|
|
|
|
|
.replace("O", "O")
|
|
|
|
|
.replace("P", "P")
|
|
|
|
|
.replace("Q", "Q")
|
|
|
|
|
.replace("R", "R")
|
|
|
|
|
.replace("S", "S")
|
|
|
|
|
.replace("T", "T")
|
|
|
|
|
.replace("U", "U")
|
|
|
|
|
.replace("V", "V")
|
|
|
|
|
.replace("W", "W")
|
|
|
|
|
.replace("X", "X")
|
|
|
|
|
.replace("Y", "Y")
|
|
|
|
|
.replace("Z", "Z")
|
|
|
|
|
.replace("[", "[")
|
|
|
|
|
.replace("]", "]")
|
|
|
|
|
.replace("^", "^")
|
|
|
|
|
.replace("_", "_")
|
|
|
|
|
.replace("`", "`")
|
|
|
|
|
.replace("a", "a")
|
|
|
|
|
.replace("b", "b")
|
|
|
|
|
.replace("c", "c")
|
|
|
|
|
.replace("d", "d")
|
|
|
|
|
.replace("e", "e")
|
|
|
|
|
.replace("f", "f")
|
|
|
|
|
.replace("g", "g")
|
|
|
|
|
.replace("h", "h")
|
|
|
|
|
.replace("i", "i")
|
|
|
|
|
.replace("j", "j")
|
|
|
|
|
.replace("k", "k")
|
|
|
|
|
.replace("l", "l")
|
|
|
|
|
.replace("m", "m")
|
|
|
|
|
.replace("n", "n")
|
|
|
|
|
.replace("o", "o")
|
|
|
|
|
.replace("p", "p")
|
|
|
|
|
.replace("q", "q")
|
|
|
|
|
.replace("r", "r")
|
|
|
|
|
.replace("s", "s")
|
|
|
|
|
.replace("t", "t")
|
|
|
|
|
.replace("u", "u")
|
|
|
|
|
.replace("v", "v")
|
|
|
|
|
.replace("w", "w")
|
|
|
|
|
.replace("x", "x")
|
|
|
|
|
.replace("y", "y")
|
|
|
|
|
.replace("z", "z")
|
|
|
|
|
.replace("{", "{")
|
|
|
|
|
.replace("|", "|")
|
|
|
|
|
.replace("}", "}")
|
|
|
|
|
.replace("~", "~");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashGordon(String remaining) {
|
|
|
|
|
return remaining.replace("a", "𝗮")
|
2020-12-21 22:29:15 +00:00
|
|
|
|
.replace("b", "𝗯")
|
|
|
|
|
.replace("c", "𝗰")
|
|
|
|
|
.replace("d", "𝗱")
|
|
|
|
|
.replace("e", "𝗲")
|
|
|
|
|
.replace("f", "𝗳")
|
|
|
|
|
.replace("g", "𝗴")
|
|
|
|
|
.replace("h", "𝗵")
|
|
|
|
|
.replace("i", "𝗶")
|
|
|
|
|
.replace("j", "𝗷")
|
|
|
|
|
.replace("k", "𝗸")
|
|
|
|
|
.replace("l", "𝗹")
|
|
|
|
|
.replace("m", "𝗺")
|
|
|
|
|
.replace("n", "𝗻")
|
|
|
|
|
.replace("o", "𝗼")
|
|
|
|
|
.replace("p", "𝗽")
|
|
|
|
|
.replace("q", "𝗾")
|
|
|
|
|
.replace("r", "𝗿")
|
|
|
|
|
.replace("s", "𝘀")
|
|
|
|
|
.replace("t", "𝘁")
|
|
|
|
|
.replace("u", "𝘂")
|
|
|
|
|
.replace("v", "𝘃")
|
|
|
|
|
.replace("w", "𝘄")
|
|
|
|
|
.replace("x", "𝘅")
|
|
|
|
|
.replace("y", "𝘆")
|
|
|
|
|
.replace("z", "𝘇")
|
|
|
|
|
.replace("A", "𝗔")
|
|
|
|
|
.replace("B", "𝗕")
|
|
|
|
|
.replace("C", "𝗖")
|
|
|
|
|
.replace("D", "𝗗")
|
|
|
|
|
.replace("E", "𝗘")
|
|
|
|
|
.replace("F", "𝗙")
|
|
|
|
|
.replace("G", "𝗚")
|
|
|
|
|
.replace("H", "𝗛")
|
|
|
|
|
.replace("I", "𝗜")
|
|
|
|
|
.replace("J", "𝗝")
|
|
|
|
|
.replace("K", "𝗞")
|
|
|
|
|
.replace("L", "𝗟")
|
|
|
|
|
.replace("M", "𝗠")
|
|
|
|
|
.replace("N", "𝗡")
|
|
|
|
|
.replace("O", "𝗢")
|
|
|
|
|
.replace("P", "𝗣")
|
|
|
|
|
.replace("Q", "𝗤")
|
|
|
|
|
.replace("R", "𝗥")
|
|
|
|
|
.replace("S", "𝗦")
|
|
|
|
|
.replace("T", "𝗧")
|
|
|
|
|
.replace("U", "𝗨")
|
|
|
|
|
.replace("V", "𝗩")
|
|
|
|
|
.replace("W", "𝗪")
|
|
|
|
|
.replace("X", "𝗫")
|
|
|
|
|
.replace("Y", "𝗬")
|
|
|
|
|
.replace("Z", "𝗭")
|
|
|
|
|
.replace("0", "𝟬")
|
|
|
|
|
.replace("1", "𝟭")
|
|
|
|
|
.replace("2", "𝟮")
|
|
|
|
|
.replace("3", "𝟯")
|
|
|
|
|
.replace("4", "𝟰")
|
|
|
|
|
.replace("5", "𝟱")
|
|
|
|
|
.replace("6", "𝟲")
|
|
|
|
|
.replace("7", "𝟳")
|
|
|
|
|
.replace("8", "𝟴")
|
|
|
|
|
.replace("9", "𝟵");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashLenny(String remaining) {
|
|
|
|
|
return remaining + " ( ͡° ͜ʖ ͡°)";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashLower(String remaining) {
|
|
|
|
|
return remaining.toLowerCase();
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashMe(String remaining) {
|
|
|
|
|
return "*" + remaining + "*";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashMorse(String remaining) {
|
|
|
|
|
return remaining.toUpperCase().replace(" ", "/ ")
|
2020-12-21 22:29:15 +00:00
|
|
|
|
.replace(".", ".-.-.- ")
|
|
|
|
|
.replace(",", "--..-- ")
|
|
|
|
|
.replace(":", "---... ")
|
|
|
|
|
.replace("?", "..--.. ")
|
|
|
|
|
.replace("'", ".----. ")
|
|
|
|
|
.replace("-", "-....- ")
|
|
|
|
|
.replace("/", "-..-. ")
|
|
|
|
|
.replace("@", ".--.-. ")
|
|
|
|
|
.replace("=", "-...- ")
|
|
|
|
|
.replace("A", ".- ")
|
|
|
|
|
.replace("B", "-... ")
|
|
|
|
|
.replace("C", "-.-. ")
|
|
|
|
|
.replace("D", "-.. ")
|
|
|
|
|
.replace("E", ". ")
|
|
|
|
|
.replace("F", "..-. ")
|
|
|
|
|
.replace("G", "--. ")
|
|
|
|
|
.replace("H", ".... ")
|
|
|
|
|
.replace("I", ".. ")
|
|
|
|
|
.replace("J", ".--- ")
|
|
|
|
|
.replace("K", "-.- ")
|
|
|
|
|
.replace("L", ".-.. ")
|
|
|
|
|
.replace("M", "-- ")
|
|
|
|
|
.replace("N", "-. ")
|
|
|
|
|
.replace("O", "--- ")
|
|
|
|
|
.replace("P", ".--. ")
|
|
|
|
|
.replace("Q", "--.- ")
|
|
|
|
|
.replace("R", ".-. ")
|
|
|
|
|
.replace("S", "... ")
|
|
|
|
|
.replace("T", "- ")
|
|
|
|
|
.replace("U", "..- ")
|
|
|
|
|
.replace("V", "...- ")
|
|
|
|
|
.replace("W", ".-- ")
|
|
|
|
|
.replace("X", "-..- ")
|
|
|
|
|
.replace("Y", "-.-- ")
|
|
|
|
|
.replace("Z", "--.. ")
|
|
|
|
|
.replace("0", "----- ")
|
|
|
|
|
.replace("1", ".---- ")
|
|
|
|
|
.replace("2", "..--- ")
|
|
|
|
|
.replace("3", "...-- ")
|
|
|
|
|
.replace("4", "....- ")
|
|
|
|
|
.replace("5", "..... ")
|
|
|
|
|
.replace("6", "-.... ")
|
|
|
|
|
.replace("7", "--... ")
|
|
|
|
|
.replace("8", "---.. ")
|
|
|
|
|
.replace("9", "----. ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashOwo(String remaining) {
|
|
|
|
|
return remaining.replaceAll("(?:r|l)", "w")
|
2020-12-21 22:29:15 +00:00
|
|
|
|
.replaceAll("(?:R|L)", "W")
|
|
|
|
|
.replaceAll("n([aeiou])", "ny$1")
|
|
|
|
|
.replaceAll("N([aeiou])", "Ny$1")
|
|
|
|
|
.replaceAll("N([AEIOU])", "NY$1")
|
|
|
|
|
.replace("ove", "uv");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashSmall(String remaining) {
|
|
|
|
|
return remaining.toLowerCase().replace("a", "ᴀ").replace("b", "ʙ").replace("c", "ᴄ").replace("d", "ᴅ").replace("e", "ᴇ").replace("f", "ꜰ").replace("g", "ɢ").replace("h", "ʜ").replace("i", "ɪ").replace("j", "ᴊ").replace("k", "ᴋ").replace("l", "ʟ").replace("m", "ᴍ").replace("n", "ɴ").replace("o", "ᴏ").replace("p", "ᴘ").replace("q", "ǫ").replace("r", "ʀ").replace("s", "s").replace("t", "ᴛ").replace("u", "ᴜ").replace("v", "ᴠ").replace("w", "ᴡ").replace("y", "ʏ").replace("z", "ᴢ");
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashSmaller(String remaining) {
|
|
|
|
|
return remaining.toLowerCase().replace("a", "ᵃ").replace("b", "ᵇ").replace("c", "ᶜ").replace("d", "ᵈ").replace("e", "ᵉ").replace("f", "ᶠ").replace("g", "ᵍ").replace("h", "ʰ").replace("i", "ᶦ").replace("j", "ʲ").replace("k", "ᵏ").replace("l", "ˡ").replace("m", "ᵐ").replace("n", "ⁿ").replace("o", "ᵒ").replace("p", "ᵖ").replace("q", "ᑫ").replace("r", "ʳ").replace("s", "ˢ").replace("t", "ᵗ").replace("u", "ᵘ").replace("v", "ᵛ").replace("w", "ʷ").replace("x", "ˣ").replace("y", "ʸ").replace("z", "ᶻ");
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashSpoiler(String remaining) {
|
|
|
|
|
return "||" + remaining + "||";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashSpoilerImg(String remaining) {
|
2020-12-21 22:29:15 +00:00
|
|
|
|
StoreStream.getUserSettings().setImageSpoiler(true);
|
2020-12-25 23:51:17 +00:00
|
|
|
|
return remaining;
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashSt(String remaining) {
|
|
|
|
|
return "~~" + remaining + "~~";
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
2020-12-25 23:51:17 +00:00
|
|
|
|
public static String slashUpper(String remaining) {
|
|
|
|
|
return remaining.toUpperCase();
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|