randydev commited on
Commit
4f129a5
·
verified ·
1 Parent(s): 53826cc

Update Akeno/plugins/alive.py

Browse files
Files changed (1) hide show
  1. Akeno/plugins/alive.py +5 -14
Akeno/plugins/alive.py CHANGED
@@ -141,7 +141,6 @@ def old_alive_pic():
141
  file.write(response)
142
  return file_path
143
 
144
-
145
  @Akeno(
146
  ~filters.scheduled
147
  & command(["alive"])
@@ -152,23 +151,15 @@ async def alive(client: Client, message: Message):
152
  pro = await message.reply_text("Processing ...")
153
  img = await db.get_env(ENV_TEMPLATE.alive_pic)
154
  if not img:
155
- img = old_alive_pic()
156
  uptime = get_readable_time(time.time() - StartTime)
157
  caption = await alive_template(client.me.first_name, uptime)
158
  if img.endswith(".mp4"):
159
- await pro.edit_media(
160
- media=InputMediaVideo(
161
- img,
162
- caption=caption
163
- )
164
- )
165
  else:
166
- await pro.edit_media(
167
- media=InputMediaPhoto(
168
- img,
169
- caption=caption
170
- )
171
- )
172
 
173
  module = modules_help.add_module("alive", __file__)
174
  module.add_command("alive", "Get the alive message of the bot.")
 
141
  file.write(response)
142
  return file_path
143
 
 
144
  @Akeno(
145
  ~filters.scheduled
146
  & command(["alive"])
 
151
  pro = await message.reply_text("Processing ...")
152
  img = await db.get_env(ENV_TEMPLATE.alive_pic)
153
  if not img:
154
+ img = "https://telegra.ph/file/316e8e52a723e06d59bbf.jpg"
155
  uptime = get_readable_time(time.time() - StartTime)
156
  caption = await alive_template(client.me.first_name, uptime)
157
  if img.endswith(".mp4"):
158
+ await message.reply_video(img, caption)
159
+ await pro.delete()
 
 
 
 
160
  else:
161
+ await message.reply_photo(img, caption)
162
+ await pro.delete()
 
 
 
 
163
 
164
  module = modules_help.add_module("alive", __file__)
165
  module.add_command("alive", "Get the alive message of the bot.")