#!/usr/bin/env python3 """List all roles in the guild to find the correct team role IDs.""" import asyncio import os import aiohttp DISCORD_BOT_TOKEN = os.environ["DISCORD_BOT_TOKEN"] BASE_URL = "https://discord.com/api/v10" GUILD_ID = "1354624415861833870" async def list_guild_roles() -> None: """List all roles in the guild, highlighting team-related ones.""" url = f"{BASE_URL}/guilds/{GUILD_ID}/roles" headers = {"Authorization": f"Bot {DISCORD_BOT_TOKEN}"} async with ( aiohttp.ClientSession() as session, session.get(url, headers=headers) as resp, ): if resp.status == 200: roles = await resp.json() print(f"Found {len(roles)} roles in the server:\n") team_names = [ "Jade Jasmine", "Crimson Dahlia", "Rose Camellia", "Amber Wisteria", "Ivory Orchid", "Teal Iris", "Peach Gardenia", "Violet Carnation", "Azure Lotus", "Coral Sunflower", "Indigo Tulip", "Scarlet Hydrangea", "Mint Narcissus", "Sage Marigold", "Cohort", ] for role in sorted(roles, key=lambda r: r["name"].lower()): name = role["name"] is_team = any(team in name for team in team_names) if is_team or "spring" in name.lower() or "2026" in name: print(f"✅ {role['id']}: {name}") print("\n\nAll roles (sorted by name):") for role in sorted(roles, key=lambda r: r["name"].lower()): print(f"{role['id']}: {role['name']}") else: error = await resp.text() print(f"Error: {resp.status} - {error}") if __name__ == "__main__": asyncio.run(list_guild_roles())