app.bot.local_run.main()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nop 0
1
import asyncio
2
import os
3
4
from app.bot import bot
5
6
admin = os.getenv("TELEGRAM_ADMIN_ID")
7
8
if __name__ == "__main__":
9
10
    async def main():
11
        await bot.remove_webhook()
12
        await bot.send_message(chat_id=admin, text=await bot.get_me())
13
        await bot.polling(none_stop=True)
14
15
    loop = asyncio.get_event_loop()
16
    loop.run_until_complete(main())
17