Skip to content

Timerole / Runtimerole error #217

Description

@JJW8071

if check_time >= utcnow:

Exception in command 'runtimerole'
Traceback (most recent call last):
File "C:\Users\jason\challengerenv\lib\site-packages\discord\ext\commands\core.py", line 229, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\jason\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Challenger\cogs\CogManager\cogs\timerole\timerole.py", line 74, in runtimerole
await self.timerole_update()
File "C:\Users\jason\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Challenger\cogs\CogManager\cogs\timerole\timerole.py", line 287, in timerole_update
if check_time >= utcnow:
TypeError: can't compare offset-naive and offset-aware datetimes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\jason\challengerenv\lib\site-packages\discord\ext\commands\bot.py", line 1350, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\jason\challengerenv\lib\site-packages\discord\ext\commands\core.py", line 1023, in invoke
await injected(*ctx.args, **ctx.kwargs) # type: ignore
File "C:\Users\jason\challengerenv\lib\site-packages\discord\ext\commands\core.py", line 238, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: can't compare offset-naive and offset-aware datetimes

287 if check_time.timestamp() >= utcnow.timestamp():

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions