RuntimeWarning: coroutine 'UserMethods.get_me' was never awaited

Viewed 13

So I am learning the telethon library for Pythonm but right in the beggining I've ran into the error:

    /Users/user1/Desktop/TelegramBot/main.py:8: RuntimeWarning: coroutine 'UserMethods.get_me' was never awaited
  print(client.get_me())
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Running the following code:

import decouple
from telethon import TelegramClient


client = TelegramClient('testSesh', decouple.config('API_ID_TEST'), decouple.config('API_HASH_TEST'))
client.start()

print(client.get_me())

I have read the basic documentation for this module but I wasn't able to find the correct solution. Please, guys, help me :/

Thank you.

0 Answers
Related