@@ -56,21 +56,12 @@ pub enum CreateInteractionResponse<'a> {
5656 ///
5757 /// Corresponds to Discord's `MODAL`.
5858 Modal ( CreateModal < ' a > ) ,
59- /// Not valid for autocomplete and Ping interactions. Only available for applications with
60- /// monetization enabled.
61- ///
62- /// Responds to the interaction with an upgrade button.
63- ///
64- /// Corresponds to Discord's `PREMIUM_REQUIRED'.
65- #[ deprecated = "use premium button components via `CreateButton::new_premium` instead" ]
66- PremiumRequired ,
6759}
6860
6961impl serde:: Serialize for CreateInteractionResponse < ' _ > {
7062 fn serialize < S : serde:: Serializer > ( & self , serializer : S ) -> StdResult < S :: Ok , S :: Error > {
7163 use serde:: ser:: Error as _;
7264
73- #[ allow( deprecated) ]
7465 #[ allow( clippy:: match_same_arms) ] // hurts readability
7566 json ! ( {
7667 "type" : match self {
@@ -81,7 +72,6 @@ impl serde::Serialize for CreateInteractionResponse<'_> {
8172 Self :: UpdateMessage ( _) => 7 ,
8273 Self :: Autocomplete ( _) => 8 ,
8374 Self :: Modal ( _) => 9 ,
84- Self :: PremiumRequired => 10 ,
8575 } ,
8676 "data" : match self {
8777 Self :: Pong => Value :: Null ,
@@ -91,7 +81,6 @@ impl serde::Serialize for CreateInteractionResponse<'_> {
9181 Self :: UpdateMessage ( x) => serde_json:: to_value( x) . map_err( S :: Error :: custom) ?,
9282 Self :: Autocomplete ( x) => serde_json:: to_value( x) . map_err( S :: Error :: custom) ?,
9383 Self :: Modal ( x) => serde_json:: to_value( x) . map_err( S :: Error :: custom) ?,
94- Self :: PremiumRequired => Value :: Null ,
9584 }
9685 } )
9786 . serialize ( serializer)
0 commit comments