mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-22 21:16:42 +00: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
|
is_normal |= not inline
|
||||||
if isinstance(button, custom.Button):
|
if isinstance(button, custom.Button):
|
||||||
if button.callback:
|
if button.callback:
|
||||||
|
self.remove_event_handler(
|
||||||
|
button.callback, events.CallbackQuery)
|
||||||
|
|
||||||
self.add_event_handler(
|
self.add_event_handler(
|
||||||
button.callback,
|
button.callback,
|
||||||
events.CallbackQuery(data=button.data)
|
events.CallbackQuery(data=button.data)
|
||||||
|
Loading…
Reference in New Issue
Block a user