TypeError: Start_Handler.start_message() missing 1 required positional argument: 'message' #1999
Replies: 2 comments
-
You cannot use method to handle message directly. I do it like this:
I don't like it but at least it works. |
Beta Was this translation helpful? Give feedback.
-
It feels strange to be encapsulated in this way. Is there a good way to wrap bot.message_handler in Start_Handler if I want to. I want to handle start and three to five other commands in Start_Handler.
It feels strange to be encapsulated in this way. Is there a good way to wrap bot.message_handler in Start_Handler if I want to. I want to handle start and three to five other commands in Start_Handler. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please answer these questions before submitting your issue. Thanks!
latest
win
3.7
I would like to encapsulate the functionality as a class, but when I try I get some strange errors. How should I encapsulate them correctly?
`
class Start_Handler(object):
`
Start_Handler(bot=bot).start_message()
TypeError: Start_Handler.start_message() missing 1 required positional argument: 'message'
Beta Was this translation helpful? Give feedback.
All reactions