Run function on bot startup
You can run create features scheduled to run when the bot starts.
In order to allow for this you'll need to fulfill some prerequisites
plugin.json required parameters
hasIndex MUST be marked as true. If you don't mark this true Bit will skip the file
mainFile MUST be set to the FULL name of your file. Bit uses index.js by default, it's highly recommended you keep it that way.
start_function in your main_file. The actual function that starts on bot startup MUST be start_function.
Start index.js example
Last updated
Was this helpful?