This is a discord bot that displays the amount of players in your server as the bots status and also send the player names and ping to a channel of your choosing.It also includes Maintenance messaging and message scheduling.
- Custom commands to display server stats for your server
- Scheduled messaging
- Clear player display
- Sets bots status as your player count
- "token": "your-bot-token-here", -- Put in your bot token
- "clientId": "your-client-id-here", -- put in your bots application ID
- "guildId": "your-guild-id-here", -- Put in your server ID
- "serverIp": "your-server-ip-here", -- Can leave blank and use /configure to overwrite
- "serverPort": "your-server-port-here", -- Can leave blank and use /configure to overwrite
- "allowedRoles": ["your-reole-id-here"] --User permission ID's for people to use the commands ["ROLE_ID_1", "ROLE_ID_2", "ROLE_ID_3"]
- "host": "localhost", -- IP or localhost
- "port": "3306", -- Port for your database
- "user": "root", --username for your database, Root is standard in most Heidi configurations
- "password": "", --Password if you have one
- "database": "vorpcore_xxxxx" -- your database name exactly how its spelt
Before you begin, ensure you have met the following requirements:
- Node.js (Download and install from Node.js official website).
- Visit the Discord Developer Portal.
- Click on "New Application" and give your bot a name.
- Go to the "Bot" tab and click "Add Bot".
- Under "TOKEN", click "Copy". Never share your bot token.
- Go to the config.json and input the bot token there, along side the bots application ID (client ID) and your servers ID
- In the "OAuth2" tab, under "URL Generator", select "bot" & "applications.commands".
- Choose the appropriate permissions for your bot under "BOT PERMISSIONS".
- Copy the generated URL, open it in your web browser, select your server, and invite your bot.
Node.js and NPM (Node Package Manager) are essential to run a Discord bot. You can download them from the Node.js official website.
You can download the bot and put it anywhere. Once you have found a place for it to live, copy the file directory and the open command prompt and change the directory.
- cd C:\MyServer\discord-bot\discord-bot then press enter. Run the below commands to install the dependencies.
npm install
npm install discord.js
npm install @discordjs/rest discord-api-types
npm install axios
npm install fs-extra
npm install mysqlOnce done you will need to register the commands first then run the bot you can do this by following the below commands
node ./utils/registerCommands.jsThen you can now run your bot
node index.jsThanks to Jake2k4, SavSin and Bytesizd



