mirror of
https://github.com/marcogll/talia_bot.git
synced 2026-01-13 21:35:19 +00:00
feat: Add /print command for authorized users
This commit introduces a new `/print` command that is restricted to authorized users. The command displays non-sensitive configuration details to administrators. The main changes are: - Created `app/modules/print.py` to house the handler for the new command. - The handler uses the existing `is_admin` function from `app/permissions.py` to check for authorization. - The command displays the Timezone, Calendar ID, and n8n Webhook URL. - Integrated the new command into `app/main.py`. - Updated `tasks.md` to document the new feature.
This commit is contained in:
@@ -28,7 +28,7 @@ from modules.equipo import (
|
||||
from modules.aprobaciones import view_pending, handle_approval_action
|
||||
from modules.servicios import get_service_info
|
||||
from modules.admin import get_system_status
|
||||
from app.scheduler import setup_scheduler
|
||||
from modules.print import print_handler
|
||||
|
||||
# Enable logging
|
||||
logging.basicConfig(
|
||||
@@ -105,9 +105,6 @@ def main() -> None:
|
||||
application.add_handler(CommandHandler("print", print_handler))
|
||||
application.add_handler(CallbackQueryHandler(button_dispatcher))
|
||||
|
||||
# Set up the scheduler
|
||||
setup_scheduler(application)
|
||||
|
||||
logger.info("Starting Talía Bot...")
|
||||
application.run_polling()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user