Skip to content

#9675

Closed Answered by Rapptz
FreakMediaLP asked this question in Q&A
#9675
Dec 10, 2023 · 1 comment
Discussion options

You must be logged in to vote

The simplest way to do this is by overriding Client.on_error and calling a method on your cog, e.g.

class MyBot(commands.Bot):
    async def on_error(self, event, *args, **kwargs):
        cog = self.get_cog('MyCog')
        if cog is not None:
            await cog.custom_on_error(event, *args, **kwargs)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FreakMediaLP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants