Answer the question
In order to leave comments, you need to log in
How to solve the problem with finding a function?
Hello! I recently encountered such a problem that the class does not see the function.
Please tell me how this can be corrected.
Error: AttributeError: 'Habr' object has no attribute 'check_status'
class Habr(commands.Cog):
def __init__(self, client):
self.client = client
def check_status(self, status: int, name: str, guild_id: int):
. . .
def check_embed(self, text_embed: str, name: str, guild_id: int):
. . .
@commands.command()
async def test(self, ctx):
name = 'test'
guild_id = ctx.message.guild.id
status = 0
embed_text = 'None'
status_result = self.check_status(status, name, guild_id)
embed_result = self.check_embed(text_embed, name, guild_id)
print('habr')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question