Fixed addcommand conflict messaging for non-custom commands.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 2m57s
CI / Tests (Python 3.13) (push) Successful in 2m56s
CI / Tests (Python 3.14) (push) Successful in 2m49s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 4s

This commit is contained in:
2026-05-11 12:05:36 -04:00
parent 06b4a0bb9c
commit 62c5cd0ba5
3 changed files with 60 additions and 2 deletions
@@ -74,6 +74,17 @@ async def addcommand(ctx: CommandContext) -> None:
f"Use '{prefix}editcommand' to modify it."
)
return
except NotCustomCommandError:
await ctx.owncast_client.send_message(
"That command is not a custom command and cannot be modified."
)
return
except InactiveCommandError as e:
await ctx.owncast_client.send_message(
f"Custom command {prefix}{e.name} is disabled because another module "
f"registered the same name. Delete it or resolve the conflict to re-enable."
)
return
await ctx.owncast_client.send_message(f"Command {prefix}{cmd.name} created.")