-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* π * feat: db support π€ * feat: π * π * feat: π * feat: π * feat: π * feat: π * feat: π« * feat: π * feat: β¨ * feat: β¨ * update: π * feat: π« * feat: π« * feat: π Star Status Check * feat: check β status * update: requirements.txt π * update: readme βοΈ * π«π
- Loading branch information
Showing
7 changed files
with
295 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,68 @@ | ||
#*************# | ||
#** DISCORD **# | ||
#*************# | ||
|
||
# Discord 'App Token' and 'Client ID' | ||
# https://discord.com/developers/applications | ||
TOKEN= | ||
CLIENT_ID= | ||
|
||
# The target user/repo for the bot functions | ||
REPO_OWNER= | ||
GITHUB_REPO= | ||
|
||
# GitHub Oauth | ||
# set the callback to `http://localhost:8080/authorize` in the app portal | ||
DOMAIN=http://localhost:8080 | ||
GITHUB_CLIENT_ID= | ||
GITHUB_CLIENT_SECRET= | ||
SECRET_KEY= | ||
|
||
# Discord 'Role ID' (to give once the repo has been starred) | ||
ROLE_ID= | ||
# The 'Role ID' -> The role to give once the repo has been starred | ||
# The 'Server ID' -> The server where the bot is going to be used | ||
# The 'Channel ID' -> The channel where the bot is going to post | ||
ROLE_ID= | ||
GUILD_ID= | ||
CHANNEL_ID= | ||
|
||
# MongoDB database | ||
MONGO_HOST=mongodb # default: mongodb, put "localhost" if you don't use docker | ||
MONGO_DATABASE=mongodb # default: mongodb | ||
# Automatically check if the verified users removed their star on the repo | ||
# then remove their role on discord and update their status in the database | ||
# The delay is set in seconds, minimum 5 minutes if not set it will default to one hour | ||
# examples: 300 = 5 minutes, 3600 = 1 hour, 86400 = 1 day, 604800 = 1 week | ||
AUTOMATIC_CHECK=True | ||
AUTOMATIC_CHECK_DELAY=3600 | ||
|
||
# Custom "Useful links" Command | ||
# DO NOT LEAVE EMPTY | ||
COMMAND_NAME=hyperlinks #lowercase only | ||
COMMAND_DESCRIPTION=π Useful Links | ||
COMMAND_EXTENDED_DESCRIPTION= - Quick access to **GitHub**, **Discord**, **YouTube** and **Reddit** | ||
# NOTE: The 'COMMAND_NAME' only supports lowercase | ||
# REQUIRED: the bot will crash if these are not set | ||
COMMAND_NAME=hyperlinks | ||
COMMAND_DESCRIPTION=Useful Links | ||
COMMAND_EXTENDED_DESCRIPTION=- π Quick access to **GitHub**, **Discord**, **YouTube** and **Reddit** | ||
|
||
BTN1=GitHub | ||
BTN1=π»GitHub | ||
URL1=https://github.com/ | ||
|
||
BTN2=Discord | ||
BTN2=π¬Discord | ||
URL2=https://discord.com/ | ||
|
||
BTN3=Youtube | ||
BTN3=πΊYoutube | ||
URL3=https://youtube.com/ | ||
|
||
BTN4=Reddit | ||
BTN4=πReddit | ||
URL4=https://reddit.com | ||
|
||
#******************# | ||
#** GITHUB OAUTH **# | ||
#******************# | ||
|
||
# The target user/repo for the bot functions | ||
REPO_OWNER= | ||
GITHUB_REPO= | ||
|
||
# GitHub Oauth | ||
# https://github.com/settings/apps | ||
# set the callback to `http://localhost:8080/authorize` in the Github Developer settings | ||
DOMAIN=http://localhost:8080 | ||
GITHUB_CLIENT_ID= | ||
GITHUB_CLIENT_SECRET= | ||
|
||
# Set to a random secret key to secure the oauth (mix of letters, numbers, and symbols) | ||
SECRET_KEY=SecretKey | ||
|
||
#**********************# | ||
#** MONGODB DATABASE **# | ||
#**********************# | ||
|
||
# Host default: mongodb, use "localhost" if you don't use docker | ||
# Database default: mongodb | ||
MONGO_HOST=mongodb | ||
MONGO_DATABASE=mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
#tests scripts folder | ||
tests/ | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
# Discord-GitHub-bot | ||
|
||
## To Do: | ||
- π«github_oauth.py: | ||
- make check for star status of the specified repo (using the user's bearer tkn) | ||
- add db entry | ||
|
||
- π€ bot.py: | ||
- add db support | ||
- when auth -> timeout 1min -> check if db entry was made -> update verified user status -> update role | ||
|
||
- π add "admin" command to force re-verification and update roles assignments | ||
- π Implement a periodic check of the starred users or something like that | ||
- πͺ Split the user validation commands from the other github menu? | ||
- π²οΈ Add functions to the bot (<ins>5 buttons max</ins>) | ||
- example: | ||
![image](https://github.com/fuegovic/Discord-GH-bot/assets/32828263/86b90c99-48f4-4c13-9b96-df552b9b9466) | ||
- π Documentation, how to use and configure | ||
- ... π | ||
- π Documentation, how to use and configure | ||
- ~~βRemove role if the user validation shows `starred_repo: false`~~ | ||
- ~~π¦ Make it pretty (organize the slash commands)~~ | ||
- ~~πͺ Split the user validation commands from the other github menu?~~ | ||
- ~~π add "admin" command to force re-verification and update roles assignments~~ | ||
- ~~π Implement a periodic check of the starred users or something like that~~ | ||
- ~~π«΅ Make the bot assign a role~~ | ||
- ~~β Verify the users that used the github oauth~~ | ||
- ~~π Make `requirements.txt`~~ | ||
- ~~π Put everything in a docker container for easier deployment~~ | ||
- ~~πΌοΈ Better page for successful login~~ | ||
- ~~π€ Make sur the API handles multiple users using the bot at once~~ | ||
- ... π |
Oops, something went wrong.