From 9cd7602ffbc443a47b917946e6ee784a44c40184 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Mon, 7 Oct 2019 22:34:39 -0700 Subject: [PATCH] Stringify asset d.py objects --- discordbot/titanembeds/utils.py | 6 +++--- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discordbot/titanembeds/utils.py b/discordbot/titanembeds/utils.py index 4092be7..60f5ab5 100644 --- a/discordbot/titanembeds/utils.py +++ b/discordbot/titanembeds/utils.py @@ -44,7 +44,7 @@ def get_formatted_message(message): def get_formatted_user(user): userobj = { "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:], "discriminator": user.discriminator, "game": None, @@ -108,7 +108,7 @@ def get_formatted_guild(guild, webhooks=[]): "id": str(guild.id), "name": guild.name, "icon": guild.icon, - "icon_url": guild.icon_url, + "icon_url": str(guild.icon_url), "owner_id": guild.owner_id, "roles": get_roles_list(guild.roles), "channels": get_channels_list(guild.channels), @@ -171,7 +171,7 @@ def get_emojis_list(guildemojis): "require_colons": emote.require_colons, "managed": emote.managed, "roles": list_role_ids(emote.roles), - "url": emote.url, + "url": str(emote.url), "animated": emote.animated }) return emojis diff --git a/requirements.txt b/requirements.txt index 737481d..08fb704 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ requests_oauthlib Flask-SSLify flask_socketio paypalrestsdk -git+https://github.com/Rapptz/discord.py@66af80511f63cb5cb24b06c65bb8aa4697419cfc#egg=discord.py +discord.py asyncio_extras kombu redis