rename APIError in ErrorField vec as well
This commit is contained in:
parent
6d747bc504
commit
665a3b3667
|
@ -33,7 +33,7 @@ pub struct Guild {
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub emojis: Vec<Emoji>,
|
pub emojis: Vec<Emoji>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub features: Vec<String>,
|
pub features: String, // TODO: Make this a 'simple-array'
|
||||||
pub application_id: Option<String>,
|
pub application_id: Option<String>,
|
||||||
pub system_channel_id: Option<Snowflake>,
|
pub system_channel_id: Option<Snowflake>,
|
||||||
pub system_channel_flags: Option<u8>,
|
pub system_channel_flags: Option<u8>,
|
||||||
|
|
|
@ -16,8 +16,10 @@ pub struct RoleObject {
|
||||||
pub permissions: String,
|
pub permissions: String,
|
||||||
pub managed: bool,
|
pub managed: bool,
|
||||||
pub mentionable: bool,
|
pub mentionable: bool,
|
||||||
// to:do add role tags https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
|
#[cfg(feature = "sqlx")]
|
||||||
//pub tags: Option<RoleTags>
|
pub tags: Option<sqlx::types::Json<RoleTags>>,
|
||||||
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub tags: Option<RoleTags>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
|
@ -27,3 +29,13 @@ pub struct RoleSubscriptionData {
|
||||||
pub total_months_subscribed: u32,
|
pub total_months_subscribed: u32,
|
||||||
pub is_renewal: bool,
|
pub is_renewal: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct RoleTags {
|
||||||
|
pub bot_id: Option<Snowflake>,
|
||||||
|
pub integration_id: Option<Snowflake>,
|
||||||
|
pub premium_subscriber: Option<bool>,
|
||||||
|
pub subscription_listing_id: Option<Snowflake>,
|
||||||
|
pub available_for_purchase: Option<bool>,
|
||||||
|
pub guild_connections: Option<bool>,
|
||||||
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ pub struct IntermittentError {
|
||||||
#[derive(Serialize, Deserialize, Debug, Default)]
|
#[derive(Serialize, Deserialize, Debug, Default)]
|
||||||
pub struct ErrorField {
|
pub struct ErrorField {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub _errors: Vec<APIError>,
|
pub _errors: Vec<APIErrorPayload>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
pub use config::*;
|
pub use config::*;
|
||||||
pub use entities::*;
|
pub use entities::*;
|
||||||
pub use errors::*;
|
|
||||||
|
//pub use errors::*;
|
||||||
pub use events::*;
|
pub use events::*;
|
||||||
pub use interfaces::*;
|
pub use interfaces::*;
|
||||||
pub use schema::*;
|
pub use schema::*;
|
||||||
|
|
Loading…
Reference in New Issue