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
This commit is contained in:
29
helper_bot/handlers/admin/constants.py
Normal file
29
helper_bot/handlers/admin/constants.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Constants for admin handlers"""
|
||||
|
||||
from typing import Final, Dict
|
||||
|
||||
# Admin button texts
|
||||
ADMIN_BUTTON_TEXTS: Final[Dict[str, str]] = {
|
||||
"BAN_LIST": "Бан (Список)",
|
||||
"BAN_BY_USERNAME": "Бан по нику",
|
||||
"BAN_BY_ID": "Бан по ID",
|
||||
"UNBAN_LIST": "Разбан (список)",
|
||||
"RETURN_TO_BOT": "Вернуться в бота",
|
||||
"CANCEL": "Отменить"
|
||||
}
|
||||
|
||||
# Admin button to command mapping for metrics
|
||||
ADMIN_BUTTON_COMMAND_MAPPING: Final[Dict[str, str]] = {
|
||||
"Бан (Список)": "admin_ban_list",
|
||||
"Бан по нику": "admin_ban_by_username",
|
||||
"Бан по ID": "admin_ban_by_id",
|
||||
"Разбан (список)": "admin_unban_list",
|
||||
"Вернуться в бота": "admin_return_to_bot",
|
||||
"Отменить": "admin_cancel"
|
||||
}
|
||||
|
||||
# Admin commands
|
||||
ADMIN_COMMANDS: Final[Dict[str, str]] = {
|
||||
"ADMIN": "admin",
|
||||
"TEST_METRICS": "test_metrics"
|
||||
}
|
||||
Reference in New Issue
Block a user