https://github.com/cybardev/pycord-template
Discord bot template using Pycord, with instructions on free Render deployment
https://github.com/cybardev/pycord-template
discord-bot pycord python template
Last synced: 10 months ago
JSON representation
Discord bot template using Pycord, with instructions on free Render deployment
- Host: GitHub
- URL: https://github.com/cybardev/pycord-template
- Owner: cybardev
- License: gpl-3.0
- Created: 2025-03-22T19:23:23.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-22T20:26:19.000Z (10 months ago)
- Last Synced: 2025-03-22T20:28:11.190Z (10 months ago)
- Topics: discord-bot, pycord, python, template
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pycord-template
Discord bot template using Pycord, with instructions on free Render deployment
## Usage
1. Click Use this template (green button, usually in the top-right area of this page)
2. Select "Create new repository"
3. In your repository, edit the following files:
- [README.md](./README.md) (this file) for documentation
- [TERMS.md](./TERMS.md) to reflect your bot's terms of service
- [PRIVACY.md](./PRIVACY.md) to reflect your bot's privacy policy
- [bot.py](./bot.py) for main bot functionality
- [render.yml](./render.yaml) for deployment configuration
- [requirements.txt](./requirements.txt) and [Dockerfile](./Dockerfile) if your bot requires additional dependencies
- [.envrc](./.envrc) to change dev shell method or adding environment variables to dev shells
- [shell.nix](./shell.nix) to modify the dev shell
4. Create a tagged release after you're done editing your bot, and let the GitHub Actions workflow run
5. Create a bot in the [Discord Developer Portal]( "link to Discord Developer Portal")
- copy the bot token and store it securely; this will be needed for deployment
6. Edit [render.yaml](./render.yaml) and set image URL to `ghcr.io//:latest`
7. Click on the Deploy to Render button under [Deployment](#deployment)
8. Add your bot token (from step 5) as the value of Environment Variable `BOT_TOKEN` and create the web service
9. Save the public URL of the web service (in the format `https://.onrender.com`)
- making a request at this link (in a browser or programmatically) will wake up the bot when Render spins it down due to idleness (it's a free tier limitation; to have your bot always on, upgrade and change service type to [background worker]( "Render Background Workers documentation"))
10. Go to the Settings page of the deployed web service from your Render Dashboard and copy the Render Deploy Hook URL
11. Add a repository secret called `RENDER_DEPLOY_HOOK` and paste the copied value from the previous step
12. Add your bot to a Discord server and see it in action
## Deployment
[](https://render.com/deploy)
**PS**: If the above button does not work, you can replace the link (in the last parentheses) with this format:
- `https://render.com/deploy?repo=https://github.com///tree/`