Browse Source

isinstance(x, y) and isinstance(x, z) -> isinstance(x, (y, z))

pull/4126/head
NCPlayz 5 years ago
committed by Rapptz
parent
commit
f09162f259
  1. 2
      discord/utils.py

2
discord/utils.py

@ -427,7 +427,7 @@ def resolve_invite(invite):
The invite code.
"""
from .invite import Invite # circular import
if isinstance(invite, Invite) or isinstance(invite, Object):
if isinstance(invite, (Invite, Object)):
return invite.id
else:
rx = r'(?:https?\:\/\/)?discord(?:\.gg|app\.com\/invite)\/(.+)'

Loading…
Cancel
Save