Josh
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
discord/ext/commands/converter.py
|
|
@ -818,6 +818,10 @@ class Greedy(List[T]): |
|
|
|
def __init__(self, *, converter: T): |
|
|
|
self.converter = converter |
|
|
|
|
|
|
|
def __repr__(self): |
|
|
|
converter = getattr(self.converter, '__name__', repr(self.converter)) |
|
|
|
return f'Greedy[{converter}]' |
|
|
|
|
|
|
|
def __class_getitem__(cls, params: Union[Tuple[T], T]) -> Greedy[T]: |
|
|
|
if not isinstance(params, tuple): |
|
|
|
params = (params,) |
|
|
|