Access, allowed actions and limits
Three settings decide what a command can do, and they answer different questions:
| Setting | Question it answers | Example |
|---|---|---|
permissions: | Who can run it? (their Discord permissions) | permissions: manage_messages |
roles: | Who can run it? (their roles) | roles: VIP, Supporter |
allow: | What can the script itself do? | allow: balances, roles |
Who can run a command
permissions: lists Discord permissions the person needs, all of them. Discord hides the command from people without them, and Kyro checks again when it runs (server admins can change command access in Discord, so Kyro doesn’t rely on that alone). roles: lets in anyone with at least one of the roles listed. Use both and the person needs to pass both.
Permission names:
administrator (Administrator) · manage_server (Manage Server) · manage_roles (Manage Roles) · manage_channels (Manage Channels) · manage_messages (Manage Messages) · manage_nicknames (Manage Nicknames) · manage_threads (Manage Threads) · manage_events (Manage Events) · manage_webhooks (Manage Webhooks) · view_audit_log (View Audit Log) · kick_members (Kick Members) · ban_members (Ban Members) · moderate_members (Timeout Members) · mention_everyone (Mention @everyone) · mute_members (Mute Members) · deafen_members (Deafen Members) · move_members (Move Members) · view_channel (View Channels) · send_messages (Send Messages) · embed_links (Embed Links) · attach_files (Attach Files) · add_reactions (Add Reactions) · use_external_emojis (Use External Emojis) · create_public_threads (Create Public Threads)
Inside a script, check someone’s permissions with has_permission(member, "kick_members") or "kick_members" in member.permissions.
Allowed actions
Some functions change things in your server or your bot’s data. A script can only use them if the action is on its allow: line (in the dashboard, a box you tick). If it’s missing, the script won’t save, and the editor points at the line.
| Action | On the allow: line | Lets the script use |
|---|---|---|
| Give and take roles | roles | give_role, take_role |
| Moderate members and messages | moderation | kick, timeout, ban, unban, purge, delete_message, pin_message (the person running the command needs the same permission) |
| Change the server | server | create, edit and delete channels and roles, lock channels, nicknames and server settings (the person running the command needs the same permission) |
| Post in other channels | channels | send to a channel other than the current one |
| Ping @everyone, @here and roles | mentions | without this, mass pings are removed from messages |
| Change balances | balances | economy.give, economy.take |
| Change XP | xp | levels.add_xp |
| Save data | storage | storage.set, storage.add, storage.delete |
| Use the internet | internet | integrations.* and http.* |
mentions, mass pings are removed from what your script sends, so a script can’t be tricked into pinging everyone. And allowing an action never lets someone do more than they could already: kicking still needs the person running the command to have Kick Members.What your bot needs
Some actions also need your bot to have a Discord permission, like Manage Roles to give roles. The editor lists what a script needs, so you can fix your bot’s role before anyone runs into an error.
Limits
Every run has limits so one script can’t slow down your bot (or anyone else’s). Normal commands never get close.
| Limit | Pro | Max |
|---|---|---|
| Steps per run | 20,000 | 50,000 |
| Time per run | 3 seconds | 5 seconds |
| Discord actions per run (replies, roles, reactions…) | 10 | 20 |
| Storage reads + writes per run | 30 | 60 |
| Times a loop can run | 1,000 | 1,000 |
| Functions calling functions | 32 deep | 32 deep |
| wait() per run | 10 seconds | 10 seconds |
| Internet requests per run | 2 | 4 |
| Internet requests per bot per day | 1,000 | 10,000 |
| Sites in the internet allowlist | Max only | 25 |
| Script length | 20,000 characters | 50,000 characters |
| Saved data per bot | 5 MB | 50 MB |
| Size of one saved value | 4 KB | 16 KB |
A “step” is one small piece of work, like one line or one bit of maths. Text can be up to 100,000 characters, and lists and maps up to 10,000 items. Each command also has a cooldown you choose, and very heavy use is slowed down automatically.
Fair use
Limits keep every bot fast. Trying to get around them, or writing scripts meant to crash bots or Kyro, raid or nuke servers, mass delete channels or roles, mass ban, or spam, breaks the Terms. Those scripts may be switched off automatically, and the bot and account can be suspended.