From 966510c4678e6852c885600a214ab2e72aeb8d1f Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Mon, 12 Sep 2022 17:48:50 +0000 Subject: [PATCH] Fix test user guild on subscribe --- divent/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/divent/bot.py b/divent/bot.py index d6e4271..097259a 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -209,7 +209,7 @@ async def subscribe(guild_id: str): discord = make_session(token=session.get("oauth2_token")) user_guilds = discord.get(f"{API_BASE_URL}/users/@me/guilds").json() - if not any(guild_id == user_guild.id for user_guild in user_guilds): + if not any(str(guild.id) == user_guild["id"] for user_guild in user_guilds): return redirect(url_for(".login")) user = discord.get(f"{API_BASE_URL}/users/@me").json()