Add invite-link generation and logging
continuous-integration/drone/push Build is passing Details

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
1 changed files with 9 additions and 0 deletions

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,7 +37,14 @@ 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);
}