Fixes
This commit is contained in:
parent
4b44283236
commit
b284bdf148
2 changed files with 2 additions and 2 deletions
|
@ -103,7 +103,7 @@ public class DiscordSender implements CommandSender {
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(String message) {
|
public void sendMessage(String message) {
|
||||||
try {
|
try {
|
||||||
final boolean broadcast = new Exception().getStackTrace()[1].getMethodName().contains("broadcast");
|
final boolean broadcast = new Exception().getStackTrace()[2].getMethodName().contains("broadcast");
|
||||||
String sanitizedMsg = "";
|
String sanitizedMsg = "";
|
||||||
for (int i = 0; i < message.length(); i++) {
|
for (int i = 0; i < message.length(); i++) {
|
||||||
if (message.charAt(i) != '§') {
|
if (message.charAt(i) != '§') {
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class CommandListener {
|
||||||
if (message.getContent().startsWith(mention)) // TODO: Resolve mentions: Compound arguments, either a mention or text
|
if (message.getContent().startsWith(mention)) // TODO: Resolve mentions: Compound arguments, either a mention or text
|
||||||
if (cmdwithargs.length() > mention.length() + 1)
|
if (cmdwithargs.length() > mention.length() + 1)
|
||||||
cmdwithargs = cmdwithargs.substring(
|
cmdwithargs = cmdwithargs.substring(
|
||||||
cmdwithargs.charAt(mention.length() + 1) == ' ' ? mention.length() + 1 : mention.length());
|
cmdwithargs.charAt(mention.length()) == ' ' ? mention.length() + 1 : mention.length());
|
||||||
else
|
else
|
||||||
cmdwithargs = "help";
|
cmdwithargs = "help";
|
||||||
if (cmdwithargs.length() == 0)
|
if (cmdwithargs.length() == 0)
|
||||||
|
|
Loading…
Reference in a new issue