Skip to content

Commit

Permalink
fix: fallback to list if entitlements is not provided (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstreaTSS authored Jul 3, 2024
1 parent 2ec798b commit 49ecdf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interactions/models/internal/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def from_dict(cls, client: "ClientT", payload: dict) -> Self:
instance.guild_locale = payload.get("guild_locale", instance.locale)
instance._context_type = payload.get("type", 0)
instance.resolved = Resolved.from_dict(client, payload["data"].get("resolved", {}), payload.get("guild_id"))
instance.entitlements = Entitlement.from_list(payload["entitlements"], client)
instance.entitlements = Entitlement.from_list(payload.get("entitlements", []), client)
instance.context = ContextType(payload["context"]) if payload.get("context") else None
instance.authorizing_integration_owners = {
IntegrationType(int(integration_type)): Snowflake(owner_id)
Expand Down

0 comments on commit 49ecdf9

Please sign in to comment.