description |
---|
How to host my bot? |
Once you have both Blocks and Your bot prepared, you are ready for hosting
For only testing your new command if it´s working, you can use build in hosting, you can find this in the Web app on right-side of navigation bar next to settings button.
Use this block in BASE category
This is the token you use from step 7. of bot.md
You already made some working application and want to host it? Sure
You can use Many websites providing free hosting
One of the user friendly and basic one is replit.com
or you can use websites like railway or heroku
- Create a new Repl
- Select Language as Node.js & name it whatever you want
- Here you put All of your exported files, export is not the .s4d file
{% file src="../.gitbook/assets/test_bot.zip" %} You can use this if you want {% endfile %}
4. Make sure to put all files from the folder and you are done. You can now run your bot!
{% hint style="danger" %} If a bot's repository is on a repl.it free plan, your code is forced to be open-source
If you don't use [#process.env](hosting.md#process.env), your token is usable by anyone, read #negligence if you don´t want to use them {% endhint %}
Secrets are environment variables (.env
) and they are unvisible to others.
Example how to use environmental variables on replit
{% hint style="success" %} Congrats you have safely stored your token and are ready to continue coding! {% endhint %}
{% hint style="danger" %}
- Spy listening on the bot's reading data
- Security negligence about sensitive user data is illegal in the EU
- Malicious usage of the bot
- Nuke of every server the bot is in
- Making the bot and the bot's account owner permanently banned from Discord {% endhint %}