File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ pub struct CommandInteraction {
55
55
/// Always `1`.
56
56
pub version : u8 ,
57
57
/// Permissions the app or bot has within the channel the interaction was sent from.
58
- // TODO(next): This is now always serialized.
59
- pub app_permissions : Option < Permissions > ,
58
+ pub app_permissions : Permissions ,
60
59
/// The selected language of the invoking user.
61
60
pub locale : FixedString ,
62
61
/// The guild's preferred locale.
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub struct ComponentInteraction {
53
53
/// The message this interaction was triggered by, if it is a component.
54
54
pub message : Box < Message > ,
55
55
/// Permissions the app or bot has within the channel the interaction was sent from.
56
- pub app_permissions : Option < Permissions > ,
56
+ pub app_permissions : Permissions ,
57
57
/// The selected language of the invoking user.
58
58
pub locale : FixedString ,
59
59
/// The guild's preferred locale.
Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ impl Interaction {
56
56
57
57
/// Permissions the app or bot has within the channel the interaction was sent from.
58
58
#[ must_use]
59
- pub fn app_permissions ( & self ) -> Option < Permissions > {
59
+ pub fn app_permissions ( & self ) -> Permissions {
60
60
match self {
61
- Self :: Ping ( _ ) => None ,
61
+ Self :: Ping ( i ) => i . app_permissions ,
62
62
Self :: Command ( i) | Self :: Autocomplete ( i) => i. app_permissions ,
63
63
Self :: Component ( i) => i. app_permissions ,
64
64
Self :: Modal ( i) => i. app_permissions ,
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub struct ModalInteraction {
51
51
#[ serde( skip_serializing_if = "Option::is_none" ) ]
52
52
pub message : Option < Box < Message > > ,
53
53
/// Permissions the app or bot has within the channel the interaction was sent from.
54
- pub app_permissions : Option < Permissions > ,
54
+ pub app_permissions : Permissions ,
55
55
/// The selected language of the invoking user.
56
56
pub locale : FixedString ,
57
57
/// The guild's preferred locale.
Original file line number Diff line number Diff line change @@ -17,4 +17,6 @@ pub struct PingInteraction {
17
17
pub token : FixedString ,
18
18
/// Always `1`.
19
19
pub version : u8 ,
20
+ /// Permissions the app or bot has within the channel the interaction was sent from.
21
+ pub app_permissions : Permissions ,
20
22
}
You can’t perform that action at this time.
0 commit comments