-
-
Notifications
You must be signed in to change notification settings - Fork 14
Custom Variables for 2.0
Version 2 of CreativeBot has a completely different way of thinking about variables. We have a new system that allows for streamers to "code" their own values. Want to make a random number generator? You can!
When creating a new variable, streamers will be asked if they want to user eval. Eval is a way for the app to run your string as actual code, please note that this can open up vulnerabilities IF you just copy and paste someones command, so make sure you know what you're doing!
Example: Random Number Generator
name: random
description: output a random number between 1 and 20
Math.floor(Math.random() * (+20 - +1)) + +1;
Make a new command
Example: Random Number Command
name: d20
reply: You rolled a {random}!
User puts in !d20
response: You rolled a 7!