Carbon is a simple Discord bot that allows you to download video from the internet and send it to the channel.
The bot is hosted on Cloudflare Pages, so it's fast and serverless. Video download is done by cobalt.tools.
To deploy this project, just deploy regularly on Cloudflare Pages with the following secrets:
APPLICATION_ID
Discord application IDPUBLIC_KEY
Discord application public key. Found in the app's general information pageTOKEN
Discord bot tokenDEV_GUILD_ID
Discord server ID for development (optional)COBALT_API
cobalt.tools API endpoint
You can check example.dev.vars
for example values.
Then set the application's interaction endpoint to https://<your-deployment>.pages.dev/interactions
found in the Discord app's general information page.
After that, register the commands by opening https://<your-deployment>.pages.dev/register-commands
in your browser. It should return a JSON response with success message.
Invite the bot and you're done!
First, run the development server:
pnpm dev
Open http://localhost:5173 with your browser to see the result.
You can use something like ngrok or Cloudfare Tunnel to expose the local server to the internet.
This project is licensed under the MIT license. See the LICENSE file for more information.