Skip to content

Commit 99596cc

Browse files
authored
refactor: switch to try-except
Signed-off-by: Dorukyum <[email protected]>
1 parent 38b5f3e commit 99596cc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

discord/abc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,12 @@ async def _edit(
416416
)
417417
except KeyError:
418418
pass
419-
if options.get("flags"):
420-
options["flags"] = options["flags"].value
419+
420+
try:
421+
options["flags"] = options.pop("flags").value
422+
except KeyError:
423+
pass
424+
421425
try:
422426
options["available_tags"] = [
423427
tag.to_dict() for tag in options.pop("available_tags")

0 commit comments

Comments
 (0)