Skip to content

Commit

Permalink
feat: reminder task loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyvy-vi committed Jul 15, 2021
1 parent 64eea80 commit 9d3c864
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 213 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DISCORD_TOKEN="" # Discord Bot Application Token
MONGO_URI="" # Mongo Connection URI string
PREFIX=""
DISCORD_GUILD_ID="" # ID of the guild this bot is supposed to run in.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
I did something on Saturday.
I also did some work on Sunday, and implemented XYZ.
```
- The bot would also send a weekly reminder to everyone in the bot's DB, to remind them that they need to report their progress for this week.

- The bot also sends a weekly reminder to everyone in the bot's DB, to remind them that they need to report their progress for this week. These are optional, and can be opted out of.
- Bonus: The bot keeps track of whether the person sticks to what they say they will do by checking if they received a checkmark emoji on their report from the guild leader or "verifier".

## How to contribute to this project?
Expand Down Expand Up @@ -78,14 +77,18 @@ This might be slightly confusing at first, due to the large amounts of ways of s
```
DISCORD_TOKEN="the token you just copied"
```
- It would be recommended that you set up a new test discord server, and invite the bot there. Also, you would have to turn on Developer Mode on discord(If you don't know how to do that, you can find out [here](https://helpdeskgeek.com/how-to/how-to-enable-and-use-developer-mode-on-discord/)). After doing that you can go to your server, right click on the server icon and click on `Copy ID` to copy the copy the `DISCORD_GUILD_ID` from there.
Open the `.env` file, and set the value-
```
DISCORD_GUILD_ID="<ID-number-that-you-just-copied>"
```
- Inviting this test-discord-bot to your server: Go to the `General Information` tab on that bot's dashboard on Discord Developers Portal, and copy the bot's Client ID:
Replace `<INSERT_CLIENT_ID>` in below with the Client ID you just copied-
```
https://discord.com/api/oauth2/authorize?client_id=<INSERT_CLIENT_ID>&permissions=85056&scope=bot
```
Visit the link, and add this bot to a test server.


#### **B. Set up the dev environment**
This project adds some tools and dependencies to the project, so that it is easier for you to pass the CI, and checks on the repo, and also to maintain some amount of clean formatting and clean code. This would also add some pre-push hooks to your project.

Expand Down
1 change: 1 addition & 0 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Bot(commands.Bot):
def __init__(self):
intents = Intents.default()
intents.members = True
intents.reactions = True

super().__init__(
command_prefix=consts.PREFIX, case_insensitive=True, intents=intents
Expand Down
79 changes: 0 additions & 79 deletions src/cogs/helpers.py

This file was deleted.

130 changes: 0 additions & 130 deletions src/cogs/standup.py

This file was deleted.

7 changes: 6 additions & 1 deletion src/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
PREFIX = os.getenv("PREFIX") or "^"
TOKEN = os.getenv("DISCORD_TOKEN") or "foo"
MONGO_URI = os.getenv("MONGO_URI") or "bar"
GUILD_ID = int(os.getenv("DISCORD_GUILD_ID") or "629411177947987986")

COGS = ["src.cogs.helpers", "src.cogs.standup"]
COGS = [
"src.commands.helpers",
"src.commands.standup",
"src.tasks.reminder"
]
# "src.cogs.help",
# "src.cogs.goals"]

Expand Down

0 comments on commit 9d3c864

Please sign in to comment.