Add invite-link generation and logging
All checks were successful
continuous-integration/drone/push Build is passing

The bot will now automatically find its own user-id and generate an invite link, then it will log the link.
This commit is contained in:
Bea 2022-08-25 22:29:14 +02:00
parent 58963d2653
commit 4853e7e07c

View File

@ -11,6 +11,8 @@ public class HidekoBot
{
private static Logger logger = new Logger(HidekoBot.class);
private static String botToken;
private static String standardInviteLink = "https://discord.com/oauth2/authorize?client_id=%userid%&scope=bot&permissions=8";
private static String botUserId;
public static void main(String[] args)
{
@ -35,8 +37,15 @@ public class HidekoBot
} catch (LoginException e)
{
logger.log(e.getMessage());
return;
}
botUserId = jda.getSelfUser().getId();
standardInviteLink = standardInviteLink.replace("%userid%", botUserId);
logger.log("Bot User ID: " + botUserId);
logger.log("Invite Link: " + standardInviteLink);
}
}