fix: use App.HostName (if set) in /about
oh yeah and we're also moving that strange ternary to main.py Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
a41417ee84
commit
d363fa9afd
3 changed files with 6 additions and 4 deletions
|
@ -26,6 +26,7 @@ async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No
|
|||
|
||||
|
||||
async def about_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
||||
import main
|
||||
from main import config
|
||||
reply_markup = None
|
||||
source_url = config.get('General', 'SourceUrl')
|
||||
|
@ -42,7 +43,7 @@ async def about_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> N
|
|||
f"{context.bot.first_name} is an inline image grabber written in python that grabs images from Danbooru "
|
||||
f"(or other similar services).\n\n"
|
||||
f"{html_parser.bold("currently configured instance:")}\n"
|
||||
f"{html_parser.italic(config.get('App', 'Name'))} ({config.get('App', 'Host')})",
|
||||
f"{html_parser.italic(config.get('App', 'Name'))} ({main.hostname})",
|
||||
parse_mode=ParseMode.HTML,
|
||||
reply_markup=reply_markup
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue