Jishu Developer commited on
Commit
1ec48c6
Β·
unverified Β·
1 Parent(s): fcd00e0

Update bot.py

Browse files
Files changed (1) hide show
  1. bot.py +10 -28
bot.py CHANGED
@@ -1,11 +1,3 @@
1
- # Jishu Developer
2
- # Don't Remove Credit πŸ₯Ί
3
- # Telegram Channel @Madflix_Bots
4
- # Backup Channel @JishuBotz
5
- # Developer @JishuDeveloper
6
-
7
-
8
-
9
  from aiohttp import web
10
  from plugins import web_server
11
  import pyromod.listen
@@ -19,8 +11,6 @@ import pyrogram.utils
19
  pyrogram.utils.MIN_CHANNEL_ID = -1009999999999
20
 
21
 
22
- name ="""By @Madflix_Bots From Telegram"""
23
-
24
 
25
  class Bot(Client):
26
  def __init__(self):
@@ -28,9 +18,7 @@ class Bot(Client):
28
  name="Bot",
29
  api_hash=API_HASH,
30
  api_id=API_ID,
31
- plugins={
32
- "root": "plugins"
33
- },
34
  workers=TG_BOT_WORKERS,
35
  bot_token=BOT_TOKEN
36
  )
@@ -50,31 +38,25 @@ class Bot(Client):
50
  self.invitelink = link
51
  except Exception as a:
52
  self.LOGGER(__name__).warning(a)
53
- self.LOGGER(__name__).warning("Bot can't Export Invite link from Force Sub Channel!")
54
- self.LOGGER(__name__).warning(f"Please Double check the FORCE_SUB_CHANNEL value and Make sure Bot is Admin in channel with Invite Users via Link Permission, Current Force Sub Channel Value: {FORCE_SUB_CHANNEL}")
55
- self.LOGGER(__name__).info("\nBot Stopped. https://t.me/MadflixBots_Support for support")
56
  sys.exit()
57
 
58
  try:
59
  db_channel = await self.get_chat(CHANNEL_ID)
60
  self.db_channel = db_channel
61
- test = await self.send_message(chat_id = db_channel.id, text = "Test Message")
62
  await test.delete()
63
  except Exception as e:
64
  self.LOGGER(__name__).warning(e)
65
- self.LOGGER(__name__).warning(f"Make Sure bot is Admin in DB Channel, and Double check the CHANNEL_ID Value, Current Value {CHANNEL_ID}")
66
- self.LOGGER(__name__).info("\nBot Stopped. Join https://t.me/MadflixBots_Support for support")
67
  sys.exit()
68
 
69
  self.set_parse_mode(ParseMode.HTML)
70
- self.LOGGER(__name__).info(f"Bot Running..!\n\nCreated by \nhttps://t.me/Madflix_Bots")
71
- self.LOGGER(__name__).info(f"""
72
- ──╔╦══╦═══╦╗─╔╦╗─╔╦══╗╔═══╦════╦════╗
73
- ──║╠╣╠╣╔═╗║║─║║║─║║╔╗║║╔═╗║╔╗╔╗╠══╗═║
74
- β”€β”€β•‘β•‘β•‘β•‘β•‘β•šβ•β•β•£β•šβ•β•β•‘β•‘β”€β•‘β•‘β•šβ•β•šβ•£β•‘β”€β•‘β• β•β•‘β•‘β•šβ•β”€β•”β•β•”β•
75
- β•”β•—β•‘β•‘β•‘β•‘β•šβ•β•β•—β•‘β•”β•β•—β•‘β•‘β”€β•‘β•‘β•”β•β•—β•‘β•‘β”€β•‘β•‘β”€β•‘β•‘β”€β”€β•”β•β•”β•
76
- β•‘β•šβ•β• β•£β• β•£β•šβ•β•β•‘β•‘β”€β•‘β•‘β•šβ•β•β•‘β•šβ•β•β•‘β•šβ•β•β•‘β”€β•‘β•‘β”€β•”β•β•β•šβ•β•—
77
- β•šβ•β•β•©β•β•β•©β•β•β•β•©β•β”€β•šβ•©β•β•β•β•©β•β•β•β•©β•β•β•β•β”€β•šβ•β”€β•šβ•β•β•β•β•""")
78
  self.username = usr_bot_me.username
79
  #web-response
80
  app = web.AppRunner(await web_server())
@@ -84,7 +66,7 @@ class Bot(Client):
84
 
85
  async def stop(self, *args):
86
  await super().stop()
87
- self.LOGGER(__name__).info("Bot stopped.")
88
 
89
 
90
 
 
 
 
 
 
 
 
 
 
1
  from aiohttp import web
2
  from plugins import web_server
3
  import pyromod.listen
 
11
  pyrogram.utils.MIN_CHANNEL_ID = -1009999999999
12
 
13
 
 
 
14
 
15
  class Bot(Client):
16
  def __init__(self):
 
18
  name="Bot",
19
  api_hash=API_HASH,
20
  api_id=API_ID,
21
+ plugins={"root": "plugins"},
 
 
22
  workers=TG_BOT_WORKERS,
23
  bot_token=BOT_TOKEN
24
  )
 
38
  self.invitelink = link
39
  except Exception as a:
40
  self.LOGGER(__name__).warning(a)
41
+ self.LOGGER(__name__).warning("Bot Can't Export Invite link From Force Sub Channel!")
42
+ self.LOGGER(__name__).warning(f"Please Double Check The FORCE_SUB_CHANNEL Value And Make Sure Bot Is Admin In Channel With Invite Users Via Link Permission, Current Force Sub Channel Value: {FORCE_SUB_CHANNEL}")
43
+ self.LOGGER(__name__).info("\nBot Stopped. https://t.me/MadflixBots_Support For Support")
44
  sys.exit()
45
 
46
  try:
47
  db_channel = await self.get_chat(CHANNEL_ID)
48
  self.db_channel = db_channel
49
+ test = await self.send_message(chat_id = db_channel.id, text = "Hey πŸ–")
50
  await test.delete()
51
  except Exception as e:
52
  self.LOGGER(__name__).warning(e)
53
+ self.LOGGER(__name__).warning(f"Make Sure Bot Is Admin In DB Channel, And Double Check The CHANNEL_ID Value, Current Value: {CHANNEL_ID}")
54
+ self.LOGGER(__name__).info("\nBot Stopped. Join https://t.me/MadflixBots_Support For Support")
55
  sys.exit()
56
 
57
  self.set_parse_mode(ParseMode.HTML)
58
+ self.LOGGER(__name__).info(f"Bot Running...!\n\nCreated By \nhttps://t.me/Madflix_Bots")
59
+ self.LOGGER(__name__).info(f"""γƒŸπŸ’– MADFLIX BOTZ πŸ’–ε½‘""")
 
 
 
 
 
 
60
  self.username = usr_bot_me.username
61
  #web-response
62
  app = web.AppRunner(await web_server())
 
66
 
67
  async def stop(self, *args):
68
  await super().stop()
69
+ self.LOGGER(__name__).info("Bot Stopped...")
70
 
71
 
72