diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java index 47fd312f..f4e3c2e1 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_linkdiscord.java @@ -61,6 +61,7 @@ public class Command_linkdiscord extends FreedomCommand if (Discord.PLAYER_LINK_CODES.containsValue(data)) { 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 { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java b/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java index b36ecc7e..36751d67 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java @@ -25,6 +25,7 @@ import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.MessageEmbed; import net.dv8tion.jda.api.entities.Role; 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.hooks.ListenerAdapter; 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) { for (String code : LINK_CODES.keySet())