Skip to content

Custom Variables for 2.0

CreativeBuilds edited this page Nov 3, 2019 · 1 revision

Custom Variables

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!


How does this work?

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;


How to use the above example

Make a new command

Example: Random Number Command

name: d20

reply: You rolled a {random}!

User puts in !d20

response: You rolled a 7!

Clone this wiki locally