Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,2 @@
# Discord bot token
TOKEN=

# MongoDB
MONGODB_URI=

# Groq
GROQ_API_KEY=

# Port, if hosting on Render or similar platforms
PORT=5500

# Firebase
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
FIREBASE_MEASUREMENT_ID=
FIREBASE_CLIENT_EMAIL=
FIREBASE_PRIVATE_KEY=
BOT_TOKEN=
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## What does this PR do?

Explain here what you changed and why. Doesn't need to be long, just enough
for a reviewer to understand the change without reading every line of
diff. If it was a bug fix, briefly describe what was broken. Delete this paragraph and replace it with your description.

## Closes

List any issues that are linked to this pull request (e.g., `Closes #123`).

- Closes #

## Type of change(s)

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactor (no functional change)
- [ ] Performance improvement
- [ ] Other

## Checklist

- [ ] I've tested this change and it works as expected
- [ ] `bun run build` or `npm run build` completes successfully
- [ ] `bun run lint` or `npm run lint` completes without warnings or errors
- [ ] `bun run typecheck` or `npm run typecheck` completes without warnings or errors
- [ ] My code is formatted with prettier (`bun run format` or `npm run format`)
- [ ] My commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) (e.g. `feat: ...`, `fix: ...`, `chore: ...`)
- [ ] I've updated relevant documentation (README, comments, etc.) if needed
- [ ] I've removed any temporary debugging code (e.g. `console.log`)

## Screenshots / recordings (if applicable)

If this changes anything visual, a before/after screenshot or a short clip makes review a lot faster. Delete this section if it doesn't apply.

## Anything else the reviewer should know?

Extra context, known limitations, or specific things you'd like a
second opinion on. Delete this section if there's nothing to add.
43 changes: 43 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint

on:
pull_request:
push:
branches:
- main

permissions:
contents: read
statuses: write

