diff options
Diffstat (limited to 'commands/meta.py')
-rw-r--r-- | commands/meta.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/commands/meta.py b/commands/meta.py index c98e770..5a61a84 100644 --- a/commands/meta.py +++ b/commands/meta.py @@ -11,22 +11,26 @@ from telegram import Update from telegram.ext import ContextTypes +from subprocess import check_output +from strings import ABOUT -async def about(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: - await update.message.reply_text(''' -Version InDev -python-cinema-club-bot is a bot for Telegram specialized for managing cinema club activities. This software is released as Public Domain using CC0 license. +VERSION="0.1" + -Project information: http://57.129.46.169/trac/wiki/python-cinema-club-bot -Source code: http://57.129.46.169/cgit/python-cinema-club-bot/ +def _get_commit_hash() -> str: + return check_output(['git', 'rev-parse', 'HEAD']).decode('ascii').strip() -Contributed in 2024 by Mikhail Kirillov (~w96k) <w96k@runbox.com> -To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. +def _get_commit_short_hash() -> str: + return check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip() -You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see: -<http://creativecommons.org/publicdomain/zero/1.0/> - ''') +async def about(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: + await update.message.reply_text( + ABOUT.format( + version=VERSION, + commit=_get_commit_short_hash(), + ) + ) |