Browse Source
[commands] Fix AttributeError for classes missing convert attribute
pull/6658/head
ToxicKidz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
discord/ext/commands/core.py
|
|
@ -444,7 +444,7 @@ class Command(_BaseCommand): |
|
|
|
|
|
|
|
try: |
|
|
|
if inspect.isclass(converter): |
|
|
|
if inspect.ismethod(converter.convert): |
|
|
|
if inspect.ismethod(getattr(converter, 'convert', None)): |
|
|
|
if converter.convert.__self__ is converter: |
|
|
|
# class method |
|
|
|
func = converter.convert |
|
|
|