File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -582,6 +582,17 @@ def qualified_name(self) -> str:
582
582
else :
583
583
return self .name
584
584
585
+ @property
586
+ def qualified_id (self ) -> int :
587
+ """:class:`int`: Retrieves the fully qualified command ID.
588
+
589
+ This is the root parent ID. For example, in ``/one two three``
590
+ the qualified ID would return ``one.id``.
591
+ """
592
+ if self .id is None :
593
+ return self .parent .qualified_id
594
+ return self .id
595
+
585
596
def to_dict (self ) -> dict [str , Any ]:
586
597
raise NotImplementedError
587
598
@@ -821,7 +832,7 @@ def is_subcommand(self) -> bool:
821
832
822
833
@property
823
834
def mention (self ) -> str :
824
- return f"</{ self .qualified_name } :{ self .id } >"
835
+ return f"</{ self .qualified_name } :{ self .qualified_id } >"
825
836
826
837
def to_dict (self ) -> dict :
827
838
as_dict = {
You can’t perform that action at this time.
0 commit comments