ILLEST Developers

Permissions, scopes and intents

Three different switches decide what a bot does, and each is set by somebody different.

SwitchWho sets itWhat it decides
Scopesthe bot's owner, in the portalwhat any of the bot's tokens may attempt at all
Permissionseach server, through the bot's rolewhat the bot may do in that server
Intentsyour codewhich events reach your handlers

All three have to agree. A bot with the moderate scope can ban only where its role holds ban_members, above the member it bans. A bot whose role may send messages but whose tokens lack messages.write sends nothing.

Scopes

Set on the bot's Bot page in the portal. The server holds every action a bot sends to them before anything else runs: bot actions lists each action and the scopes that let a bot send it.

ScopeWhat it allowsActions
guilds.manageMake and change channels, roles, invites and expressions, where the server's roles also allow it33
guilds.readRead the servers it is in, and their channels17
members.readRead who is in those servers3
messages.readRead messages in channels it has been added to27
messages.writeSend messages as itself31
moderateUse moderation actions, where the server's roles also allow it33

Permissions

illest.Permissions names ILLEST's own bits. Build invite links with it, or on the portal's Installation page, rather than with a number from elsewhere:

Python
import illest
from illest import utils

perms = illest.Permissions(send_messages=True, manage_messages=True, ban_members=True)
link = utils.oauth_url(1234, permissions=perms)

The portal's Installation page builds the same link. The person adding the bot may untick any permission it asks for, and nobody can give a permission they do not hold themselves.

NameBitWhat it allows
view_channel0View channels
send_messages1Send messages
manage_messages2Manage messages
attach_files3Attach files
add_reactions4Add reactions
mention_everyone5Mention everyone
pin_messagesILLEST only6Pin messages
connect7Connect
speak8Speak
mute_members9Mute members
deafen_members10Deafen members
move_members11Move members
create_instant_invite12create instant invite
manage_channels13Manage channels
manage_roles14Manage roles
manage_guild15Manage server
kick_members16Kick members
ban_members17Ban members
change_nickname18Change nickname
manage_nicknames19Manage nicknames
administrator20Administrator
share_screenILLEST only21Share screen
manage_stageILLEST only22Manage stages
review_applicationsILLEST only23Review applications
manage_expressions24Manage expressions
manage_webhooks25Manage webhooks
list_in_shopILLEST only26List in shops
manage_shopILLEST only27Manage shops
moderate_members28Time out members

Some names have no bit of their own here, and read and write the bit that covers them, so code written against those names still runs:

NameILLEST's bit
create_eventsmanage_guild
create_expressionsmanage_expressions
create_invitecreate_instant_invite
create_pollssend_messages
create_private_threadssend_messages
create_public_threadssend_messages
embed_linkssend_messages
external_emojissend_messages
external_stickerssend_messages
manage_emojismanage_expressions
manage_emojis_and_stickersmanage_expressions
manage_eventsmanage_guild
manage_permissionsmanage_roles
manage_servermanage_guild
manage_threadsmanage_messages
priority_speakerspeak
read_message_historyview_channel
read_messagesview_channel
request_to_speakconnect
send_messages_in_threadssend_messages
send_pollssend_messages
send_tts_messagessend_messages
send_voice_messagessend_messages
start_embedded_activitiesconnect
streamshare_screen
timeout_membersmoderate_members
use_application_commandssend_messages
use_embedded_activitiesconnect
use_external_appssend_messages
use_external_emojissend_messages
use_external_soundsspeak
use_external_stickerssend_messages
use_soundboardspeak
use_voice_activationspeak
view_audit_logmanage_guild
view_creator_monetization_analyticsmanage_guild
view_guild_insightsmanage_guild

Intents

The server pushes what the bot is a member of, without being asked, so an intent is a filter on the bot's side. An event whose intent is off is never handed to a handler, and a message whose intent is off is not even decrypted. An intent cannot grant anything: the library says at start, once, when an intent is on that none of the bot's scopes could feed.

Python
import illest

intents = illest.Intents.default()
intents.typing = True
client = illest.Client(intents=intents)

Intents.default() is every intent but typing and presences. Intents.all() is every one; Intents.none() is none.

IntentDefaultEventsFed by
guildsonon_guild_join, on_guild_remove, on_guild_update, on_guild_delete, on_guild_available, on_channel_create, on_channel_update, on_guild_channel_create, on_guild_channel_update, on_guild_channel_delete, on_guild_role_create, on_guild_role_update, on_guild_role_delete, on_thread_createguilds.read
membersonon_member_join, on_member_remove, on_member_update, on_raw_member_removemembers.read, guilds.read
moderationonon_member_ban, on_member_unban, on_audit_log_entry_createmembers.read, guilds.read
voice_statesonon_voice_state_updateguilds.read
messagesonon_message, on_missed_message, on_message_edit, on_message_delete, on_raw_message_edit, on_raw_message_delete, on_message_redact, on_raw_message_redactmessages.read
reactionsonon_reaction_add, on_reaction_remove, on_raw_reaction, on_raw_reaction_add, on_raw_reaction_removemessages.read
interactionsonon_interactionmessages.read
typingoffon_typing, on_raw_typingmessages.read, messages.write
presencesoffon_presence_updatenone
groupsonon_group_joinnone

Finer-grained names set the intent they are a part of. ILLEST has one messages intent, and needs no privileged message_content: a bot in a conversation's group reads it whole, or not at all.

NameSets
auto_moderationmoderation
auto_moderation_configurationmoderation
auto_moderation_executionmoderation
bansmoderation
dm_messagesmessages
dm_pollsmessages
dm_reactionsreactions
dm_typingtyping
emojisguilds
emojis_and_stickersguilds
expressionsguilds
guild_messagesmessages
guild_pollsmessages
guild_reactionsreactions
guild_scheduled_eventsguilds
guild_typingtyping
integrationsguilds
invitesguilds
message_contentmessages
pollsmessages
webhooksguilds