MCPcopy
hub / github.com/AstrBotDevs/AstrBot / _toggle_command

Function _toggle_command

astrbot/dashboard/api/extensions.py:53–59  ·  view source on GitHub ↗
(payload: CommandToggleRequest, service: CommandService)

Source from the content-addressed store, hash-verified

51
52
53async def _toggle_command(payload: CommandToggleRequest, service: CommandService):
54 try:
55 return ok(
56 await service.toggle_command(payload.handler_full_name, payload.enabled)
57 )
58 except CommandServiceError as exc:
59 _raise_command_error(exc)
60
61
62async def _rename_command(payload: CommandRenameRequest, service: CommandService):

Callers 2

update_commandFunction · 0.85
toggle_dashboard_commandFunction · 0.85

Calls 3

okFunction · 0.90
_raise_command_errorFunction · 0.85
toggle_commandMethod · 0.80

Tested by

no test coverage detected