This project contains the source code for any personal bots that I have created for Discord. This repository assumes that the user has at least a basic understanding of Discord Bots, but refer to Discord Developer Documents and Discord.js Documents if not.
This repository consists of several pieces to begin and get up and running with the bots, but the main core of the code for the unique code interacterion is in the bots folder.
- Ensure the entirety of the Discord.js Installation & Preparations is complete.
- Download and install an IDE. VSCodium is used to create this project
The code is largely broken into three pieces:
- The Bots
- This folder contains all of the different bots with their respective handling. Right now, only Slash Commands are supported.
- Refer to the individual underlying folder for each bot for information regarding it.
- List:
- Hunt Request: A bot meant to help with facilitating helping users find certain items, using a simplified modal. After created, the user is able to continually manage their request.
- The Register
- This will register any commands exported from commands to the Discord server.
- This code is largely just templated from Fellipe Utaka's tutorial found here, with slight modifications to respect the basic SlashCommand interface
- This code runs independently from the main application, and only needs to be ran when a command is added/edited/deleted, but does not need to be re-ran when the underlying functionality of that command changes.
- The Main Application
- This is the code that runs the bots. While mostly uninteresting, it does contain the code to make it work with Discord harmoniously.
- Retrieve your specific Discord's Application ID, Guild (Server) ID, and Token.
- Paste them into a file called
secrets.ts
under constants as exportsexport const TOKEN = '<TOKEN>'; export const APPLICATION_ID = '<APPLICATION_ID>'; export const GUILD_ID = '<GUILD_ID>';
- Run the command
npm install
Before your Discord server will understand your commands, it needs to be registered. Run:
npm run register
- Run
npm run dev
to start the bot and connect to the specified Guild server.
This project is licensed under MIT. Refer to the LICENSE for more details
This repository is not created by, affiliated with or sponsored by Discord, Inc. and its subsidiaries or its affiliates.