Pre-Installation
Before you begin setting up your own instance of Sodium, make sure you have these few things installed:
Git
Git is a free and open source distributed version control system designed to handle small to very large projects with speed and efficiency |
Node.js
(version ≥20.9.0 is required) Node.js is a back-end JavaScript runtime environment, runs on the V8 JavaScript Engine, and executes JavaScript code outside a web browser |
Nodemon
(Optional) Nodemon is a tool that helps Node.js based applications restart automatically when file changes in the directory are detected |
Configuration Files
Code Editor
2. Install the required npm packages
Code Editor
3. Install the nodemon npm package globally
(Ignore this step if you already have nodemon installed)
(Ignore this step if you already have nodemon installed)
Code Editor
4. Create a new file named config.json and fill it with your own information
(The embedColor field is required)
(The embedColor field is required)
Code Editor
5. Create a new file named .env and fill it with your own variables
(The TOKEN, MONGODB_TOKEN, CLIENT_ID, and GUILD_ID fields are required, while the rest are optional. With missing fields, certain features might not work as intended)
(The TOKEN, MONGODB_TOKEN, CLIENT_ID, and GUILD_ID fields are required, while the rest are optional. With missing fields, certain features might not work as intended)
Code Editor
6. Run the commands.js file to deploy or delete application commands
(Commands are only deployed or deleted for a single guild by default. You can deploy all commands or a single command, but you can only delete all commands)
(Commands are only deployed or deleted for a single guild by default. You can deploy all commands or a single command, but you can only delete all commands)
Code Editor
Code Editor
7. Run the index.js file to start the bot
(Don't forget to deploy commands before starting the bot, otherwise commands won't appear as they are not updated)
(Don't forget to deploy commands before starting the bot, otherwise commands won't appear as they are not updated)
Code Editor
Bot & Application
1. Visit Discord Developer Portal to create a new application
2. Enable PUBLIC BOT authorization flow option for the bot (OPTIONAL)
3. Enable PRESENCE INTENT and SERVER MEMBERS INTENT privileged gateway intent options for the bot (REQUIRED)
4. Paste this OAuth2 URL template in your browser's address bar and replace {CLIENT_ID} with your Client ID to invite the bot to your guild
2. Enable PUBLIC BOT authorization flow option for the bot (OPTIONAL)
3. Enable PRESENCE INTENT and SERVER MEMBERS INTENT privileged gateway intent options for the bot (REQUIRED)
4. Paste this OAuth2 URL template in your browser's address bar and replace {CLIENT_ID} with your Client ID to invite the bot to your guild
Code Editor
OAuth2 URL Scopes & Bot Permissions
View .png file ➜
© SkyElements. All rights reserved.