From adf28312df5d1b9c5f19bdf00427c406145dbe4c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 10 Sep 2021 22:18:30 +0300 Subject: [PATCH] Replace _ with - in default command names --- maubot/handlers/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maubot/handlers/command.py b/maubot/handlers/command.py index 81fccad..37f8174 100644 --- a/maubot/handlers/command.py +++ b/maubot/handlers/command.py @@ -235,7 +235,7 @@ def new(name: PrefixType = None, *, help: str = None, aliases: AliasesType = Non else: func.__mb_get_name__ = lambda self: name else: - func.__mb_get_name__ = lambda self: func.__mb_func__.__name__ + func.__mb_get_name__ = lambda self: func.__mb_func__.__name__.replace("_", "-") if callable(aliases): if len(inspect.getfullargspec(aliases).args) == 1: func.__mb_is_command_match__ = lambda self, val: aliases(val)