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
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:
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user