Skip to content

Commit c6f3d39

Browse files
committed
🐛 Fix 204 is considered ok
1 parent 928f185 commit c6f3d39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discordoauth2/async_oauth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ async def join_guild(
138138
"deaf": deaf,
139139
},
140140
) as response:
141-
if response.ok:
142-
return await response.json()
143-
elif response.status == 204:
141+
if response.status == 204:
144142
raise Exceptions.HTTPException(f"member is already in the guild.")
143+
elif response.ok:
144+
return await response.json()
145145
elif response.status == 401:
146146
raise Exceptions.Forbidden(
147147
f"this AccessToken does not have the nessasary scope."

0 commit comments

Comments
 (0)