Fixed userinfo finding user by tag

This commit is contained in:
Norbi Peti 2016-11-19 20:12:53 +01:00
parent a954720ebd
commit d87cb6cbaf

View file

@ -31,7 +31,7 @@ public class UserinfoCommand extends DiscordCommandBase {
target = message.getMentions().get(0); target = message.getMentions().get(0);
else if (args.contains("#")) { else if (args.contains("#")) {
String[] targettag = args.split("#"); String[] targettag = args.split("#");
final List<IUser> targets = getUsers(message, args); final List<IUser> targets = getUsers(message, targettag[0]);
if (targets.size() == 0) { if (targets.size() == 0) {
DiscordPlugin.sendMessageToChannel(message.getChannel(), "The user cannot be found (by name): " + args); DiscordPlugin.sendMessageToChannel(message.getChannel(), "The user cannot be found (by name): " + args);
return; return;