Why I didn't put this here before is beyond me

This commit is contained in:
ZeroEpoch1969 2019-12-19 15:31:21 -07:00
parent 7cffdac400
commit 86a4577023
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
2 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,7 @@ public class Command_linkdiscord extends FreedomCommand
if (Discord.PLAYER_LINK_CODES.containsValue(data)) if (Discord.PLAYER_LINK_CODES.containsValue(data))
{ {
msg("Your linking code is " + ChatColor.GREEN + Discord.getCodeForPlayer(data), ChatColor.AQUA); msg("Your linking code is " + ChatColor.GREEN + Discord.getCodeForPlayer(data), ChatColor.AQUA);
msg("Take this code and DM the server bot (" + plugin.dc.formatBotTag() + ") the code (do not put anything else in the message, only the code)");
} }
else else
{ {

View File

@ -25,6 +25,7 @@ import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.MessageEmbed; import net.dv8tion.jda.api.entities.MessageEmbed;
import net.dv8tion.jda.api.entities.Role; import net.dv8tion.jda.api.entities.Role;
import net.dv8tion.jda.api.entities.TextChannel; import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.SelfUser;
import net.dv8tion.jda.api.events.ReadyEvent; import net.dv8tion.jda.api.events.ReadyEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.pravian.aero.util.StringUtils; import net.pravian.aero.util.StringUtils;
@ -160,6 +161,12 @@ public class Discord extends FreedomService
} }
} }
public String formatBotTag()
{
SelfUser user = bot.getSelfUser();
return user.getName() + "#" + user.getDiscriminator();
}
public static String getCodeForAdmin(Admin admin) public static String getCodeForAdmin(Admin admin)
{ {
for (String code : LINK_CODES.keySet()) for (String code : LINK_CODES.keySet())