Implement invite link command
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user