Add invite-link generation and logging
All checks were successful
continuous-integration/drone/push Build is passing
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:
parent
58963d2653
commit
4853e7e07c
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user