diff options
| -rw-r--r-- | bot/cogs/reddit.py | 5 | ||||
| -rw-r--r-- | bot/cogs/site.py | 4 | 
2 files changed, 4 insertions, 5 deletions
| diff --git a/bot/cogs/reddit.py b/bot/cogs/reddit.py index f947a7d78..0d06e9c26 100644 --- a/bot/cogs/reddit.py +++ b/bot/cogs/reddit.py @@ -2,7 +2,7 @@ import asyncio  import logging  import random  import textwrap -from datetime import datetime +from datetime import datetime, timedelta  from typing import List  from discord import Colour, Embed, TextChannel @@ -130,7 +130,8 @@ class Reddit(Cog):          """Post the top 5 posts daily, and the top 5 posts weekly."""          # once we upgrade to d.py 1.3 this can be removed and the loop can use the `time=datetime.time.min` parameter          now = datetime.utcnow() -        midnight_tomorrow = now.replace(day=now.day + 1, hour=0, minute=0, second=0) +        tomorrow = now + timedelta(days=1) +        midnight_tomorrow = tomorrow.replace(hour=0, minute=0, second=0)          seconds_until = (midnight_tomorrow - now).total_seconds()          await asyncio.sleep(seconds_until) diff --git a/bot/cogs/site.py b/bot/cogs/site.py index d95359159..683613788 100644 --- a/bot/cogs/site.py +++ b/bot/cogs/site.py @@ -3,8 +3,7 @@ import logging  from discord import Colour, Embed  from discord.ext.commands import Bot, Cog, Context, group -from bot.constants import Channels, STAFF_ROLES, URLs -from bot.decorators import redirect_output +from bot.constants import URLs  from bot.pagination import LinePaginator  log = logging.getLogger(__name__) @@ -105,7 +104,6 @@ class Site(Cog):          await ctx.send(embed=embed)      @site_group.command(aliases=['r', 'rule'], name='rules') -    @redirect_output(destination_channel=Channels.bot, bypass_roles=STAFF_ROLES)      async def site_rules(self, ctx: Context, *rules: int) -> None:          """Provides a link to all rules or, if specified, displays specific rule(s)."""          rules_embed = Embed(title='Rules', color=Colour.blurple()) | 
