Issue
I am New to Python Also Mew to Programing and if i did anything wrong please tell me
i have created a Telegram Bot(Simple Echo Bot) using Pyrogram which work's fine When i use uvloop the bot won't respond for any message's but i can Call a function
Here is The Code i Created: https://github.com/DeekshithSH/TelegramBot
Here is the main.py file:
from pyrogram import idle
from Test.Bot import TelegramBot
import uvloop
uvloop.install()
if sys.version_info[1] > 9:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
else:
loop = asyncio.get_event_loop()
async def main():
await TelegramBot.start()
print('Bot Started')
await idle()
loop.run_until_complete(main())
loop.close```
when i remove `uvloop.install()` the Bot work's fine
can anyone please help me
if you think the question badly writen you can edit it to improve it
the uvloop https://github.com/MagicStack/uvloop readme only show's single Example so i don't understand how to use it
Solution
i found answer for my problem i chnaged the following https://github.com/DeekshithSH/TelegramBot/commit/3f5d216a16ededd9146835525ca6a41bececc7cf
Answered By - DeekshithSH
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.