MCPcopy Create free account
hub / github.com/TechifyBots/Rename-Bot / main

Function main

bot.py:97–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95tb = TechifyBots()
96
97def main():
98 async def start_services():
99 if Config.STRING_SESSION:
100 await asyncio.gather(app.start(), tb.start())
101 else:
102 await asyncio.gather(tb.start())
103
104 # Idle mode start karo
105 await idle()
106
107 # Bot stop karo
108 if Config.STRING_SESSION:
109 await asyncio.gather(app.stop(), tb.stop())
110 else:
111 await asyncio.gather(tb.stop())
112
113 loop = asyncio.get_event_loop()
114 try:
115 loop.run_until_complete(start_services())
116 except KeyboardInterrupt:
117 print("\n🛑 Bot stopped by user!")
118 finally:
119 loop.close()
120
121if __name__ == "__main__":
122 warnings.filterwarnings("ignore", message="There is no current event loop")

Callers 1

bot.pyFile · 0.85

Calls 1

start_servicesFunction · 0.85

Tested by

no test coverage detected