Browse Source

Modify User-Agent header to meet React's requirements.

pull/57/head
Rapptz 9 years ago
parent
commit
573fa90f1b
  1. 4
      discord/client.py

4
discord/client.py

@ -107,7 +107,9 @@ class Client:
self.connection = ConnectionState(self.dispatch, max_messages)
self.session = aiohttp.ClientSession(loop=self.loop)
user_agent = 'discord.py/{0} Python/{1[0]}.{1[1]} aiohttp/{2}'
# Blame React for this
user_agent = 'DiscordBot discord.py/{0} Python/{1[0]}.{1[1]} aiohttp/{2}'
self.headers = {
'content-type': 'application/json',

Loading…
Cancel
Save