mirror of
https://github.com/PaiGramTeam/GramCore.git
synced 2024-11-16 03:55:27 +00:00
✨ Support custom Telegram API URL
This commit is contained in:
parent
1287afc9c5
commit
a03ba48c06
@ -67,6 +67,8 @@ class Application(Singleton):
|
||||
.get_updates_pool_timeout(application_config.update_pool_timeout)
|
||||
.defaults(Defaults(tzinfo=pytz.timezone("Asia/Shanghai")))
|
||||
.token(application_config.bot_token)
|
||||
.base_url(application_config.bot_base_url)
|
||||
.base_file_url(application_config.bot_base_file_url)
|
||||
.request(
|
||||
HTTPXRequest(
|
||||
connection_pool_size=application_config.connection_pool_size,
|
||||
|
@ -118,6 +118,10 @@ class ApplicationConfig(Settings):
|
||||
|
||||
bot_token: str = ""
|
||||
"""BOT的token"""
|
||||
bot_base_url: str = "https://api.telegram.org/bot"
|
||||
"""Telegram API URL"""
|
||||
bot_base_file_url: str = "https://api.telegram.org/file/bot"
|
||||
"""Telegram API File URL"""
|
||||
|
||||
owner: Optional[int] = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user