Skip to content

Commit dc34913

Browse files
Félix Díez AriasFélix Díez Arias
authored andcommitted
feat(schedule-command): register /schedule in MessageOrchestrator
Add /schedule handler to both agentic and classic mode registration, gated on enable_scheduler. Add to get_bot_commands() for Telegram command menu visibility.
1 parent 832adae commit dc34913

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/bot/orchestrator.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ def _register_agentic_handlers(self, app: Application) -> None:
311311
]
312312
if self.settings.enable_project_threads:
313313
handlers.append(("sync_threads", command.sync_threads))
314+
if self.settings.enable_scheduler:
315+
from .handlers import schedule
316+
317+
handlers.append(("schedule", schedule.schedule_command))
314318

315319
for cmd, handler in handlers:
316320
app.add_handler(CommandHandler(cmd, self._inject_deps(handler)))
@@ -376,6 +380,10 @@ def _register_classic_handlers(self, app: Application) -> None:
376380
]
377381
if self.settings.enable_project_threads:
378382
handlers.append(("sync_threads", command.sync_threads))
383+
if self.settings.enable_scheduler:
384+
from .handlers import schedule
385+
386+
handlers.append(("schedule", schedule.schedule_command))
379387

380388
for cmd, handler in handlers:
381389
app.add_handler(CommandHandler(cmd, self._inject_deps(handler)))
@@ -420,6 +428,8 @@ async def get_bot_commands(self) -> list: # type: ignore[type-arg]
420428
]
421429
if self.settings.enable_project_threads:
422430
commands.append(BotCommand("sync_threads", "Sync project topics"))
431+
if self.settings.enable_scheduler:
432+
commands.append(BotCommand("schedule", "Manage scheduled jobs"))
423433
return commands
424434
else:
425435
commands = [
@@ -440,6 +450,8 @@ async def get_bot_commands(self) -> list: # type: ignore[type-arg]
440450
]
441451
if self.settings.enable_project_threads:
442452
commands.append(BotCommand("sync_threads", "Sync project topics"))
453+
if self.settings.enable_scheduler:
454+
commands.append(BotCommand("schedule", "Manage scheduled jobs"))
443455
return commands
444456

445457
# --- Agentic handlers ---

0 commit comments

Comments
 (0)