Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(model): Add guild field to interaction. #2383

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Erk-
Copy link
Member

@Erk- Erk- commented Nov 14, 2024

Note that this adds a new partial guild since there is a issue with
the name of the fields of this specific partial guild.

Closes #2381

Note that this adds a new partial guild since there is a issue with
the name of the fields of this specific partial guild.

Closes #2381
@github-actions github-actions bot added c-model Affects the model crate t-feature Addition of a new feature labels Nov 14, 2024
@github-actions github-actions bot added c-cache Affects the cache crate c-standby Affects the standby crate labels Nov 14, 2024
Comment on lines +487 to +495
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize, Hash)]
pub struct InteractionPartialGuild {
/// Id of the guild.
pub id: Option<Id<GuildMarker>>,
/// Enabled guild features
pub features: Option<Vec<GuildFeature>>,
pub locale: Option<String>,
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably those fields are guaranteed to exist for interactions, but it's not documented and I'm not 100% sure about that. ig option is fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this partial guild is strange so I will rather go the safe route. For example the guild id is sent in the interaction so maybe they will stop duplication it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-cache Affects the cache crate c-model Affects the model crate c-standby Affects the standby crate t-feature Addition of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add guild partial to Interaction
2 participants