xteamki commited on
Commit
241dec4
·
verified ·
1 Parent(s): 43c1f9a

Update plugins/alive.py

Browse files
Files changed (1) hide show
  1. plugins/alive.py +38 -2
plugins/alive.py CHANGED
@@ -162,8 +162,7 @@ async def live_video(event):
162
  await event.respond(f"An error occurred: {e}")
163
 
164
 
165
- #@in_pattern("aline", owner=False)
166
- @xteam_cmd(pattern="alive$")
167
  async def alive_inline_handler(ult):
168
  start = time.time()
169
 
@@ -218,3 +217,40 @@ async def handle_delete_callback(event):
218
  except Exception as e:
219
  print(f"Gagal menghapus pesan: {e}")
220
  await event.answer("Gagal menghapus pesan.", alert=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  await event.respond(f"An error occurred: {e}")
163
 
164
 
165
+ @in_pattern("Alive", owner=False)
 
166
  async def alive_inline_handler(ult):
167
  start = time.time()
168
 
 
217
  except Exception as e:
218
  print(f"Gagal menghapus pesan: {e}")
219
  await event.answer("Gagal menghapus pesan.", alert=True)
220
+
221
+
222
+
223
+ @xteam_cmd(pattern="alive$")
224
+ async def alive_inline_handler(ult):
225
+ start = time.time()
226
+
227
+ end = round((time.time() - start) * 1000) # This 'end' variable seems unused in the final message.
228
+ uptime = time_formatter((time.time() - start_time) * 1000)
229
+
230
+ message_text = (
231
+ f"<blockquote><b>✰ xᴛᴇᴀᴍ ᴜʀʙᴏᴛ ɪꜱ ᴀʟɪᴠᴇ ✰</b>\n\n"
232
+ f"✵ Owner : {OWNER_NAME}\n"
233
+ f"✵ Dc id : {ultroid_bot.dc_id}\n"
234
+ f"✵ Library : {lver}\n"
235
+ f"✵ Uptime : {uptime}\n"
236
+ f"✵ Telethon : {tver}\n"
237
+ f"✵ Pyrogram : {pver}\n"
238
+ f"✵ Python : {pyver()}</blockquote>"
239
+ )
240
+
241
+ # Menggabungkan tombol dalam list of lists untuk 'buttons' parameter.
242
+ buttons_markup = [
243
+ [
244
+ Button.inline("🏡 Modules 🏡", data="ownr"), # New data for modules
245
+ ],
246
+ ]
247
+
248
+ # Corrected line: Use ult.article directly
249
+ result = ult.article(
250
+ title="Bot Status",
251
+ text=message_text,
252
+ parse_mode="html",
253
+ buttons=buttons_markup
254
+ )
255
+
256
+ await ult.answer([result], cache_time=0)