Add Debug derives to all structs
This commit is contained in:
parent
d5d387ae67
commit
f287ac5e5b
|
@ -7,6 +7,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Useful metadata for working with [`types::Reaction`], bundled together nicely.
|
/// Useful metadata for working with [`types::Reaction`], bundled together nicely.
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub struct ReactionMeta {
|
pub struct ReactionMeta {
|
||||||
pub message_id: types::Snowflake,
|
pub message_id: types::Snowflake,
|
||||||
pub channel_id: types::Snowflake,
|
pub channel_id: types::Snowflake,
|
||||||
|
|
|
@ -329,6 +329,7 @@ impl GatewayHandle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Gateway {
|
pub struct Gateway {
|
||||||
events: Arc<Mutex<Events>>,
|
events: Arc<Mutex<Events>>,
|
||||||
heartbeat_handler: HeartbeatHandler,
|
heartbeat_handler: HeartbeatHandler,
|
||||||
|
@ -726,6 +727,7 @@ impl Gateway {
|
||||||
|
|
||||||
/// Handles sending heartbeats to the gateway in another thread
|
/// Handles sending heartbeats to the gateway in another thread
|
||||||
#[allow(dead_code)] // FIXME: Remove this, once HeartbeatHandler is used
|
#[allow(dead_code)] // FIXME: Remove this, once HeartbeatHandler is used
|
||||||
|
#[derive(Debug)]
|
||||||
struct HeartbeatHandler {
|
struct HeartbeatHandler {
|
||||||
/// How ofter heartbeats need to be sent at a minimum
|
/// How ofter heartbeats need to be sent at a minimum
|
||||||
pub heartbeat_interval: Duration,
|
pub heartbeat_interval: Duration,
|
||||||
|
|
|
@ -16,6 +16,7 @@ use crate::{
|
||||||
|
|
||||||
/// Chorus' request struct. This struct is used to send rate-limited requests to the Spacebar server.
|
/// Chorus' request struct. This struct is used to send rate-limited requests to the Spacebar server.
|
||||||
/// See <https://discord.com/developers/docs/topics/rate-limits#rate-limits> for more information.
|
/// See <https://discord.com/developers/docs/topics/rate-limits#rate-limits> for more information.
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct ChorusRequest {
|
pub struct ChorusRequest {
|
||||||
pub request: RequestBuilder,
|
pub request: RequestBuilder,
|
||||||
pub limit_type: LimitType,
|
pub limit_type: LimitType,
|
||||||
|
|
|
@ -124,7 +124,7 @@ pub struct MessageInteraction {
|
||||||
pub member: Option<Arc<RwLock<GuildMember>>>,
|
pub member: Option<Arc<RwLock<GuildMember>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Eq, PartialOrd, Ord)]
|
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize, Eq, PartialOrd, Ord)]
|
||||||
pub struct AllowedMention {
|
pub struct AllowedMention {
|
||||||
parse: Vec<AllowedMentionType>,
|
parse: Vec<AllowedMentionType>,
|
||||||
roles: Vec<Snowflake>,
|
roles: Vec<Snowflake>,
|
||||||
|
|
|
@ -24,6 +24,7 @@ pub enum InteractionType {
|
||||||
ApplicationCommand = 2,
|
ApplicationCommand = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub enum InteractionResponseType {
|
pub enum InteractionResponseType {
|
||||||
SelfCommandResponse = 0,
|
SelfCommandResponse = 0,
|
||||||
Pong = 1,
|
Pong = 1,
|
||||||
|
@ -33,6 +34,7 @@ pub enum InteractionResponseType {
|
||||||
AcknowledgeWithSource = 5,
|
AcknowledgeWithSource = 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct InteractionApplicationCommandCallbackData {
|
pub struct InteractionApplicationCommandCallbackData {
|
||||||
pub tts: bool,
|
pub tts: bool,
|
||||||
pub content: String,
|
pub content: String,
|
||||||
|
|
|
@ -21,6 +21,7 @@ pub struct MessageSendSchema {
|
||||||
pub attachments: Option<Vec<PartialDiscordFileAttachment>>,
|
pub attachments: Option<Vec<PartialDiscordFileAttachment>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum MessageSearchEndpoint {
|
pub enum MessageSearchEndpoint {
|
||||||
GuildChannel(Snowflake),
|
GuildChannel(Snowflake),
|
||||||
Channel(Snowflake),
|
Channel(Snowflake),
|
||||||
|
|
Loading…
Reference in New Issue