diff --git a/userbot/__init__.py b/userbot/__init__.py index 076b1de..874b12e 100644 --- a/userbot/__init__.py +++ b/userbot/__init__.py @@ -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\((.+?)\)")