-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Now let the real fun begin! In the terminal of your VS Code you run the powershell command to clone the codumpus repository and install it.
| CMD | git clone https://github.com/codump/codumpus . && npm install |
|---|---|
| PowerShell for VS Code | git clone https://github.com/codump/codumpus . ; npm install |
The complete repository will now be copied to your local(PC) and installed.
Rename empty-config.json to config.json and open the file, fill in the fields with the correct details. More details and guidance about these fields further down the guide when they become relevant.
{
"masterUid": "Discord user ID of the master account.",
"masterGuild": "Discord guild ID of the master guild.",
"botClientId": "Discord bot ID / Application ID.",
"botToken": "Discord bot token.",
"botServerId": "Bot-Hosting.net server ID.",
"botServerApiKey": "Bot-Hosting.net server API key."
}Tip
For VS Code: Also open the index.js file, this is the main file that will make your bot start and keeps running. It will be opened in a new tab, right click this tab select split & move and then split down. You can store these kind of changes for VS Code in a workspace. Simply click file in the top left corner and then save workspace as. You can always restore these preferences by opening the workspace file in VS Code.
- Open Discord developer portal and create a new application.
- Get your Application ID from the general information tab and fill it in the
botClientIdfield in the config.json. - Go to the bot tab and press the reset token button. Enter this token into the
botTokenfield in the config. - Open the OAuth2 tab and create an invite link via the OAuth2 URL Generator, confirm the Bot field under scopes.
- Give the bot permissions: will change during development.
- Copy the link on the bottom of the page and use it to invite the bot to your master server.
- Login on Bot-Hosting.net.
- Earn or buy coins.
- Create a server for Node.js, then click manage server.
- Open the server: View on control panel (need to login again).
- Select your server, it will take you to the console.
- Check the URL to get your server ID. https://control.bot-hosting.net/server/YOURSERVERID
- Fill in the server id in the field
botServerIdof the config.json. - Go to your account settings and then to API credentials.
- Give a Description and leave the IP section blank, click create.
- Save the API key in the
botServerApiKeyfield in the config file.
First, we need to restrict the /botserver Discord command so that no one else can access the Bot-Hosting.net API and shut down your server. To do this, obtain your Discord user ID (see this guide
) and add it to the masterUid field in the config file.
Next, limit the command to your own guild only. Retrieve your Discord guild ID using the same guide and enter it into the masterGuild field in the config.
Once these values are set, run the following command in your terminal: node deploy-master.js
After that, deploy the remaining commands by running: node deploy-commands.js
By default, all other commands are deployed globally. If you want to change this behavior, you will need to modify the logic in the deploy-commands.js file. Keep in mind that every time you add a new command, you must rerun the deployment script.
Start your bot with the command npm start in the terminal. And test if the slash command /code is working, Don't use the /botserver function yet! We gonna use that to restart your server and pull the code from GitHub.
Do it!
♻ Powered by Codump. | Cheers and enjoy recycling codes! ♻