-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
- When looking for
.help command:userbot/userbot/modules/commands.py
Lines 388 to 403 in 2d862d1
if args := command.args: for h in self._handlers: for cmd in h.commands: match cmd: case re.Pattern() as pattern: matches = pattern.fullmatch(args) is not None case str(): matches = cmd == args case _: raise AssertionError(f"Unexpected command type: {type(cmd)}") if matches: usage = h.format_usage(full=True) return _("<b>Help for {args}:</b>\n{usage}").format( args=html.escape(args), usage=html.escape(usage), ) - When checking command conflicts while registering:
userbot/userbot/modules/commands.py
Lines 423 to 426 in 2d862d1
for handler in self._handlers: for cmd in handler.commands: if cmd in commands: raise ValueError(f"Duplicate command: {cmd}")
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Projects
Status
📋 Backlog