#๐Ÿ”’ Event handling overlap

10 messages ยท Page 1 of 1 (latest)

rose shoal
#

I use disnake library for my discord bot and it has such thing as listeners. Which are, basically, handling the on_button_click and other events. I use different listeners via @commands.Cog.listener() in separate files, both are on_button_click type. I made sure event handlers are assigned properly inside of their classes. However, when the button is pressed I still get an error from both commands even tho only one was executed. I think the cause of the problem may be importing EconomyLogic class in the both cogs.

subtle magnetBOT
#

@rose shoal

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

rose shoal
deft comet
rose shoal
deft comet
rose shoal
#

Thank you, also in that case would I need to rather import the variables or make an __init__ with all the variables like user, avatarUrl, etc?

deft comet
subtle magnetBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.