xdragxt commited on
Commit
bc10a60
Β·
verified Β·
1 Parent(s): e6d1dc8

Update ubot/core/function/plugins.py

Browse files
Files changed (1) hide show
  1. ubot/core/function/plugins.py +16 -12
ubot/core/function/plugins.py CHANGED
@@ -22,10 +22,12 @@ async def loadPlugins():
22
  HELP_COMMANDS[
23
  imported_module.__MODULE__.replace(" ", "_").lower()
24
  ] = imported_module
25
- print(f"[πŸ€– @{bot.me.username} πŸ€–] [πŸ”₯ TELAH BERHASIL DIAKTIFKAN! πŸ”₯]")
26
- await bot.send_message(
27
- OWNER_ID,
28
- f"""
 
 
29
  <b>πŸ€– {bot.me.mention} Aktif</b>
30
 
31
  <b>Modules : {len(HELP_COMMANDS)}</b>
@@ -33,15 +35,17 @@ async def loadPlugins():
33
  <b>Pyrogram : {__version__}</b>
34
  <b>Users : {len(ubot._ubot)}</b>
35
  """,
36
- reply_markup=InlineKeyboardMarkup(
37
- [
38
  [
39
- InlineKeyboardButton("Git Pull", callback_data="gitpull"),
40
- InlineKeyboardButton("Restart", callback_data="restart"),
41
- ],
42
- ]
43
- ),
44
- )
 
 
 
45
 
46
 
47
  @PY.CALLBACK("0_cls")
 
22
  HELP_COMMANDS[
23
  imported_module.__MODULE__.replace(" ", "_").lower()
24
  ] = imported_module
25
+ if bot.me:
26
+ username = bot.me.username or "bot"
27
+ print(f"[πŸ€– @{username} πŸ€–] [πŸ”₯ TELAH BERHASIL DIAKTIFKAN! πŸ”₯]")
28
+ await bot.send_message(
29
+ OWNER_ID,
30
+ f"""
31
  <b>πŸ€– {bot.me.mention} Aktif</b>
32
 
33
  <b>Modules : {len(HELP_COMMANDS)}</b>
 
35
  <b>Pyrogram : {__version__}</b>
36
  <b>Users : {len(ubot._ubot)}</b>
37
  """,
38
+ reply_markup=InlineKeyboardMarkup(
 
39
  [
40
+ [
41
+ InlineKeyboardButton("Git Pull", callback_data="gitpull"),
42
+ InlineKeyboardButton("Restart", callback_data="restart"),
43
+ ],
44
+ ]
45
+ ),
46
+ )
47
+ else:
48
+ print(f"[πŸ€– Bot πŸ€–] [πŸ”₯ TELAH BERHASIL DIAKTIFKAN! πŸ”₯]")
49
 
50
 
51
  @PY.CALLBACK("0_cls")