This project is a Discord bot designed to manage in-game resources with various slash commands. It uses Node.js and the discord-interactions
package to handle interactions with the Discord API.
Custom commands created specifically for your discord server
- Git
- Node.js
- Docker
- Heroku CLI
- MongoDB account
-
Clone the repository:
git clone https://github.com/WKO8/discord-bot-wknockout.git cd discord-bot-wknockout
Install dependencies:
-
Install dependencies: npm install Create a .env file with your Discord bot token and public key:
-
Create a .env file with your Discord bot token and public key:
DISCORD_TOKEN=your_discord_bot_token PUBLIC_KEY=your_discord_public_key APP_ID=your_discord_app_id MONGO_URI=your_mongodb_uri MONGO_DB=your_mongodb_name
- For install the commands in the discord server:
GUILD_ID=your_guild_id USER_MOD_ID=your_user_id
- Create a MongoDB Atlas Account:
- If you don’t have a MongoDB Atlas account, you can sign up at MongoDB Atlas.
- Create a Cluster:
- Follow the instructions on MongoDB Atlas to create a new cluster.
- Create a Database and Collection:
- Within your cluster, create a database (e.g.,
database_name
) and a collection (e.g.,collection_name
).
- Add Data:
- Use the MongoDB Atlas web interface or a tool like MongoDB Compass to insert initial data. For example:
- Update Your
.env
File:
- Ensure your
.env
file includes your MongoDB connection string and database name.
-
Install the commands
npm run register or node commands.js
-
Start the application:
npm run start or node app.js
-
Your app should be running on http://localhost:3000.