Skip to content

A simple and serverless Discord video downloader bot

License

Notifications You must be signed in to change notification settings

Podter/carbon-bot

Repository files navigation

Carbon

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.

Demo

Try it out!

Deployment

To deploy this project, just deploy regularly on Cloudflare Pages with the following secrets:

  • APPLICATION_ID Discord application ID
  • PUBLIC_KEY Discord application public key. Found in the app's general information page
  • TOKEN Discord bot token
  • DEV_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!

Development

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.

License

This project is licensed under the MIT license. See the LICENSE file for more information.

About

A simple and serverless Discord video downloader bot

Resources

License

Stars

Watchers

Forks