fixes
This commit is contained in:
parent
cb13fbf21a
commit
12fc75622e
@ -14,15 +14,15 @@ class Bot():
|
||||
def __init__(self,
|
||||
session_file: str,
|
||||
config_file: str,
|
||||
api_id: str,
|
||||
api_hash: int,
|
||||
api_id: int,
|
||||
api_hash: str,
|
||||
owner_id: int) -> None:
|
||||
self.__config_file = config_file
|
||||
self.__config = None
|
||||
self.__me = None
|
||||
self.__owner_id = owner_id
|
||||
self.__reload()
|
||||
self.__bot = TelegramClient(session_file, api_id, api_hash)
|
||||
self.__bot = TelegramClient(session=session_file, api_id=api_id, api_hash=api_hash)
|
||||
self.__weather_queue = Queue()
|
||||
|
||||
@self.__bot.on(events.NewMessage(incoming=True, pattern='!whoami'))
|
||||
|
@ -18,12 +18,14 @@ tz_msk = dt.timezone(offset=delta, name="MSK")
|
||||
|
||||
if __name__ == "__main__":
|
||||
session_file = os.environ['SESSION_FILE']
|
||||
api_id = os.environ['TG_APP_ID']
|
||||
app_id = int(os.environ['TG_APP_ID'])
|
||||
api_hash = os.environ['TG_APP_HASH']
|
||||
owner_id = int(os.environ['TG_OWNER_ID'])
|
||||
config_file = os.environ['CONFIG_FILE']
|
||||
logger.info(f"SESSION_FILE: {session_file}")
|
||||
logger.info(f"CONFIG_FILE: {config_file}")
|
||||
bot = Bot(session_file=session_file,
|
||||
api_id=api_id,
|
||||
api_id=app_id,
|
||||
api_hash=api_hash,
|
||||
config_file=config_file,
|
||||
owner_id=owner_id)
|
||||
|
Loading…
Reference in New Issue
Block a user