Fixed some issues
This commit is contained in:
parent
0ff139928b
commit
714c4c3de2
1 changed files with 4 additions and 2 deletions
|
@ -37,8 +37,8 @@ public class CommandListener {
|
||||||
String cmdwithargs = message.getContent();
|
String cmdwithargs = message.getContent();
|
||||||
final String mention = DiscordPlugin.dc.getOurUser().mention(false);
|
final String mention = DiscordPlugin.dc.getOurUser().mention(false);
|
||||||
final String mentionNick = DiscordPlugin.dc.getOurUser().mention(true);
|
final String mentionNick = DiscordPlugin.dc.getOurUser().mention(true);
|
||||||
checkanddeletemention(cmdwithargs, mention, message);
|
cmdwithargs = checkanddeletemention(cmdwithargs, mention, message);
|
||||||
checkanddeletemention(cmdwithargs, mentionNick, message);
|
cmdwithargs = checkanddeletemention(cmdwithargs, mentionNick, message);
|
||||||
for (String mentionRole : (Iterable<String>) message.getRoleMentions().stream().map(r -> r.mention())::iterator)
|
for (String mentionRole : (Iterable<String>) message.getRoleMentions().stream().map(r -> r.mention())::iterator)
|
||||||
cmdwithargs = checkanddeletemention(cmdwithargs, mentionRole, message);
|
cmdwithargs = checkanddeletemention(cmdwithargs, mentionRole, message);
|
||||||
int index = cmdwithargs.indexOf(' ');
|
int index = cmdwithargs.indexOf(' ');
|
||||||
|
@ -62,6 +62,8 @@ public class CommandListener {
|
||||||
cmdwithargs.charAt(mention.length() + 1) == ' ' ? mention.length() + 1 : mention.length());
|
cmdwithargs.charAt(mention.length() + 1) == ' ' ? mention.length() + 1 : mention.length());
|
||||||
else
|
else
|
||||||
cmdwithargs = "help";
|
cmdwithargs = "help";
|
||||||
|
if (cmdwithargs.length() == 0)
|
||||||
|
cmdwithargs = "help";
|
||||||
return cmdwithargs;
|
return cmdwithargs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue