From 3b9abdc32074117607421d4ce883d38deb57442a Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 5 Dec 2017 11:45:11 +0000 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1afa256..dda4822 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Modumind -Experimental Discord bot +Discord booru bot with a side of management and tasking Credits: Rapptz/discord.py From 45395846c25f57ea9b97bcfc297cab2a836d48be Mon Sep 17 00:00:00 2001 From: Myned Date: Thu, 7 Dec 2017 15:52:04 -0500 Subject: [PATCH 2/2] WIP periodic tasks --- src/cogs/periodic.py | 6 ++++++ src/utils/utils.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cogs/periodic.py b/src/cogs/periodic.py index 76242d3..49a85c5 100644 --- a/src/cogs/periodic.py +++ b/src/cogs/periodic.py @@ -17,3 +17,9 @@ class Post: def __init__(self, bot): self.bot = bot + + for task in u.tasks['periodic_gpm']: + self.bot.loop.create_task() + + async def _check_posts(self, user, channel): + pass diff --git a/src/utils/utils.py b/src/utils/utils.py index 791b274..19a5948 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -68,7 +68,7 @@ def dump(obj, filename, *, json=False): settings = setdefault('misc/settings.pkl', {'del_ctx': [], 'prefixes': {}}) -tasks = setdefault('cogs/tasks.pkl', {'auto_del': [], 'auto_rev': []}) +tasks = setdefault('cogs/tasks.pkl', {'auto_del': [], 'auto_rev': [], 'periodic_gpm': []}) temp = setdefault('temp/temp.pkl', {'startup': ()}) RATE_LIMIT = 2.2