diff options
| author | iomintz <[email protected]> | 2020-05-10 20:07:22 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-10 20:07:22 -0500 |
| commit | 755ab283112c297977d4e5b4e7ad4307a6e9b52f (patch) | |
| tree | 6ce18ec80037c5173be69fbf4f00141660dc31ea /discord/state.py | |
| parent | Fix timeout issues with fetching members via query_members (diff) | |
| download | discord.py-755ab283112c297977d4e5b4e7ad4307a6e9b52f.tar.xz discord.py-755ab283112c297977d4e5b4e7ad4307a6e9b52f.zip | |
state: use bytes.hex() instead of binascii.hexlify().decode()
Diffstat (limited to 'discord/state.py')
| -rw-r--r-- | discord/state.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/discord/state.py b/discord/state.py index 0e8764b6..182c2402 100644 --- a/discord/state.py +++ b/discord/state.py @@ -36,7 +36,6 @@ import inspect import gc import os -import binascii from .guild import Guild from .activity import BaseActivity @@ -135,7 +134,7 @@ class ConnectionState: gc.collect() def get_nonce(self): - return binascii.hexlify(os.urandom(16)).decode('ascii') + return os.urandom(16).hex() def process_listeners(self, listener_type, argument, result): removed = [] |