Implement invite link command
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-20 16:07:04 +01:00
parent b14850acaa
commit 18db0282d5
7 changed files with 37 additions and 12 deletions

View File

@@ -12,6 +12,11 @@ public class Configuration
// todo: allow people to set their own user id
private static final long botOwnerId = 979809420714332260L;
private final static String defaultInviteLink =
"https://discord.com/api/oauth2/authorize?client_id=%userid%&scope=bot+applications.commands&permissions=8";
private static String botUserId = "";
/**
* Checks if the bot has been started with the verbose argument.
@@ -54,4 +59,15 @@ public class Configuration
*/
public static long getBotOwnerId() { return botOwnerId; }
public static void seBotUserId(String id)
{
botUserId = id;
}
public static String getBotUserId() { return botUserId; }
public static String getInviteUrl() {
return defaultInviteLink.replace("%userid%", botUserId);
}
}