serenity/model/application/
ping_interaction.rs

1use serde::{Deserialize, Serialize};
2
3use crate::model::id::{ApplicationId, InteractionId};
4
5/// A ping interaction, which can only be received through an endpoint url.
6///
7/// [Discord docs](https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure).
8#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
9#[derive(Clone, Debug, Deserialize, Serialize)]
10#[non_exhaustive]
11pub struct PingInteraction {
12    /// Id of the interaction.
13    pub id: InteractionId,
14    /// Id of the application this interaction is for.
15    pub application_id: ApplicationId,
16    /// A continuation token for responding to the interaction.
17    pub token: String,
18    /// Always `1`.
19    pub version: u8,
20}