-
-
Notifications
You must be signed in to change notification settings - Fork 4
Execution Limits
Craig Edwards edited this page Nov 18, 2019
·
6 revisions
All scripts you run within Sporks have the following limitations which are put in place to protect the bot as a whole, and ensure you don't create an event which has the potential to cause harm to your server.
- All events may only reference channels and users within the guild within which they were triggered
- All scripts can only execute for a maximum of 10 milliseconds per request
- All scripts have a maximum memory usage per request of 256 kilobytes
- Up to five channel messages may be sent per request received, this includes embeds.
- Only channels may be messaged, direct message to user is not supported
- The @everyone and @here tags will be rendered ineffective before sending to a channel.
- Storage via the
save()
andload()
functions is restricted to 1024 key/value pairs per guild - overly complex (abusive or accidentally broken) regular expressions may be subject to other limits and may return early as a non-match.
- Your script may only have one web request from
get()
orpost()
"in-flight" at any one time, and cannot raise a web request from within the callback of another web request. A web request's callback function runs within its own isolated virtual machine and cannot see other parts of the script it belongs to, but gets its own separate 10ms of execution time and 256kb of RAM which does not intrude on the quota of the main script that created the request by callingget()
orpost()
. - Web requests made via
get()
andpost()
will be made via the TOR network to protect the bot's systems and to protect your discord server with increased anonymity. It is not possible to make a direct request without use of TOR, this is transparent and built into the bot.
Upon reaching any of these limits the execution of the script event will stop at the point where the limit was breached, and a range error will be raised, which can be viewed on the dashboard.
Access Sporks via the dashboard to apply scripts to your servers. For further help and assistance, you can reach us on discord.
- Brainbox.cc - Developer
- Sporks.gg - Dashboard
- Support Server - Get More Help