#Does not find a class in cog

1 messages · Page 1 of 1 (latest)

tranquil granite
#

Error

Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\User\Documents\Testings\CMSelfBot\module\vacancy.py", line 149, in on_ready
    self.bot.add_view(Butyesno())
NameError: name 'Butyesno' is not defined

Code - https://paste.fuix.net/jgh6PoP

dapper elm
tranquil granite
#
AttributeError: module 'discord' has no attribute 'get_channel'
dapper elm
#

self.bot.get_channel

tranquil granite
#

I'm sorry, but I don't understand how to implement this variable.

#

Here's where I put it

def __init__(self, bot):
    self.bot = bot```
fluid pulsar
#

use interaction.client instead of self.bot

tranquil granite
#

Thanks