Skip to content

Commit

Permalink
fix try_enum
Browse files Browse the repository at this point in the history
  • Loading branch information
NeloBlivion authored Nov 3, 2023
1 parent 9e4b3ff commit bf29ee3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/raw_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def __init__(
self.burst: bool = data.get("burst")
self.burst_colours: list = data.get("burst_colors", [])
self.burst_colors: list = self.burst_colours
self.type: ReactionType = try_enum(data.get("type", 0))
self.type: ReactionType = try_enum(ReactionType, data.get("type", 0))

try:
self.guild_id: int | None = int(data["guild_id"])
Expand Down Expand Up @@ -333,7 +333,7 @@ def __init__(self, data: ReactionClearEmojiEvent, emoji: PartialEmoji) -> None:
self.burst: bool = data.get("burst")
self.burst_colours: list = data.get("burst_colors", [])
self.burst_colors: list = self.burst_colours
self.type: ReactionType = try_enum(data.get("type", 0))
self.type: ReactionType = try_enum(ReactionType, data.get("type", 0))

try:
self.guild_id: int | None = int(data["guild_id"])
Expand Down

0 comments on commit bf29ee3

Please sign in to comment.