mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Make sure to not add callbacks from buttons= twice
This commit is contained in:
parent
24758b82ec
commit
7750c9ff2f
|
@ -31,6 +31,9 @@ class ButtonMethods(UpdateMethods):
|
|||
is_normal |= not inline
|
||||
if isinstance(button, custom.Button):
|
||||
if button.callback:
|
||||
self.remove_event_handler(
|
||||
button.callback, events.CallbackQuery)
|
||||
|
||||
self.add_event_handler(
|
||||
button.callback,
|
||||
events.CallbackQuery(data=button.data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user