Add integrations
This commit is contained in:
parent
9963fd8a33
commit
7069a9e1e6
|
@ -620,7 +620,7 @@ pub struct MessageActivity {
|
||||||
pub party_id: Option<String>,
|
pub party_id: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||||
pub struct Application {
|
pub struct Application {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
@ -646,7 +646,7 @@ pub struct Application {
|
||||||
pub role_connections_verification_url: Option<String>,
|
pub role_connections_verification_url: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||||
pub struct Team {
|
pub struct Team {
|
||||||
pub icon: Option<String>,
|
pub icon: Option<String>,
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
|
@ -655,7 +655,7 @@ pub struct Team {
|
||||||
pub owner_user_id: u64,
|
pub owner_user_id: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||||
pub struct TeamMember {
|
pub struct TeamMember {
|
||||||
pub membership_state: u8,
|
pub membership_state: u8,
|
||||||
pub permissions: Vec<String>,
|
pub permissions: Vec<String>,
|
||||||
|
@ -670,7 +670,7 @@ pub enum MembershipState {
|
||||||
Accepted = 2,
|
Accepted = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
pub struct InstallParams {
|
pub struct InstallParams {
|
||||||
pub scopes: Vec<String>,
|
pub scopes: Vec<String>,
|
||||||
pub permissions: String,
|
pub permissions: String,
|
||||||
|
@ -786,6 +786,35 @@ pub struct ThreadMember {
|
||||||
pub member: Option<GuildMember>,
|
pub member: Option<GuildMember>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default, Debug, Deserialize, Serialize, Clone)]
|
||||||
|
/// See https://discord.com/developers/docs/resources/guild#integration-object-integration-structure
|
||||||
|
pub struct Integration {
|
||||||
|
pub id: String,
|
||||||
|
pub name: String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
pub integration_type: String,
|
||||||
|
pub enabled: bool,
|
||||||
|
pub syncing: Option<bool>,
|
||||||
|
pub role_id: Option<String>,
|
||||||
|
pub enabled_emoticons: Option<bool>,
|
||||||
|
pub expire_behaviour: Option<u8>,
|
||||||
|
pub expire_grace_period: Option<u16>,
|
||||||
|
pub user: Option<UserObject>,
|
||||||
|
pub account: IntegrationAccount,
|
||||||
|
pub synced_at: Option<DateTime<Utc>>,
|
||||||
|
pub subscriber_count: Option<f64>,
|
||||||
|
pub revoked: Option<bool>,
|
||||||
|
pub application: Option<Application>,
|
||||||
|
pub scopes: Option<Vec<String>>
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default, Debug, Deserialize, Serialize, Clone)]
|
||||||
|
/// See https://discord.com/developers/docs/resources/guild#integration-account-object-integration-account-structure
|
||||||
|
pub struct IntegrationAccount {
|
||||||
|
pub id: String,
|
||||||
|
pub name: String
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||||
pub struct DefaultReaction {
|
pub struct DefaultReaction {
|
||||||
pub emoji_id: Option<String>,
|
pub emoji_id: Option<String>,
|
||||||
|
|
Loading…
Reference in New Issue