Compare commits
No commits in common. "6916984225899a9f1c9b029228032c57a8358945" and "bf94b9c04c76ac08fa5d072e790680f1089901ef" have entirely different histories.
6916984225
...
bf94b9c04c
|
@ -101,7 +101,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rustup target add wasm32-unknown-unknown
|
rustup target add wasm32-unknown-unknown
|
||||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||||
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.93" --force
|
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.92" --force
|
||||||
GECKODRIVER=$(which geckodriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
|
GECKODRIVER=$(which geckodriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
|
||||||
wasm-chrome:
|
wasm-chrome:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -130,5 +130,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rustup target add wasm32-unknown-unknown
|
rustup target add wasm32-unknown-unknown
|
||||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||||
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.93" --force
|
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.92" --force
|
||||||
CHROMEDRIVER=$(which chromedriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
|
CHROMEDRIVER=$(which chromedriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
|
||||||
|
|
|
@ -17,12 +17,6 @@ version = "1.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "adler2"
|
|
||||||
version = "2.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aead"
|
name = "aead"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
|
@ -128,7 +122,7 @@ dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"miniz_oxide 0.7.4",
|
"miniz_oxide",
|
||||||
"object",
|
"object",
|
||||||
"rustc-demangle",
|
"rustc-demangle",
|
||||||
]
|
]
|
||||||
|
@ -590,12 +584,12 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flate2"
|
name = "flate2"
|
||||||
version = "1.0.32"
|
version = "1.0.31"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666"
|
checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
"miniz_oxide 0.8.0",
|
"miniz_oxide",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -775,9 +769,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "h2"
|
name = "h2"
|
||||||
version = "0.4.6"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
|
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomic-waker",
|
"atomic-waker",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -998,7 +992,7 @@ dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"h2 0.4.6",
|
"h2 0.4.5",
|
||||||
"http 1.1.0",
|
"http 1.1.0",
|
||||||
"http-body 1.0.1",
|
"http-body 1.0.1",
|
||||||
"httparse",
|
"httparse",
|
||||||
|
@ -1163,9 +1157,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.158"
|
version = "0.2.157"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
|
checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libm"
|
name = "libm"
|
||||||
|
@ -1269,15 +1263,6 @@ dependencies = [
|
||||||
"adler",
|
"adler",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "miniz_oxide"
|
|
||||||
version = "0.8.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
|
|
||||||
dependencies = [
|
|
||||||
"adler2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
|
@ -2778,9 +2763,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-properties"
|
name = "unicode-properties"
|
||||||
version = "0.1.2"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524"
|
checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode_categories"
|
name = "unicode_categories"
|
||||||
|
|
|
@ -82,13 +82,13 @@ getrandom = { version = "0.2.15" }
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
getrandom = { version = "0.2.15", features = ["js"] }
|
getrandom = { version = "0.2.15", features = ["js"] }
|
||||||
ws_stream_wasm = "0.7.4"
|
ws_stream_wasm = "0.7.4"
|
||||||
wasm-bindgen-futures = "0.4.43"
|
wasm-bindgen-futures = "0.4.42"
|
||||||
wasmtimer = "0.2.0"
|
wasmtimer = "0.2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
lazy_static = "1.5.0"
|
lazy_static = "1.5.0"
|
||||||
wasm-bindgen-test = "0.3.43"
|
wasm-bindgen-test = "0.3.42"
|
||||||
wasm-bindgen = "0.2.93"
|
wasm-bindgen = "0.2.92"
|
||||||
simple_logger = { version = "5.0.0", default-features = false }
|
simple_logger = { version = "5.0.0", default-features = false }
|
||||||
|
|
||||||
[lints.rust]
|
[lints.rust]
|
||||||
|
|
|
@ -16,7 +16,6 @@ use crate::types::{
|
||||||
};
|
};
|
||||||
|
|
||||||
impl Message {
|
impl Message {
|
||||||
#[allow(clippy::useless_conversion)]
|
|
||||||
/// Sends a message in the channel with the provided channel_id.
|
/// Sends a message in the channel with the provided channel_id.
|
||||||
/// Returns the sent message.
|
/// Returns the sent message.
|
||||||
///
|
///
|
||||||
|
|
27
src/lib.rs
27
src/lib.rs
|
@ -101,7 +101,8 @@ This crate uses Semantic Versioning 2.0.0 as its versioning scheme. You can read
|
||||||
clippy::extra_unused_lifetimes,
|
clippy::extra_unused_lifetimes,
|
||||||
clippy::from_over_into,
|
clippy::from_over_into,
|
||||||
clippy::needless_borrow,
|
clippy::needless_borrow,
|
||||||
clippy::new_without_default
|
clippy::new_without_default,
|
||||||
|
clippy::useless_conversion
|
||||||
)]
|
)]
|
||||||
#![warn(
|
#![warn(
|
||||||
clippy::todo,
|
clippy::todo,
|
||||||
|
@ -110,8 +111,7 @@ This crate uses Semantic Versioning 2.0.0 as its versioning scheme. You can read
|
||||||
clippy::print_stdout,
|
clippy::print_stdout,
|
||||||
clippy::print_stderr,
|
clippy::print_stderr,
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
missing_copy_implementations,
|
missing_copy_implementations
|
||||||
clippy::useless_conversion
|
|
||||||
)]
|
)]
|
||||||
#[cfg(all(feature = "rt", feature = "rt_multi_thread"))]
|
#[cfg(all(feature = "rt", feature = "rt_multi_thread"))]
|
||||||
compile_error!("feature \"rt\" and feature \"rt_multi_thread\" cannot be enabled at the same time");
|
compile_error!("feature \"rt\" and feature \"rt_multi_thread\" cannot be enabled at the same time");
|
||||||
|
@ -139,27 +139,6 @@ pub mod types;
|
||||||
))]
|
))]
|
||||||
pub mod voice;
|
pub mod voice;
|
||||||
|
|
||||||
#[cfg(not(feature = "sqlx"))]
|
|
||||||
pub type UInt128 = u128;
|
|
||||||
#[cfg(feature = "sqlx")]
|
|
||||||
pub type UInt128 = sqlx_pg_uint::PgU128;
|
|
||||||
#[cfg(not(feature = "sqlx"))]
|
|
||||||
pub type UInt64 = u64;
|
|
||||||
#[cfg(feature = "sqlx")]
|
|
||||||
pub type UInt64 = sqlx_pg_uint::PgU64;
|
|
||||||
#[cfg(not(feature = "sqlx"))]
|
|
||||||
pub type UInt32 = u32;
|
|
||||||
#[cfg(feature = "sqlx")]
|
|
||||||
pub type UInt32 = sqlx_pg_uint::PgU32;
|
|
||||||
#[cfg(not(feature = "sqlx"))]
|
|
||||||
pub type UInt16 = u16;
|
|
||||||
#[cfg(feature = "sqlx")]
|
|
||||||
pub type UInt16 = sqlx_pg_uint::PgU16;
|
|
||||||
#[cfg(not(feature = "sqlx"))]
|
|
||||||
pub type UInt8 = u8;
|
|
||||||
#[cfg(feature = "sqlx")]
|
|
||||||
pub type UInt8 = sqlx_pg_uint::PgU8;
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
/// A URLBundle bundles together the API-, Gateway- and CDN-URLs of a Spacebar instance.
|
/// A URLBundle bundles together the API-, Gateway- and CDN-URLs of a Spacebar instance.
|
||||||
///
|
///
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
use sqlx_pg_uint::PgU64;
|
||||||
|
|
||||||
use crate::types::utils::Snowflake;
|
use crate::types::utils::Snowflake;
|
||||||
use crate::UInt64;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, PartialOrd)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, PartialOrd)]
|
||||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||||
|
@ -17,11 +18,20 @@ pub struct Attachment {
|
||||||
/// Max 1024 characters
|
/// Max 1024 characters
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
pub content_type: Option<String>,
|
pub content_type: Option<String>,
|
||||||
pub size: UInt64,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub size: u64,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub size: PgU64,
|
||||||
pub url: String,
|
pub url: String,
|
||||||
pub proxy_url: String,
|
pub proxy_url: String,
|
||||||
pub height: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
pub width: Option<UInt64>,
|
pub height: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub height: Option<PgU64>,
|
||||||
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub width: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub width: Option<PgU64>,
|
||||||
pub ephemeral: Option<bool>,
|
pub ephemeral: Option<bool>,
|
||||||
/// The duration of the audio file (only for voice messages)
|
/// The duration of the audio file (only for voice messages)
|
||||||
pub duration_secs: Option<f32>,
|
pub duration_secs: Option<f32>,
|
||||||
|
@ -38,12 +48,18 @@ pub struct Attachment {
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||||
pub struct PartialDiscordFileAttachment {
|
pub struct PartialDiscordFileAttachment {
|
||||||
pub id: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub id: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub id: Option<PgU64>,
|
||||||
pub filename: String,
|
pub filename: String,
|
||||||
/// Max 1024 characters
|
/// Max 1024 characters
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
pub content_type: Option<String>,
|
pub content_type: Option<String>,
|
||||||
pub size: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub size: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub size: Option<PgU64>,
|
||||||
pub url: Option<String>,
|
pub url: Option<String>,
|
||||||
pub proxy_url: Option<String>,
|
pub proxy_url: Option<String>,
|
||||||
pub height: Option<i32>,
|
pub height: Option<i32>,
|
||||||
|
|
|
@ -7,12 +7,13 @@ use super::option_vec_arc_rwlock_ptr_eq;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_repr::{Deserialize_repr, Serialize_repr};
|
use serde_repr::{Deserialize_repr, Serialize_repr};
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
use sqlx_pg_uint::PgU64;
|
||||||
|
|
||||||
use crate::types::utils::Snowflake;
|
use crate::types::utils::Snowflake;
|
||||||
use crate::types::{
|
use crate::types::{
|
||||||
AutoModerationRuleTriggerType, IntegrationType, PermissionOverwriteType, Shared,
|
AutoModerationRuleTriggerType, IntegrationType, PermissionOverwriteType, Shared,
|
||||||
};
|
};
|
||||||
use crate::UInt64;
|
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
||||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||||
|
@ -253,16 +254,28 @@ pub struct AuditEntryInfo {
|
||||||
pub auto_moderation_rule_trigger_type: Option<AutoModerationRuleTriggerType>,
|
pub auto_moderation_rule_trigger_type: Option<AutoModerationRuleTriggerType>,
|
||||||
pub channel_id: Option<Snowflake>,
|
pub channel_id: Option<Snowflake>,
|
||||||
// #[serde(option_string)]
|
// #[serde(option_string)]
|
||||||
pub count: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub count: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub count: Option<PgU64>,
|
||||||
// #[serde(option_string)]
|
// #[serde(option_string)]
|
||||||
pub delete_member_days: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub delete_member_days: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub delete_member_days: Option<PgU64>,
|
||||||
/// The ID of the overwritten entity
|
/// The ID of the overwritten entity
|
||||||
pub id: Option<Snowflake>,
|
pub id: Option<Snowflake>,
|
||||||
pub integration_type: Option<IntegrationType>,
|
pub integration_type: Option<IntegrationType>,
|
||||||
// #[serde(option_string)]
|
// #[serde(option_string)]
|
||||||
pub members_removed: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub members_removed: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub members_removed: Option<PgU64>,
|
||||||
// #[serde(option_string)]
|
// #[serde(option_string)]
|
||||||
pub message_id: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub message_id: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub message_id: Option<PgU64>,
|
||||||
pub role_name: Option<String>,
|
pub role_name: Option<String>,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub overwrite_type: Option<PermissionOverwriteType>,
|
pub overwrite_type: Option<PermissionOverwriteType>,
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
use crate::gateway::Updateable;
|
use crate::gateway::Updateable;
|
||||||
use crate::types::Shared;
|
use crate::types::Shared;
|
||||||
use crate::UInt8;
|
|
||||||
|
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
use chorus_macros::Updateable;
|
use chorus_macros::Updateable;
|
||||||
|
@ -83,12 +82,14 @@ pub struct AutoModerationRuleTriggerMetadataForKeywordPreset {
|
||||||
pub allow_list: Vec<String>,
|
pub allow_list: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(missing_copy_implementations)]
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
/// See <https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata>
|
/// See <https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata>
|
||||||
pub struct AutoModerationRuleTriggerMetadataForMentionSpam {
|
pub struct AutoModerationRuleTriggerMetadataForMentionSpam {
|
||||||
/// Max 50
|
/// Max 50
|
||||||
pub mention_total_limit: UInt8,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub mention_total_limit: u8,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub mention_total_limit: sqlx_pg_uint::PgU8,
|
||||||
pub mention_raid_protection_enabled: bool,
|
pub mention_raid_protection_enabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ use crate::gateway::GatewayHandle;
|
||||||
|
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
use crate::gateway::Updateable;
|
use crate::gateway::Updateable;
|
||||||
use crate::UInt64;
|
|
||||||
|
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
use chorus_macros::{observe_option_vec, Composite, Updateable};
|
use chorus_macros::{observe_option_vec, Composite, Updateable};
|
||||||
|
@ -297,7 +296,10 @@ pub struct ThreadMember {
|
||||||
pub id: Option<Snowflake>,
|
pub id: Option<Snowflake>,
|
||||||
pub user_id: Option<Snowflake>,
|
pub user_id: Option<Snowflake>,
|
||||||
pub join_timestamp: Option<DateTime<Utc>>,
|
pub join_timestamp: Option<DateTime<Utc>>,
|
||||||
pub flags: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub flags: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub flags: Option<sqlx_pg_uint::PgU64>,
|
||||||
pub member: Option<Shared<GuildMember>>,
|
pub member: Option<Shared<GuildMember>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ use crate::types::{
|
||||||
interfaces::WelcomeScreenObject,
|
interfaces::WelcomeScreenObject,
|
||||||
utils::Snowflake,
|
utils::Snowflake,
|
||||||
};
|
};
|
||||||
use crate::UInt64;
|
|
||||||
|
|
||||||
use super::{option_arc_rwlock_ptr_eq, vec_arc_rwlock_ptr_eq, PublicUser};
|
use super::{option_arc_rwlock_ptr_eq, vec_arc_rwlock_ptr_eq, PublicUser};
|
||||||
|
|
||||||
|
@ -274,7 +273,10 @@ pub struct GuildScheduledEvent {
|
||||||
pub entity_id: Option<Snowflake>,
|
pub entity_id: Option<Snowflake>,
|
||||||
pub entity_metadata: Option<GuildScheduledEventEntityMetadata>,
|
pub entity_metadata: Option<GuildScheduledEventEntityMetadata>,
|
||||||
pub creator: Option<Shared<User>>,
|
pub creator: Option<Shared<User>>,
|
||||||
pub user_count: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub user_count: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub user_count: Option<sqlx_pg_uint::PgU64>,
|
||||||
pub image: Option<String>,
|
pub image: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{
|
||||||
utils::Snowflake,
|
utils::Snowflake,
|
||||||
Shared,
|
Shared,
|
||||||
};
|
};
|
||||||
use crate::{UInt16, UInt8};
|
|
||||||
|
|
||||||
#[derive(Default, Debug, Deserialize, Serialize, Clone)]
|
#[derive(Default, Debug, Deserialize, Serialize, Clone)]
|
||||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||||
|
@ -24,8 +23,14 @@ pub struct Integration {
|
||||||
pub syncing: Option<bool>,
|
pub syncing: Option<bool>,
|
||||||
pub role_id: Option<String>,
|
pub role_id: Option<String>,
|
||||||
pub enabled_emoticons: Option<bool>,
|
pub enabled_emoticons: Option<bool>,
|
||||||
pub expire_behaviour: Option<UInt8>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
pub expire_grace_period: Option<UInt16>,
|
pub expire_behaviour: Option<u8>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub expire_behaviour: Option<sqlx_pg_uint::PgU8>,
|
||||||
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub expire_grace_period: Option<u16>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub expire_grace_period: Option<sqlx_pg_uint::PgU16>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub user: Option<Shared<User>>,
|
pub user: Option<Shared<User>>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{
|
||||||
Guild, InviteFlags, InviteTargetType, InviteType, Shared, Snowflake, VerificationLevel,
|
Guild, InviteFlags, InviteTargetType, InviteType, Shared, Snowflake, VerificationLevel,
|
||||||
WelcomeScreenObject,
|
WelcomeScreenObject,
|
||||||
};
|
};
|
||||||
use crate::{UInt32, UInt8};
|
|
||||||
|
|
||||||
use super::guild::GuildScheduledEvent;
|
use super::guild::GuildScheduledEvent;
|
||||||
use super::{Application, Channel, GuildMember, NSFWLevel, User};
|
use super::{Application, Channel, GuildMember, NSFWLevel, User};
|
||||||
|
@ -40,8 +39,14 @@ pub struct Invite {
|
||||||
pub invite_type: Option<InviteType>,
|
pub invite_type: Option<InviteType>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub inviter: Option<User>,
|
pub inviter: Option<User>,
|
||||||
pub max_age: Option<UInt32>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
pub max_uses: Option<UInt8>,
|
pub max_age: Option<u32>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub max_age: Option<sqlx_pg_uint::PgU32>,
|
||||||
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub max_uses: Option<u8>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub max_uses: Option<sqlx_pg_uint::PgU8>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub stage_instance: Option<InviteStageInstance>,
|
pub stage_instance: Option<InviteStageInstance>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
|
@ -51,7 +56,10 @@ pub struct Invite {
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub target_user: Option<User>,
|
pub target_user: Option<User>,
|
||||||
pub temporary: Option<bool>,
|
pub temporary: Option<bool>,
|
||||||
pub uses: Option<UInt32>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub uses: Option<u32>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub uses: Option<sqlx_pg_uint::PgU32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The guild an invite is for.
|
/// The guild an invite is for.
|
||||||
|
|
|
@ -15,7 +15,6 @@ use crate::types::{
|
||||||
utils::Snowflake,
|
utils::Snowflake,
|
||||||
Shared,
|
Shared,
|
||||||
};
|
};
|
||||||
use crate::{UInt32, UInt8};
|
|
||||||
|
|
||||||
use super::option_arc_rwlock_ptr_eq;
|
use super::option_arc_rwlock_ptr_eq;
|
||||||
|
|
||||||
|
@ -151,7 +150,10 @@ pub enum MessageReferenceType {
|
||||||
pub struct MessageInteraction {
|
pub struct MessageInteraction {
|
||||||
pub id: Snowflake,
|
pub id: Snowflake,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub interaction_type: UInt8,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub interaction_type: u8,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub interaction_type: sqlx_pg_uint::PgU8,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub user: User,
|
pub user: User,
|
||||||
pub member: Option<Shared<GuildMember>>,
|
pub member: Option<Shared<GuildMember>>,
|
||||||
|
@ -283,8 +285,14 @@ pub struct EmbedField {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||||
pub struct Reaction {
|
pub struct Reaction {
|
||||||
pub count: UInt32,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
pub burst_count: UInt32,
|
pub count: u32,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub count: sqlx_pg_uint::PgU32,
|
||||||
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub burst_count: u32,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub burst_count: sqlx_pg_uint::PgU32,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub me: bool,
|
pub me: bool,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
|
|
@ -8,7 +8,6 @@ use serde_aux::prelude::deserialize_option_number_from_string;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
|
||||||
use crate::types::utils::Snowflake;
|
use crate::types::utils::Snowflake;
|
||||||
use crate::{UInt16, UInt32};
|
|
||||||
|
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
use chorus_macros::{Composite, Updateable};
|
use chorus_macros::{Composite, Updateable};
|
||||||
|
@ -33,7 +32,10 @@ pub struct RoleObject {
|
||||||
pub hoist: bool,
|
pub hoist: bool,
|
||||||
pub icon: Option<String>,
|
pub icon: Option<String>,
|
||||||
pub unicode_emoji: Option<String>,
|
pub unicode_emoji: Option<String>,
|
||||||
pub position: UInt16,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub position: u16,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub position: sqlx_pg_uint::PgU16,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub permissions: PermissionFlags,
|
pub permissions: PermissionFlags,
|
||||||
pub managed: bool,
|
pub managed: bool,
|
||||||
|
@ -48,7 +50,10 @@ pub struct RoleObject {
|
||||||
pub struct RoleSubscriptionData {
|
pub struct RoleSubscriptionData {
|
||||||
pub role_subscription_listing_id: Snowflake,
|
pub role_subscription_listing_id: Snowflake,
|
||||||
pub tier_name: String,
|
pub tier_name: String,
|
||||||
pub total_months_subscribed: UInt32,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub total_months_subscribed: u32,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub total_months_subscribed: sqlx_pg_uint::PgU32,
|
||||||
pub is_renewal: bool,
|
pub is_renewal: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::types::utils::Snowflake;
|
use crate::types::utils::Snowflake;
|
||||||
use crate::UInt64;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||||
|
@ -14,7 +13,10 @@ pub struct SecurityKey {
|
||||||
pub user_id: String,
|
pub user_id: String,
|
||||||
pub key_id: String,
|
pub key_id: String,
|
||||||
pub public_key: String,
|
pub public_key: String,
|
||||||
pub counter: UInt64,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub counter: u64,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub counter: sqlx_pg_uint::PgU64,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +27,10 @@ impl Default for SecurityKey {
|
||||||
user_id: String::new(),
|
user_id: String::new(),
|
||||||
key_id: String::new(),
|
key_id: String::new(),
|
||||||
public_key: String::new(),
|
public_key: String::new(),
|
||||||
#[allow(clippy::useless_conversion)]
|
#[cfg(not(feature = "sqlx"))]
|
||||||
counter: 0u64.into(),
|
counter: 0,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
counter: sqlx_pg_uint::PgU64::from(0),
|
||||||
name: String::new(),
|
name: String::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize};
|
||||||
use crate::types::entities::User;
|
use crate::types::entities::User;
|
||||||
use crate::types::Shared;
|
use crate::types::Shared;
|
||||||
use crate::types::Snowflake;
|
use crate::types::Snowflake;
|
||||||
use crate::UInt8;
|
|
||||||
|
|
||||||
use super::arc_rwlock_ptr_eq;
|
use super::arc_rwlock_ptr_eq;
|
||||||
|
|
||||||
|
@ -35,7 +34,10 @@ impl PartialEq for Team {
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||||
pub struct TeamMember {
|
pub struct TeamMember {
|
||||||
pub membership_state: UInt8,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub membership_state: u8,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub membership_state: sqlx_pg_uint::PgU8,
|
||||||
pub permissions: Vec<String>,
|
pub permissions: Vec<String>,
|
||||||
pub team_id: Snowflake,
|
pub team_id: Snowflake,
|
||||||
pub user: Shared<User>,
|
pub user: Shared<User>,
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{
|
||||||
utils::Snowflake,
|
utils::Snowflake,
|
||||||
Shared,
|
Shared,
|
||||||
};
|
};
|
||||||
use crate::UInt64;
|
|
||||||
|
|
||||||
/// See <https://docs.spacebar.chat/routes/#cmp--schemas-template>
|
/// See <https://docs.spacebar.chat/routes/#cmp--schemas-template>
|
||||||
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
|
||||||
|
@ -19,7 +18,10 @@ pub struct GuildTemplate {
|
||||||
pub code: String,
|
pub code: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
pub usage_count: Option<UInt64>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub usage_count: Option<u64>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub usage_count: Option<sqlx_pg_uint::PgU64>,
|
||||||
pub creator_id: Snowflake,
|
pub creator_id: Snowflake,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
#[cfg_attr(feature = "sqlx", sqlx(skip))]
|
||||||
pub creator: Shared<User>,
|
pub creator: Shared<User>,
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
use crate::errors::ChorusError;
|
use crate::errors::ChorusError;
|
||||||
use crate::types::utils::Snowflake;
|
use crate::types::utils::Snowflake;
|
||||||
use crate::{UInt32, UInt8};
|
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_aux::prelude::deserialize_option_number_from_string;
|
use serde_aux::prelude::deserialize_option_number_from_string;
|
||||||
|
@ -48,7 +47,10 @@ pub struct User {
|
||||||
pub bot: Option<bool>,
|
pub bot: Option<bool>,
|
||||||
pub system: Option<bool>,
|
pub system: Option<bool>,
|
||||||
pub mfa_enabled: Option<bool>,
|
pub mfa_enabled: Option<bool>,
|
||||||
pub accent_color: Option<UInt32>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub accent_color: Option<u32>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub accent_color: Option<sqlx_pg_uint::PgU32>,
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(default))]
|
#[cfg_attr(feature = "sqlx", sqlx(default))]
|
||||||
pub locale: Option<String>,
|
pub locale: Option<String>,
|
||||||
pub verified: Option<bool>,
|
pub verified: Option<bool>,
|
||||||
|
@ -59,7 +61,10 @@ pub struct User {
|
||||||
#[serde(deserialize_with = "deserialize_option_number_from_string")]
|
#[serde(deserialize_with = "deserialize_option_number_from_string")]
|
||||||
pub flags: Option<UserFlags>,
|
pub flags: Option<UserFlags>,
|
||||||
pub premium_since: Option<DateTime<Utc>>,
|
pub premium_since: Option<DateTime<Utc>>,
|
||||||
pub premium_type: Option<UInt8>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub premium_type: Option<u8>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub premium_type: Option<sqlx_pg_uint::PgU8>,
|
||||||
pub pronouns: Option<String>,
|
pub pronouns: Option<String>,
|
||||||
pub public_flags: Option<UserFlags>,
|
pub public_flags: Option<UserFlags>,
|
||||||
pub banner: Option<String>,
|
pub banner: Option<String>,
|
||||||
|
@ -145,13 +150,19 @@ pub struct PublicUser {
|
||||||
pub username: Option<String>,
|
pub username: Option<String>,
|
||||||
pub discriminator: Option<String>,
|
pub discriminator: Option<String>,
|
||||||
pub avatar: Option<String>,
|
pub avatar: Option<String>,
|
||||||
pub accent_color: Option<UInt32>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub accent_color: Option<u32>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub accent_color: Option<sqlx_pg_uint::PgU32>,
|
||||||
pub banner: Option<String>,
|
pub banner: Option<String>,
|
||||||
pub theme_colors: Option<ThemeColors>,
|
pub theme_colors: Option<ThemeColors>,
|
||||||
pub pronouns: Option<String>,
|
pub pronouns: Option<String>,
|
||||||
pub bot: Option<bool>,
|
pub bot: Option<bool>,
|
||||||
pub bio: Option<String>,
|
pub bio: Option<String>,
|
||||||
pub premium_type: Option<UInt8>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub premium_type: Option<u8>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub premium_type: Option<sqlx_pg_uint::PgU8>,
|
||||||
pub premium_since: Option<DateTime<Utc>>,
|
pub premium_since: Option<DateTime<Utc>>,
|
||||||
pub public_flags: Option<UserFlags>,
|
pub public_flags: Option<UserFlags>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ use chrono::{serde::ts_milliseconds_option, Utc};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::types::Shared;
|
use crate::types::Shared;
|
||||||
use crate::{UInt16, UInt32, UInt8};
|
|
||||||
use serde_aux::field_attributes::deserialize_option_number_from_string;
|
use serde_aux::field_attributes::deserialize_option_number_from_string;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
|
@ -43,10 +42,16 @@ pub enum UserTheme {
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow))]
|
||||||
pub struct UserSettings {
|
pub struct UserSettings {
|
||||||
pub afk_timeout: Option<UInt16>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub afk_timeout: Option<u16>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub afk_timeout: Option<sqlx_pg_uint::PgU16>,
|
||||||
pub allow_accessibility_detection: bool,
|
pub allow_accessibility_detection: bool,
|
||||||
pub animate_emoji: bool,
|
pub animate_emoji: bool,
|
||||||
pub animate_stickers: UInt8,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub animate_stickers: u8,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub animate_stickers: sqlx_pg_uint::PgU8,
|
||||||
pub contact_sync_enabled: bool,
|
pub contact_sync_enabled: bool,
|
||||||
pub convert_emoticons: bool,
|
pub convert_emoticons: bool,
|
||||||
pub custom_status: Option<CustomStatus>,
|
pub custom_status: Option<CustomStatus>,
|
||||||
|
@ -55,7 +60,10 @@ pub struct UserSettings {
|
||||||
pub developer_mode: bool,
|
pub developer_mode: bool,
|
||||||
pub disable_games_tab: bool,
|
pub disable_games_tab: bool,
|
||||||
pub enable_tts_command: bool,
|
pub enable_tts_command: bool,
|
||||||
pub explicit_content_filter: UInt8,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub explicit_content_filter: u8,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub explicit_content_filter: sqlx_pg_uint::PgU8,
|
||||||
pub friend_source_flags: FriendSourceFlags,
|
pub friend_source_flags: FriendSourceFlags,
|
||||||
pub gateway_connected: Option<bool>,
|
pub gateway_connected: Option<bool>,
|
||||||
pub gif_auto_play: bool,
|
pub gif_auto_play: bool,
|
||||||
|
@ -80,8 +88,7 @@ pub struct UserSettings {
|
||||||
impl Default for UserSettings {
|
impl Default for UserSettings {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
#[allow(clippy::useless_conversion)]
|
afk_timeout: Some(3600.into()),
|
||||||
afk_timeout: Some(3600u16.into()),
|
|
||||||
allow_accessibility_detection: true,
|
allow_accessibility_detection: true,
|
||||||
animate_emoji: true,
|
animate_emoji: true,
|
||||||
#[cfg(not(feature = "sqlx"))]
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
@ -149,7 +156,10 @@ impl Default for FriendSourceFlags {
|
||||||
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
#[cfg_attr(feature = "sqlx", derive(sqlx::FromRow, sqlx::Type))]
|
||||||
#[cfg_attr(feature = "sqlx", sqlx(type_name = "interface_type"))]
|
#[cfg_attr(feature = "sqlx", sqlx(type_name = "interface_type"))]
|
||||||
pub struct GuildFolder {
|
pub struct GuildFolder {
|
||||||
pub color: Option<UInt32>,
|
#[cfg(not(feature = "sqlx"))]
|
||||||
|
pub color: Option<u32>,
|
||||||
|
#[cfg(feature = "sqlx")]
|
||||||
|
pub color: Option<sqlx_pg_uint::PgU32>,
|
||||||
pub guild_ids: Vec<String>,
|
pub guild_ids: Vec<String>,
|
||||||
// FIXME: What is this thing?
|
// FIXME: What is this thing?
|
||||||
// It's not a snowflake, and it's sometimes a string and sometimes an integer.
|
// It's not a snowflake, and it's sometimes a string and sometimes an integer.
|
||||||
|
|
Loading…
Reference in New Issue