Stringify asset d.py objects

This commit is contained in:
Jeremy Zhang 2019-10-07 22:34:39 -07:00
parent 607e285f4f
commit 9cd7602ffb
2 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ def get_formatted_message(message):
def get_formatted_user(user): def get_formatted_user(user):
userobj = { userobj = {
"avatar": user.avatar, "avatar": user.avatar,
"avatar_url": user.avatar_url_as(static_format="png", size=512), "avatar_url": str(user.avatar_url_as(static_format="png", size=512)),
"color": str(user.color)[1:], "color": str(user.color)[1:],
"discriminator": user.discriminator, "discriminator": user.discriminator,
"game": None, "game": None,
@ -108,7 +108,7 @@ def get_formatted_guild(guild, webhooks=[]):
"id": str(guild.id), "id": str(guild.id),
"name": guild.name, "name": guild.name,
"icon": guild.icon, "icon": guild.icon,
"icon_url": guild.icon_url, "icon_url": str(guild.icon_url),
"owner_id": guild.owner_id, "owner_id": guild.owner_id,
"roles": get_roles_list(guild.roles), "roles": get_roles_list(guild.roles),
"channels": get_channels_list(guild.channels), "channels": get_channels_list(guild.channels),
@ -171,7 +171,7 @@ def get_emojis_list(guildemojis):
"require_colons": emote.require_colons, "require_colons": emote.require_colons,
"managed": emote.managed, "managed": emote.managed,
"roles": list_role_ids(emote.roles), "roles": list_role_ids(emote.roles),
"url": emote.url, "url": str(emote.url),
"animated": emote.animated "animated": emote.animated
}) })
return emojis return emojis

View File

@ -5,7 +5,7 @@ requests_oauthlib
Flask-SSLify Flask-SSLify
flask_socketio flask_socketio
paypalrestsdk paypalrestsdk
git+https://github.com/Rapptz/discord.py@66af80511f63cb5cb24b06c65bb8aa4697419cfc#egg=discord.py discord.py
asyncio_extras asyncio_extras
kombu kombu
redis redis