Update documentation and code snippets

This commit is contained in:
2025-12-08 19:29:54 +03:00
parent 75b1efb259
commit 183f069766
6 changed files with 179 additions and 4 deletions
+3
View File
@@ -80,6 +80,9 @@ class Router:
if command_name.lower() in self.triggers:
raise RepeatedTriggerNameException()
if command_name.lower() in self.aliases:
raise RepeatedAliasNameException({command_name.lower()})
if overlapping := (self.aliases | self.triggers) & set(map(lambda x: x.lower(), command.aliases)):
raise RepeatedAliasNameException(overlapping)
+7 -1
View File
@@ -1,4 +1,10 @@
__all__ = ["RepeatedFlagNameException", "RequiredArgumentNotPassedException", "TriggerContainSpacesException"]
__all__ = [
"RepeatedFlagNameException",
"RepeatedTriggerNameException",
"RepeatedAliasNameException",
"RequiredArgumentNotPassedException",
"TriggerContainSpacesException",
]
from typing import override