The Ticket Bot project offers effortless switching between MongoDB, MySQL, and SQLite databases, providing flexibility in database management. It features 5 database models, all of which have been successfully migrated to SQL for enhanced compatibility.
Built with discord.js, the bot enables seamless interaction with Discord servers and offers a range of ticket management commands, including /add, /attach, /close, /delete, /help, /manage, /open, /remove, /setup and /commands.
To promote scalability and ease of future development, the bot's commands are designed to be modular, allowing for easy updates and the addition of new features without disrupting the core functionality.
(/setup)
setup.mov
(/attach)
attach.mov
(/manage, /open, /close, /add, /remove, /delete)
ticket.mov
- db_type:
sqlite,mongodb,mysql
Depending on the database type you choose in config.json, add the following variables to your .env file:
DATABASE_URL="file:./dev.db"
DATABASE_URL="mysql://root:root@localhost:3306/tickets?schema=public"
MONGO_URI=mongodb://localhost:27017/tickets
Only for SQL databases
Depending on the database type you choose in config.json, change the provide under the datasource to match your databases.
- provider:
sqlite,mysql
Note: If you change from mysql to sqlite or visa versa, run the below to update prisma:
npx prisma migrate dev --name init
npx prisma generate
Then delete the migrations folder if it exists.