Skip to content

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.

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

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=85056
// 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_MEMBERS
console.log(perms.toString()); // "1099511636998"

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
  1. The user clicks the link and picks a server
  2. Floodilka checks that the user has MANAGE_GUILD on the chosen server
  3. The bot is added as a member, with a role carrying the requested permissions
  4. Your running Gateway client receives a GUILD_CREATE event for the new guild