We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2274b32 commit 8437326Copy full SHA for 8437326
src/model/application/interaction.rs
@@ -64,6 +64,17 @@ impl Interaction {
64
}
65
66
67
+ /// Guild ID the interaction was sent from, if any.
68
+ #[must_use]
69
+ pub fn guild_id(&self) -> Option<GuildId> {
70
+ match self {
71
+ Self::Ping(_) => None,
72
+ Self::Command(i) | Self::Autocomplete(i) => i.guild_id,
73
+ Self::Component(i) => i.guild_id,
74
+ Self::Modal(i) => i.guild_id,
75
+ }
76
77
+
78
/// Gets the interaction application Id
79
#[must_use]
80
pub fn application_id(&self) -> ApplicationId {
0 commit comments