MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / _new_command_config

Method _new_command_config

astrbot/core/db/sqlite.py:1303–1333  ·  view source on GitHub ↗
(
        handler_full_name: str,
        plugin_name: str,
        module_path: str,
        original_command: str,
        *,
        resolved_command: str | None = None,
        enabled: bool | None = None,
        keep_original_alias: bool | None = None,
        conflict_key: str | None = None,
        resolution_strategy: str | None = None,
        note: str | None = None,
        extra_data: dict | None = None,
        auto_managed: bool | None = None,
    )

Source from the content-addressed store, hash-verified

1301
1302 @staticmethod
1303 def _new_command_config(
1304 handler_full_name: str,
1305 plugin_name: str,
1306 module_path: str,
1307 original_command: str,
1308 *,
1309 resolved_command: str | None = None,
1310 enabled: bool | None = None,
1311 keep_original_alias: bool | None = None,
1312 conflict_key: str | None = None,
1313 resolution_strategy: str | None = None,
1314 note: str | None = None,
1315 extra_data: dict | None = None,
1316 auto_managed: bool | None = None,
1317 ) -> CommandConfig:
1318 return CommandConfig(
1319 handler_full_name=handler_full_name,
1320 plugin_name=plugin_name,
1321 module_path=module_path,
1322 original_command=original_command,
1323 resolved_command=resolved_command,
1324 enabled=True if enabled is None else enabled,
1325 keep_original_alias=False
1326 if keep_original_alias is None
1327 else keep_original_alias,
1328 conflict_key=conflict_key or original_command,
1329 resolution_strategy=resolution_strategy,
1330 note=note,
1331 extra_data=extra_data,
1332 auto_managed=bool(auto_managed),
1333 )
1334
1335 @staticmethod
1336 def _new_command_conflict(

Callers 1

_opMethod · 0.95

Calls 1

CommandConfigClass · 0.90

Tested by

no test coverage detected