Files
telegram-helper-bot/helper_bot/handlers/callback/constants.py
Andrey d128e54694 Refactor project structure and remove obsolete files
- Deleted the Makefile, `README_TESTING.md`, and several deployment scripts to streamline the project.
- Updated `.dockerignore` to exclude unnecessary development files.
- Adjusted database schema comments for clarity.
- Refactored metrics handling in middleware for improved command extraction and logging.
- Enhanced command mappings for buttons and callbacks in constants for better maintainability.
- Start refactor voice bot
2025-09-01 00:54:10 +03:00

42 lines
1.3 KiB
Python

from typing import Final, Dict
# Callback data constants
CALLBACK_PUBLISH = "publish"
CALLBACK_DECLINE = "decline"
CALLBACK_BAN = "ban"
CALLBACK_UNLOCK = "unlock"
CALLBACK_RETURN = "return"
CALLBACK_PAGE = "page"
# Content types
CONTENT_TYPE_TEXT = "text"
CONTENT_TYPE_PHOTO = "photo"
CONTENT_TYPE_VIDEO = "video"
CONTENT_TYPE_VIDEO_NOTE = "video_note"
CONTENT_TYPE_AUDIO = "audio"
CONTENT_TYPE_VOICE = "voice"
CONTENT_TYPE_MEDIA_GROUP = "^"
# Messages
MESSAGE_PUBLISHED = "Выложено!"
MESSAGE_DECLINED = "Отклонено!"
MESSAGE_USER_BANNED = "Пользователь заблокирован!"
MESSAGE_USER_UNLOCKED = "Пользователь разблокирован"
MESSAGE_ERROR = "Что-то пошло не так!"
MESSAGE_POST_PUBLISHED = "Твой пост был выложен🥰"
MESSAGE_POST_DECLINED = "Твой пост был отклонен😔"
MESSAGE_USER_BANNED_SPAM = "Ты заблокирован за спам. Дата разблокировки: {date}"
# Error messages
ERROR_BOT_BLOCKED = "Forbidden: bot was blocked by the user"
# Callback to command mapping for metrics
CALLBACK_COMMAND_MAPPING: Final[Dict[str, str]] = {
"publish": "publish",
"decline": "decline",
"ban": "ban",
"unlock": "unlock",
"return": "return",
"page": "page"
}