https://github.com/document10/dumpling-bot
Discord bot using bun
https://github.com/document10/dumpling-bot
bun bunjs discord discord-bot discord-js discordbot discordjs javascript js ts typescript
Last synced: 5 months ago
JSON representation
Discord bot using bun
- Host: GitHub
- URL: https://github.com/document10/dumpling-bot
- Owner: document10
- Created: 2025-08-14T22:26:50.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-08-21T22:31:55.000Z (8 months ago)
- Last Synced: 2025-08-22T00:35:24.674Z (8 months ago)
- Topics: bun, bunjs, discord, discord-bot, discord-js, discordbot, discordjs, javascript, js, ts, typescript
- Language: TypeScript
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dumpling-bot

Discord bot implemented using the [Bun runtime](https://bun.com/) and [Discord JS](https://discord.js.org/), using Typescript for type safety. The bot is made to have as little external dependencies as possible, so a lot of things are manually implemented.
The bot was written long ago, going under the nickname "Suno" (sus noodle), so I'm migrating much of that code using modern tools and releasing it as FOSS for others to use and learn from it. Yes, the logo is the Bun logo, modified to look like Discord.
**Currently the bot is a work in progress.**
## Installation
1. Follow the instructions from https://discordjs.guide/preparations/setting-up-a-bot-application.html and https://discordjs.guide/preparations/adding-your-bot-to-servers.html to create the basic bot.
2. Clone the repo and install dependencies:
[Make sure Bun is installed and at its latest version.](https://bun.com/docs/installation)
```bash
git clone https://github.com/document10/dumpling-bot
cd dumpling-bot
bun install
```
3. Setup environment variables (`.env`) according to the instructions from `example.env`.
4. Register the commands to the Discord API using:
```bash
bun deploy-global
```
or just to the development guild using:
```bash
bun deploy-local
```
It's recommended to use the local deployment during development to avoid rate limits.
5. Setup the database
```bash
bun db-setup
```
Optionally set `DATABASE_SECRETS` to `YES` so that all sensitive info (like API keys) are stored on the database. Then load them from the `.env` file:
```bash
bun db-secrets
```
Using databases other than `PostgresSQL` requires [v1.2.21](https://bun.com/blog/bun-v1.2.21) or newer.
6. Start the bot:
```bash
bun start
```
or in dev mode for restarting on changes:
```bash
bun dev
```