Browse Source

[commands] Fix AttributeError for classes missing convert attribute

pull/6658/head
ToxicKidz 4 years ago
committed by GitHub
parent
commit
0efb720cec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      discord/ext/commands/core.py

2
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

Loading…
Cancel
Save