A simple and extensible Discord bot built with TypeScript that allows users to manage and retrieve quotes via slash commands. Supports commands to add, list, get, and delete quotes, plus a latency checker.
- Add new quotes with
/add - Retrieve a random quote with
/quote - List all saved quotes with
/list - Delete a quote with
/delete - Check bot latency with
/ping
- Node.js + TypeScript
- Discord.js for Discord interaction
- Supabase (or your database of choice) for persistence
- Modular architecture (controllers, services, utils)
quotes-bot/
├── src/
│ ├── controller/
│ ├── service/
│ ├── utils/
│ ├── types.ts
│ ├── commands.ts
│ └── index.ts
├── .env
├── package.json
├── eslint.config.js
├── tsconfig.json
├── README.md
├── tsconfig.json
└── README.md
Notes:
- You will have to setup a DB using Supabase, if you prefer to use another DB, you will have to modify the
db.tsfile. The DB structure should be
quotes
------------------------------------------------
id: uuid | text: text | created_at: timestamptz
- discord.js requires Node.js 22.12.0 or newer. This bot won't work with older Node versions
git clone https://github.com/damian5/quotes-bot.git
cd quotes-bot
npm install
DC_TOKEN_BOT=your-discord-token-here
SUPABASE_URL=supabase-project-url
SUPABASE_SERVICE_ROLE_KEY=supabase-service-role-key
npm run build
npm run start
To develop or debug, run:
npm run dev
Deploy as a standard Node.js application. Ensure environment variables are set in your deployment environment.
MIT
Built with ❤️ by Damian
