diff --git a/discord/interactions.py b/discord/interactions.py index 04700ad5f..f39878082 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -717,8 +717,8 @@ class InteractionCallback(Generic[ClientT]): self.resource: Optional[InteractionCallbackResource] = None - if 'resource' in data: - resource = data['resource'] + resource = data.get('resource') + if resource is not None: self.type = try_enum(InteractionResponseType, resource['type'])