diff --git a/webapp/titanembeds/blueprints/admin/admin.py b/webapp/titanembeds/blueprints/admin/admin.py index 81009a8..6aa9180 100644 --- a/webapp/titanembeds/blueprints/admin/admin.py +++ b/webapp/titanembeds/blueprints/admin/admin.py @@ -256,7 +256,17 @@ def update_administrate_guild(guild_id): @admin.route("/guilds") @is_admin def guilds(): - guilds = db.session.query(Guilds).all() + guilds = [] + dbguilds = db.session.query(Guilds).all() + for guild in dbguilds: + rguild = redisqueue.get_guild(guild.guild_id) + if not rguild: + continue + guilds.append({ + "guild_id": guild.guild_id, + "name": rguild["name"], + "icon": rguild["icon"] + }) return render_template("admin_guilds.html.j2", servers=guilds, icon_generate=generate_guild_icon_url) @admin.route("/tokens", methods=["GET"]) diff --git a/webapp/titanembeds/templates/admin_guilds.html.j2 b/webapp/titanembeds/templates/admin_guilds.html.j2 index 490ea2d..127d33f 100644 --- a/webapp/titanembeds/templates/admin_guilds.html.j2 +++ b/webapp/titanembeds/templates/admin_guilds.html.j2 @@ -4,9 +4,20 @@ {% block content %}
Select a server to configure Titan Embeds. (Total server count: {{ servers|length }})
+Filter by ID
+{{ server.name|e }}
-ID: {{ server.guild_id }}