jobs:
lint:
name: Super-Linter
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Super-Linter
uses: super-linter/super-linter@v8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: main
VALIDATE_ALL_CODEBASE: false
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_TYPESCRIPT_STANDARD: true
VALIDATE_BASH: true
VALIDATE_JSON: true
VALIDATE_YAML: true
VALIDATE_ENV: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GIT_MERGE_CONFLICT_MARKERS: true
VALIDATE_JAVASCRIPT_PRETTIER: true
VALIDATE_JSON_PRETTIER: true
VALIDATE_JSONC_PRETTIER: true
VALIDATE_MARKDOWN_PRETTIER: true
VALIDATE_TYPESCRIPT_PRETTIER: true
VALIDATE_YAML_PRETTIER: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
/db/
.npm/
.bun/
.env
*.key
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"printWidth": 80,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"source.organizeImports": "explicit",
"source.sortMembers": "explicit"
},
"cSpell.words": ["cooldown", "cooldowns", "firestore", "pandabot"]
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
7 changes: 7 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"format_on_save": "on",
"code_actions_on_format": {
"source.fixAll": true,
"source.organizeImports": true
}
}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team. All
reported by contacting the project team at [open-devhub@outlook.com](mailto:open-devhub@outlook.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
13 changes: 5 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ We welcome all kinds of contributions, whether it's fixing bugs, adding new feat

- Commit your work with a meaningful message:
```bash
git commit -m "Add leveling rewards system"
git commit -m "feat(tickets): log message conversation on ticket close"
```
- Push your branch to your fork:
```bash
Expand All @@ -47,28 +47,25 @@ We welcome all kinds of contributions, whether it's fixing bugs, adding new feat

## 📖 Code of Conduct

By contributing, you agree to uphold our [Looks like the result wasn't safe to show. Let's switch things up and try something else!].
By contributing, you agree to uphold our [Code Of Conduct](./CODE_OF_CONDUCT.md).
We expect respectful communication and collaboration.

## 💡 Suggestions & Ideas

Not a coder or not feeling like it? You can still help by:

- Starring the repo
- Reporting bugs
- Suggesting new features
- Improving documentation
- Helping other users in the community

## 🐼 Recognition

All contributors will be recognized in the project and may receive special roles in the community Discord server.
All contributors will be recognized by special roles in the community Discord server.

## 📜 License

By contributing to this project, you agree that:

- Your contributions will be licensed under the **DevHub Source-Available License (DSAL)**
- DevHub may use, modify, and distribute your contributions as part of Panda Bot
- You do not gain any ownership, commercial, or hosting rights to Panda Bot by contributing
Panda Bot is released under the **GPL-3.0** License. See [LICENSE](./LICENSE) for details.

_Thank you for taking time to contribute to Panda Bot ✨_
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
PandaBot - General purpose Discord bot powering the DevHub Discord community
Copyright (C) 2026 Open DevHub

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
PandaBot Copyright (C) 2026 Open DevHub
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
47 changes: 19 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,37 @@
[![Runtime: Bun](https://img.shields.io/badge/runtime-Bun-f9f1e1?logo=bun&logoColor=white)](https://bun.sh)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)

Panda keeps DevHub engaging, organized, and fun — with community management, moderation, gamification, and a little bit of magic.
Panda is a [self hostable] discord bot that keeps DevHub engaging, organized, and fun with community management, gamification, and a little bit of magic.

</div>

---

## ✨ Features

| Feature | Description |
| --- | --- |
| 👋 **Welcome System** | Greets new members with embeds in the server **and** via DM, plus a sticky introduction message with 👋 reactions. |
| 🔐 **Captcha Verification** | New members complete a visual captcha (via DM) before gaining full access; suspended members can verify to restore access. |
| 🎫 **Ticketing System** | Clean support-ticket creation and management with transcripts and an admin log channel. |
| ⭐ **Starboard** | Messages that reach enough reactions are promoted to the starboard channel. |
| 💡 **Suggestions** | Collect, queue, vote on, and mark community suggestions as implemented. |
| 🔢 **Counting Game** | Classic counting-channel game with a per-user count leaderboard, plus reset/set-count tools. |
| 🧑‍💻 **Profiles** | Custom profiles with bio, stack, GitHub, portfolio, hobbies & badge roles (Admin, Developer, VIP, Bug Hunter, and more). |
| 😴 **AFK System** | Set an AFK status and get notified when someone pings you. |
| 📜 **Rule Lookup** | Instantly fetch any rule embed with `p!r<number>`. |
| 🧰 **Moderation Tools** | Purge, lock/unlock, hide/unhide, slowmode, and a user-report context menu. |
| ⚡ **Macros** | Quick community macros triggered with the `++` prefix. |
| 🛠️ **Utility Commands** | Slash + prefix commands: ping, snowflake decoding, DM sending, custom embeds/messages, and more. |
| Feature | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Welcome System** | Greets new members with embeds in the server **and** via DM, plus a sticky introduction message with 👋 reactions. |
| **Ticketing System** | Clean support-ticket creation and management with transcripts and an admin log channel. |
| **Starboard** | Messages that reach enough reactions are promoted to the starboard channel. |
| **Suggestions** | Collect, queue, vote on, and mark community suggestions as implemented. |
| **Counting Game** | Classic counting-channel game with a per-user count leaderboard, plus reset/set-count tools. |
| **AFK System** | Set an AFK status and get notified when someone pings you. |
| **Rule Lookup** | Instantly fetch any rule embed with `?r<number>`. |
| **Moderation Tools** | Purge, lock/unlock, hide/unhide, slowmode, and a user-report context menu. |
| **Macros** | Quick community macros triggered with the `++` prefix. |

## 🛠️ Tech Stack

- **[Sapphirejs](https://sapphirejs.dev)**: Discord bot framework
- **[discord.js](https://discord.js.org)** v14: Discord API
- **[Bun](https://bun.sh)**: runtime & package manager
- **[MongoDB](https://www.mongodb.com)** (Mongoose): persistent storage
- **[Firebase](https://firebase.google.com)**: cloud services
- **[captcha-canvas](https://www.npmjs.com/package/captcha-canvas)**: verification captchas
- **[LMDB](https://www.mongodb.com)**: persistent local storage

## 🚀 Getting Started

### Prerequisites

- [Bun](https://bun.sh) >= 1.0
- A [Discord application](https://discord.com/developers/applications) with a bot token
- MongoDB instance (local or [Atlas](https://www.mongodb.com/atlas))
- (Optional) Firebase project credentials

### Setup

Expand All @@ -72,7 +64,7 @@ Panda keeps DevHub engaging, organized, and fun — with community management, m
cp .env.example .env
```

Then set your Discord token and MongoDB URI in `.env`.
Then set your Discord token in `.env`.

4. **Run the bot**

Expand All @@ -81,13 +73,12 @@ Panda keeps DevHub engaging, organized, and fun — with community management, m
bun dev # development with watch mode
```

> [!TIP]
> Slash commands are registered automatically on startup. Set `REGISTER_COMMANDS=false` in `.env` to skip registration.

## 🤝 Contributing

We welcome contributions! Open an issue or submit a pull request — see [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guide.
We welcome contributions! Open an issue or submit a pull request.

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guide.

## 📜 License

Panda Bot is released under the **GPL-3.0** License. See [LICENSE](./LICENSE) for details.
Panda Bot is released under the **GPL-3.0** License. See [LICENSE](./LICENSE) for details.
Loading
Loading