-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirst.py
29 lines (25 loc) · 953 Bytes
/
first.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import asyncio
import telegram
import os
from dotenv import load_dotenv
load_dotenv()
token = os.environ.get('token')
if not token:
exit("No token found")
async def main():
bot = telegram.Bot(token)
async with bot:
about_me = await bot.get_me()
# User(can_join_groups=True, can_read_all_group_messages=False, first_name='Kantoniko', id=5972296076, is_bot=True, supports_inline_queries=False, username='kantoniko_bot')
updates = await bot.get_updates()
#print(updates)
#for update in updates:
# print(update)
# print()
echar_lashon_id = -810127428
#first_name = updates[0].message.from_user.first_name
#user_id = updates[0].message.from_user.id
#await bot.send_message(text=f'Hi {first_name}', chat_id=user_id)
#await bot.send_message(text=f'Yo so Kantoniko', chat_id=echar_lashon_id)
if __name__ == '__main__':
asyncio.run(main())