Thanks to JetBrains for providing me free license for developing this project!
444x For Updating To V14
Special Thanks ToFeatures
- Multi guild!
- Open tickets by pressing a button
- Add and remove bot moderators
- Manage tickets by buttons or slash commands
- Manage ticket categories
- Send tickets history
- Log ticket actions
- Much more!
Contributing
- Want to contribute? Feel free to make any changes you want
- Fork or clone the repo
- Make any changes you want (You can also see
todo
file) - Open a pull request explaining what changes you've made
- I (el bkr) will review it and accept it :D
Installation
Requirements
- Node v18 or higher
Getting the files
- GitHub CLI:
git clone https://github.com/elbkr/ticket-bot
- Download and extract the zip
- Open with GitHub Desktop
Creating the application
- Create an application in Discord Developer Portal
- Create a BOT and Copy the BOT token
- Enable all privileged gateway intents
- Go to OAuth2 and copy the client ID
- Paste the token at
TOKEN
line and the client ID atCLIENT_ID
line in.env
file - Change
REPLACE_THIS
in the URL below with the client ID, and enter the link in your browser
Connecting to mongo DB
- Login or register into Mongo DB
- Create a cluster and complete the configuration
- Get the connection url by pressing on
connect < connect your application
- Replace the
password
with your database access password - Paste the URL into
.env
file atMONGO
line
The URL looks like this: mongodb+srv://username:password@clusterName.pjxpv.mongodb.net/MyFirstDatabase?retryWrites=true&w=majority
Changing ticket topics
- Go to
src/events/interactions/buttonPress.js
file - Slide down to the line 127
- Change the objects (See the example below)
- Don't forget to also change the topics in
src/commands/tickets/open.js
file
Object example:
{
label: "This will show in the dropdown menu",
value: "value",
emoji: "<:emoji:emoji_id>" // or a simple emoji 🔇
}
- For more info on how to get custom emojis ID, check this guide I found ;)
.ENV Output
After the configuration, the .env
file should look like this:
TOKEN=SuPerReALToken.BelIeVe_Me_itS_ReaL
MONGO=mongodb+srv://username:password@clusterName.pjxpv.mongodb.net/MyFirstDatabase?retryWrites=true&w=majority
CLIENT_ID=521311050193436682
Running the BOT
- Open a terminal and run
npm install
ornpm i
- Run
node .