Skip to content

Commit

Permalink
refactor: switch to try-except
Browse files Browse the repository at this point in the history
Signed-off-by: Dorukyum <[email protected]>
  • Loading branch information
Dorukyum authored Nov 16, 2024
1 parent 38b5f3e commit 99596cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,12 @@ async def _edit(
)
except KeyError:
pass
if options.get("flags"):
options["flags"] = options["flags"].value

try:
options["flags"] = options.pop("flags").value
except KeyError:
pass

try:
options["available_tags"] = [
tag.to_dict() for tag in options.pop("available_tags")
Expand Down

0 comments on commit 99596cc

Please sign in to comment.