Inviting Your Bot
Bots can’t accept regular invite codes. To join a server, a bot is authorized via OAuth2 — a user with the Manage Server permission approves the addition, and Floodilka adds the bot itself.
The invite URL
Section titled “The invite URL”https://floodilka.com/oauth2/authorize ?client_id=APPLICATION_ID &scope=bot &permissions=PERMISSIONS_BITFIELD &guild_id=OPTIONAL_GUILD_ID &disable_guild_select=true| Parameter | Required | Description |
|---|---|---|
client_id | Yes | Application ID from the application page, not the token |
scope | Yes | Must include bot |
permissions | No | Decimal permission bitfield. Omit and the bot joins with no extra permissions |
guild_id | No | Preselects a specific guild |
disable_guild_select | No | true to lock guild_id and hide the picker |
Example: bot that responds to messages
Section titled “Example: bot that responds to messages”For a plain conversational bot that reads and writes:
| Permission | Value |
|---|---|
VIEW_CHANNEL | 1 << 10 = 1024 |
SEND_MESSAGES | 1 << 11 = 2048 |
READ_MESSAGE_HISTORY | 1 << 16 = 65536 |
EMBED_LINKS | 1 << 14 = 16384 |
ADD_REACTIONS | 1 << 6 = 64 |
Sum: 85056
https://floodilka.com/oauth2/authorize?client_id=1496956937664585746&scope=bot&permissions=85056Example: moderation bot
Section titled “Example: moderation bot”// For bits above 31 you must use BigInt:const perms = (1n << 13n) | (1n << 1n) | (1n << 2n) | (1n << 40n);// → MANAGE_MESSAGES | KICK_MEMBERS | BAN_MEMBERS | MODERATE_MEMBERSconsole.log(perms.toString()); // "1099511636998"Public vs. private bots
Section titled “Public vs. private bots”On the application’s General tab:
- Public Bot — anyone can use the OAuth2 URL. Disable if the bot is just for one server
- Require OAuth2 Code Grant — run the full authorization code flow before adding. Useful for verification; off by default
What happens after approval
Section titled “What happens after approval”- The user clicks the link and picks a server
- Floodilka checks that the user has
MANAGE_GUILDon the chosen server - The bot is added as a member, with a role carrying the requested permissions
- Your running Gateway client receives a
GUILD_CREATEevent for the new guild
What’s next
Section titled “What’s next”- Quickstart — if you don’t have a token yet
- Building a Bot overview — what to do with the bot next
- Permissions — full bit table