This error practically always means that there is an await
keyword missing somewhere behind an async
function. Check everywhere where send_chat
is called.
Also, it looks like you are making some sort of recursive call of send_chat
at line t = asyncio.get_event_loop().create_task(send_chat)
, which is probably not intended.