Skip to content

Commit

Permalink
πŸŒŸπŸ¦‹πŸ˜ˆβ›”πŸ”ŽπŸ™‹
Browse files Browse the repository at this point in the history
* πŸ™ˆ

* 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
fuegovic authored Oct 31, 2023
1 parent c34ce03 commit 86eefab
Show file tree
Hide file tree
Showing 7 changed files with 295 additions and 114 deletions.
77 changes: 53 additions & 24 deletions .env.example
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.py[cod]
*$py.class

#tests scripts folder
tests/

# C extensions
*.so

Expand Down
24 changes: 9 additions & 15 deletions README.md
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~~
- ... πŸ‘€
Loading

0 comments on commit 86eefab

Please sign in to comment.