Open RecursiveHook opened 4 years ago
Example of using the Bungie request handler: https://github.com/Ghost-Proxy/Voluspa/blob/develop/cogs/members.py#L149-L157
And then let's create a new cog called roster_reminder.py and go with the below pattern for now. :+1:
from discord.ext import tasks, commands
class RosterReminder(commands.Cog):
def __init__(self):
self.index = 0
self.printer.start()
def cog_unload(self):
self.printer.cancel()
@tasks.loop(hours=18.0)
async def printer(self):
print(self.index)
self.index += 1
Three parts to the feature:
use a discord py background task firing every ~18 hrs https://discordpy.readthedocs.io/en/latest/ext/tasks/
which then uses an async request to hit the bungie endpoint https://bungie-net.github.io/#GroupV2.GetPendingMemberships
if returned list is not empty send a message to vanguard-warmind channel.