Skip to content

Commit

Permalink
Fix close only dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ximfine authored May 13, 2021
1 parent 22ed912 commit 402f52d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions userbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,14 @@ async def on_plug_in_callback_query_handler(event):
reply_pop_up_alert = "Please make for yourself, don't use my bot!"
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)

@tgbot.on(events.CallbackQuery(data=b'close'))
async def close(event):
await event.edit("Button closed!", buttons=Button.clear())

@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"close")))
async def on_plug_in_callback_query_handler(event):
if event.query.user_id == uid: # pylint:disable=E0602
await event.edit("Button closed!")
else:
reply_pop_up_alert = f"Silahkan Deploy XBOT-REMIX\nUntuk menggunakan bot seperti ini!"
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)

@tgbot.on(
events.callbackquery.CallbackQuery( # pylint:disable=E0602
data=re.compile(rb"helpme_prev\((.+?)\)")
Expand Down

0 comments on commit 402f52d

Please sign in to comment.