#AttributeError 'Reminder' object has no attribute 'client'

1 messages · Page 1 of 1 (latest)

fair coral
#

Hey, I've had this problem for a while now and I don't know what it could be or how to fix the problem. Maybe someone can help me here

Class:

class Reminder(commands.Cog):
    def __int__(self, client: commands.Bot):
        self.client = client
        self.role = 1021802452049207427
        self.channel = 1010462644911738910```
crude copper
#

and what is the error now?

fair coral
#
Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\imene\Desktop\LiTKiDS\venv\lib\site-packages\discord\client.py", line 382, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\imene\Desktop\LiTKiDS\cogs\reminder.py", line 20, in on_ready
    self.client.loop.create_task(self.checkEndedBump())
AttributeError: 'Reminder' object has no attribute 'client'```
#

ah i have the Error fixed

crude copper
#

you use for a task "self.taskname.start()"

fair coral
#

No, all good. works now, I wrote int instead of init.