forked from Bahhh123/python-checker-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (22 loc) · 660 Bytes
/
main.py
File metadata and controls
31 lines (22 loc) · 660 Bytes
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
30
31
#pylint:disable=C0114
import logging
import os
from pyrogram import Client
from pyrogram.errors import RPCError
from pyrogram.errors import BadRequest
# import asyncio
# from pyrogram.errors import FloodWait
# from pyrogram.handlers import MessageHandler
# os.environ['TZ'] = 'Asia/Kolkata'
logging.basicConfig(level=logging.INFO)
bot = Client(
'bot',
api_id= API_ID, #get it from https://my.telegram.org/auth
api_hash="API_HASH", #get it from https://my.telegram.org/auth
bot_token="BOT_TOKEN", #get it from @Botfather
plugins=dict(root="plugins"),
parse_mode="html")
try:
bot.run()
except Exception as e:
print(e)