minor updates
This commit is contained in:
@@ -26,7 +26,27 @@ class Config(BaseSettings):
|
||||
|
||||
API_PORT: int = 8000
|
||||
|
||||
TELEGRAM_WEBHOOK_URL: str = "http://localhost:8000"
|
||||
TELEGRAM_WEBHOOK_DOMAIN: str = "localhost"
|
||||
TELEGRAM_WEBHOOK_SHEME: str = "https"
|
||||
TELEGRAM_WEBHOOK_PORT: int = 443
|
||||
|
||||
@property
|
||||
def TELEGRAM_WEBHOOK_URL(self) -> str:
|
||||
return f"{self.TELEGRAM_WEBHOOK_SHEME}://{self.TELEGRAM_WEBHOOK_DOMAIN}{
|
||||
f':{self.TELEGRAM_WEBHOOK_PORT}'
|
||||
if (
|
||||
(
|
||||
self.TELEGRAM_WEBHOOK_PORT != 80
|
||||
and self.TELEGRAM_WEBHOOK_SHEME == 'http'
|
||||
)
|
||||
or (
|
||||
self.TELEGRAM_WEBHOOK_PORT != 443
|
||||
and self.TELEGRAM_WEBHOOK_SHEME == 'https'
|
||||
)
|
||||
)
|
||||
else ''
|
||||
}"
|
||||
|
||||
TELEGRAM_BOT_SERVER: str = "https://api.telegram.org"
|
||||
TELEGRAM_BOT_SERVER_IS_LOCAL: bool = False
|
||||
TELEGRAM_BOT_TOKEN: str = "changethis"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from asyncio import sleep
|
||||
from contextlib import asynccontextmanager
|
||||
from typing import Callable, Any
|
||||
from aiogram import Bot, Dispatcher
|
||||
|
||||
Reference in New Issue
Block a user