i need to create a command in my userbot that if the user use it his username will be (normal username) + ONLINE. Im trying to use get_me() for getting the username but i get all the infos. I need only username... How i can do this?
Asked
Active
Viewed 441 times
-1
-
could you add some more information around the library you're using and include any code you currently have – PirateNinjas Apr 23 '20 at 14:21
1 Answers
0
get_me()
should return a dictionary like this:
{'first_name': 'Your Bot', 'username': 'YourBot', 'id': 123456789}
You can access the values of a dictionary with the corresponding key. If you want the username, it would look like this:
get_me()['username']

Chrissu
- 382
- 1
- 13