Discord Starguard is a bot that integrates Discord with GitHub. It provides various functionalities such as user validation, role assignment, and periodic checks of starred users. It's perfect for developers who want to reward their supporters and grow their community.
- โ๏ธ User Validation: The bot verifies users with GitHub OAuth.
- ๐ซ Role Assignment: The bot assigns a role if the users have starred a specified repo.
- ๐ Periodic Checks: The bot periodically checks the starred users.
The bot uses slash commands for operation. Here are some of the commands:
/verify
: Validates a user and checks if they have starred the repository./checkstars
: Forces re-verification and updates role assignments./starcount
: Output the te total amount of stargazers for specified repo/your-custom-name
A customizable command that displays 4 buttons to access 4 custom URLs of your choice/help
: Command names and usage
Here's an example of the /verify
command:
- ๐งโ๐คโ๐ง Clone the repository.
- โ๏ธ Configure the .env file
- ๐ณ Run the bot in a Docker container for easier deployment.
To run this project, you need to have the following:
- Docker
- A Discord bot token and secret
- A GitHub client ID and secret
- A GitHub personal access token
- This project uses the following libraries and resources:
- Flask A lightweight web framework for Python that provides tools and features to create web applications.
- python-dotenv A module that reads key-value pairs from a .env file and sets them as environment variables.
- authlib A library that implements various authentication protocols and specifications, such as OAuth, OpenID Connect, and JWT.
- pymongo A Python driver for MongoDB that allows you to work with MongoDB databases and collections in Python.
- Interactions.py A library that simplifies the creation and handling of Discord slash commands and components in Python.
- discord_py_interactions A library that extends discord.py with support for Discord interactions, such as slash commands, buttons, and select menus.
- requests A popular HTTP library for Python that allows you to send and receive HTTP requests in a simple way.