WebhookInteractionCompletedEvent.fromJson constructor
Creates a WebhookInteractionCompletedEvent from JSON.
Implementation
factory WebhookInteractionCompletedEvent.fromJson(Map<String, dynamic> json) {
if (json['type'] != 'interaction.completed') {
throw FormatException(
'Expected type "interaction.completed" but got "${json['type']}"',
);
}
return WebhookInteractionCompletedEvent(
id: _requireDataId(json, 'WebhookInteractionCompletedEvent'),
version: json['version'] as String?,
timestamp: _readTimestamp(json),
);
}