N
N
NbUser1432021-01-09 23:28:45
Python
NbUser143, 2021-01-09 23:28:45

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

1 answer(s)
A
Alexander, 2021-01-09
@Alexandre888

https://stackoverflow.com/questions/11685936/why-a...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question