Sorry, the title isn’t the best, but I wasn’t sure about what I would title this as.
Problem: I wanted to create a discord bot, I was thinking of using discord.py for this but I haven’t committed, and I want the discord bot to do mainly 2 things, read the its dms and notify me when a specific time has passed (so for example notify me about a week from the command inputted). Individually, they are pretty easy to implement, however, I’m not sure how I’d implement both of them at the same time.
I assumed that to check the time or notifications I’d need to run a while loop to check for time, and that the dms would act as like an alert or break or such in the loop. However, that woud lead to the issue of multiple dms around the notification time could delay the notification.
I tried using whatever threads functionality python has to parallelize both of these tasks, but I was unable to get it to work.
How would you go about trying to implement both of these problems?
2