Browse Source

Raise TypeError when token is not a string

Co-authored-by: Danny <[email protected]>
pull/10109/head
Puncher 3 years ago
committed by dolfies
parent
commit
94f93a8b68
  1. 3
      discord/client.py

3
discord/client.py

@ -737,6 +737,9 @@ class Client:
if self.loop is _loop:
await self._async_setup_hook()
if not isinstance(token, str):
raise TypeError(f'expected token to be a str, received {token.__class__!r} instead')
state = self._connection
data = await state.http.static_login(token.strip())
state.analytics_token = data.get('analytics_token', '')

Loading…
Cancel
Save