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
ParameterRequiredDescription
client_idYesApplication ID from the application page, not the token
scopeYesMust include bot
permissionsNoDecimal permission bitfield. Omit and the bot joins with no extra permissions
guild_idNoPreselects a specific guild
disable_guild_selectNotrue to lock guild_id and hide the picker

For a plain conversational bot that reads and writes:

PermissionValue
VIEW_CHANNEL1 << 10 = 1024
SEND_MESSAGES1 << 11 = 2048
READ_MESSAGE_HISTORY1 << 16 = 65536
EMBED_LINKS1 << 14 = 16384
ADD_REACTIONS1 << 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