From 5862dce92225c9df9b7d902cbebc483327c71c78 Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 15 Mar 2019 00:01:49 -0300 Subject: [PATCH] icons: add getters for splash and banner - fix channel-icons scope fetch --- litecord/blueprints/icons.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/litecord/blueprints/icons.py b/litecord/blueprints/icons.py index 65b8de2..c44f438 100644 --- a/litecord/blueprints/icons.py +++ b/litecord/blueprints/icons.py @@ -78,6 +78,18 @@ async def get_app_icon(application_id, icon_hash, ext): @bp.route('/channel-icons//', methods=['GET']) -async def _get_gdm_icon(guild_id: int, icon_file: str): +async def _get_gdm_icon(channel_id: int, icon_file: str): icon_hash, ext = splitext_(icon_file) - return await send_icon('channel-icons', guild_id, icon_hash, ext=ext) + return await send_icon('channel-icons', channel_id, icon_hash, ext=ext) + + +@bp.route('/splashes//', methods=['GET']) +async def _get_guild_splash(guild_id: int, icon_file: str): + icon_hash, ext = splitext_(icon_file) + return await send_icon('splash', guild_id, icon_hash, ext=ext) + + +@bp.route('/banners//', methods=['GET']) +async def _get_guild_banner(guild_id: int, icon_file: str): + icon_hash, ext = splitext_(icon_file) + return await send_icon('banner', guild_id, icon_hash, ext=ext)