High res images with webp

This commit is contained in:
Jeremy Zhang 2017-09-25 00:49:47 +00:00
parent 70aae0ab22
commit 490afedba8
2 changed files with 3 additions and 3 deletions

View File

@ -90,10 +90,10 @@ def check_user_permission(guild_id, id):
return False
def generate_avatar_url(id, av):
return avatar_base_url + str(id) + '/' + str(av) + '.jpg'
return avatar_base_url + str(id) + '/' + str(av) + '.webp?size=1024'
def generate_guild_icon_url(id, hash):
return guild_icon_url + str(id) + "/" + str(hash) + ".jpg"
return guild_icon_url + str(id) + "/" + str(hash) + ".webp?size=1024"
def generate_bot_invite_url(guild_id):
url = "https://discordapp.com/oauth2/authorize?&client_id={}&scope=bot&permissions={}&guild_id={}".format(config['client-id'], '641195117', guild_id)

View File

@ -816,7 +816,7 @@
if (user_id == bot_client_id && (message_contents.includes("**") && ( (message_contents.includes("<")&&message_contents.includes(">")) || (message_contents.includes("[") && message_contents.includes("]")) ))) {
return global_guest_icon;
} else {
return "https://cdn.discordapp.com/avatars/" + user_id + "/" + avatar_hash + ".png";
return "https://cdn.discordapp.com/avatars/" + user_id + "/" + avatar_hash + ".webp?size=1024";
}
}