We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16dcf2c + 1c21f64 commit 8824d66Copy full SHA for 8824d66
discord/client.py
@@ -460,13 +460,17 @@ async def login(self, token: str) -> None:
460
461
Raises
462
------
463
+ TypeError
464
+ The token was in invalid type.
465
:exc:`.LoginFailure`
466
The wrong credentials are passed.
467
:exc:`.HTTPException`
468
An unknown HTTP related error occurred,
469
usually when it isn't 200 or the known incorrect credentials
470
passing status code.
471
"""
472
+ if not isinstance(token, str):
473
+ raise TypeError(f"token must be of type str, not {token.__class__.__name__}")
474
475
_log.info('logging in using static token')
476
0 commit comments