aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDismissedGuy <[email protected]>2018-07-19 23:25:51 +0200
committerRapptz <[email protected]>2018-08-22 21:06:09 -0400
commitc84287c007e756221fcc998db2124315725720e6 (patch)
treeaa4b9045fb2b635031432d69f3d723dccdb29bae
parentRemove deprecated ffmpeg/avconv flag from basic_voice example (diff)
downloaddiscord.py-c84287c007e756221fcc998db2124315725720e6.tar.xz
discord.py-c84287c007e756221fcc998db2124315725720e6.zip
Add support for splash(_url) to invites
-rw-r--r--discord/invite.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/invite.py b/discord/invite.py
index 1cdabfdf..868eccaa 100644
--- a/discord/invite.py
+++ b/discord/invite.py
@@ -109,6 +109,12 @@ class Invite(Hashable):
guild = Object(id=guild_id)
channel = Object(id=channel_id)
guild.name = data['guild']['name']
+
+ guild.splash = data['guild']['splash']
+ guild.splash_url = ''
+ if guild.splash:
+ guild.splash_url = 'https://cdn.discordapp.com/splashes/{0.id}/{0.splash}.jpg?size=2048'.format(guild)
+
channel.name = data['channel']['name']
data['guild'] = guild