@@ -71,10 +71,6 @@ pub struct CreateMessage<'a> {
7171 enforce_nonce : bool ,
7272 #[ serde( skip_serializing_if = "Option::is_none" ) ]
7373 poll : Option < CreatePoll < ' a , Ready > > ,
74-
75- // The following fields are handled separately.
76- #[ serde( skip) ]
77- reactions : Cow < ' a , [ ReactionType ] > ,
7874}
7975
8076impl < ' a > CreateMessage < ' a > {
@@ -140,12 +136,6 @@ impl<'a> CreateMessage<'a> {
140136 self
141137 }
142138
143- /// Adds a list of reactions to create after the message's sent.
144- pub fn reactions ( mut self , reactions : impl Into < Cow < ' a , [ ReactionType ] > > ) -> Self {
145- self . reactions = reactions. into ( ) ;
146- self
147- }
148-
149139 /// Appends a file to the message.
150140 ///
151141 /// **Note**: Requires the [Attach Files] permission.
@@ -287,31 +277,14 @@ impl<'a> CreateMessage<'a> {
287277 /// [Send Messages]: Permissions::SEND_MESSAGES
288278 /// [Attach Files]: Permissions::ATTACH_FILES
289279 #[ cfg( feature = "http" ) ]
290- pub async fn execute (
291- mut self ,
292- http : & Http ,
293- channel_id : GenericChannelId ,
294- guild_id : Option < GuildId > ,
295- ) -> Result < Message > {
280+ pub async fn execute ( mut self , http : & Http , channel_id : GenericChannelId ) -> Result < Message > {
296281 self . check_length ( ) ?;
297282
298283 let files = self . attachments . new_attachments ( ) ;
299284 if self . allowed_mentions . is_none ( ) {
300285 self . allowed_mentions . clone_from ( & http. default_allowed_mentions ) ;
301286 }
302287
303- let mut message = http. send_message ( channel_id, files, & self ) . await ?;
304-
305- for reaction in self . reactions . iter ( ) {
306- http. create_reaction ( channel_id, message. id , reaction) . await ?;
307- }
308-
309- // HTTP sent Messages don't have guild_id set, so we fill it in ourselves by best effort
310- if message. guild_id . is_none ( ) {
311- // If we were called from GuildChannel, we can fill in the GuildId ourselves.
312- message. guild_id = guild_id;
313- }
314-
315- Ok ( message)
288+ http. send_message ( channel_id, files, & self ) . await
316289 }
317290}
0 commit comments