From 5ca13cac8e920592c92acf5dc9ad4f89d2abbd06 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 7 Jan 2016 02:06:11 -0500 Subject: Add Message.nonce attribute. --- discord/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'discord/client.py') 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: -- cgit v1.2.3