axololly / qoyyuum

0 stars 1 forks source link

Task is already launched and is not completed #1

Closed Qoyyuum closed 7 months ago

Qoyyuum commented 7 months ago

Traceback:

2024-05-06 22:03:37 ERROR    discord.client Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Users\User\.virtualenvs\TimezoneDiscordBot-2kis-YQC\Lib\site-packages\discord\client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\User\sides\TimezoneDiscordBot\timezones.py", line 149, in check_messages_per_minute
    self.reset_messages_per_minute.start()
  File "C:\Users\User\.virtualenvs\TimezoneDiscordBot-2kis-YQC\Lib\site-packages\discord\ext\tasks\__init__.py", line 392, in start
    raise RuntimeError('Task is already launched and is not completed.')
RuntimeError: Task is already launched and is not completed.

This happened when I tried to @TZBot /timezone set Brunei or any mention to the bot. Doing the slash command /timezone doesn't show up in the list of slash commands.

axololly commented 7 months ago

You need to sync your commands which should be just sync and then refreshing your Discord client for the updates to show. About the "reset_messages_per_minute" error, I think I updated the code to remove that and replace it with something else. Try downloading a new copy of the code and let me know what happens.

I'll also check if I've added a sync command for you.

axololly commented 7 months ago

The sync command was added in the README but no tin the real code, so I apologise for not updating it this morning. It should be all ready to go now.