aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-01-07 02:06:11 -0500
committerRapptz <[email protected]>2016-01-07 02:06:11 -0500
commit5ca13cac8e920592c92acf5dc9ad4f89d2abbd06 (patch)
tree9a1adb0933cefa6108697036ea8a3ae9c32a6572 /discord/client.py
parentChange the way MESSAGE_UPDATE events are handled. (diff)
downloaddiscord.py-5ca13cac8e920592c92acf5dc9ad4f89d2abbd06.tar.xz
discord.py-5ca13cac8e920592c92acf5dc9ad4f89d2abbd06.zip
Add Message.nonce attribute.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index dcec1ae2..bfdabf3d 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -51,6 +51,7 @@ import sys, time, re, json
import tempfile, os, hashlib
import itertools
import zlib
+from random import randint as random_integer
log = logging.getLogger(__name__)
request_logging_format = '{method} {response.url} has returned {response.status}'
@@ -922,7 +923,8 @@ class Client:
url = '{base}/{id}/messages'.format(base=endpoints.CHANNELS, id=channel_id)
payload = {
- 'content': content
+ 'content': content,
+ 'nonce': random_integer(-2**63, 2**63 - 1)
}
if tts: