https://github.com/buape/carbon
A fully-featured HTTP library for Discord bots
https://github.com/buape/carbon
buape bun cloudflare-workers discord hacktoberfest http nextjs nodejs
Last synced: 17 days ago
JSON representation
A fully-featured HTTP library for Discord bots
- Host: GitHub
- URL: https://github.com/buape/carbon
- Owner: buape
- License: mit
- Created: 2024-04-13T23:28:01.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-01T22:35:37.000Z (about 2 months ago)
- Last Synced: 2026-03-02T01:43:04.838Z (about 2 months ago)
- Topics: buape, bun, cloudflare-workers, discord, hacktoberfest, http, nextjs, nodejs
- Language: TypeScript
- Homepage: https://carbon.buape.com/
- Size: 7.73 MB
- Stars: 39
- Watchers: 2
- Forks: 25
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Carbon
Carbon is a fully typed Discord bot framework for TypeScript that helps you ship quickly with HTTP interactions first, then scale into richer features through plugins, reusable classes, and optional Gateway support without rewriting your architecture later.
## Features
- Build every common interaction type in one place: slash commands, user/message commands, buttons, select menus, and modals.
- Start with simple HTTP interactions, then add Gateway or Gateway Forwarder only when your bot needs non-interaction events.
- Run the same bot across Node.js, Bun, and Fetch-style runtimes like Cloudflare Workers or Next.js.
- Components can register themselves automatically, and you can still register them globally or per command when you need persistence.
- For quick flows, you can parse custom IDs cleanly and wait for a single component click with `replyAndWaitForComponent`.
- Use prechecks and wildcard handlers to add safety rules and fallback behavior without turning command code into a mess.
- Host multiple Discord applications from one deployment with `ClientManager`.
- Grow through plugins like Linked Roles, Command Data, Paginator, Sharding, and Voice.
- Tune request/event processing with queue lanes, concurrency controls, and runtime metrics when traffic grows.
## Installation
To get started with Carbon, you can check out the [Getting Started](https://carbon.buape.com/carbon/getting-started) guides for your preferred platform.
## Useful Links
- [Documentation](https://carbon.buape.com/carbon)
- [Discord](https://go.buape.com/carbon)
- [NPM](https://www.npmjs.com/package/@buape/carbon)
- [Cloudflare Workers Demo](https://github.com/buape/carbon/tree/main/apps/cloudo)
- [Node.js Demo](https://github.com/buape/carbon/tree/main/apps/rocko)
## Contributing
We welcome contributions to Carbon! If you're interested in contributing, please check out the [Contributing Guide](https://carbon.buape.com/even-more/contributing) for more information, and join our [Discord](https://go.buape.com/carbon) to get involved!
