diff options
| author | acdenisSK <[email protected]> | 2017-07-11 22:13:57 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-11 22:13:57 +0200 |
| commit | ebc4e51fe3b1e5bc61dc99da25a22d2e2277ffc6 (patch) | |
| tree | 1eeee881705d8721cdb4238461e5422043a63ca1 /src/model/channel/group.rs | |
| parent | Add a way to add multiple fields at once (diff) | |
| download | serenity-ebc4e51fe3b1e5bc61dc99da25a22d2e2277ffc6.tar.xz serenity-ebc4e51fe3b1e5bc61dc99da25a22d2e2277ffc6.zip | |
Remove the deprecated functions
It's already been enough time for people to migrate
Diffstat (limited to 'src/model/channel/group.rs')
| -rw-r--r-- | src/model/channel/group.rs | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/model/channel/group.rs b/src/model/channel/group.rs index 8bb4e2c..0b4f380 100644 --- a/src/model/channel/group.rs +++ b/src/model/channel/group.rs @@ -278,37 +278,6 @@ impl Group { self.channel_id.say(content) } - /// Sends a file along with optional message contents. The filename _must_ - /// be specified. - /// - /// Refer to [`ChannelId::send_file`] for examples and more information. - /// - /// The [Attach Files] and [Send Messages] permissions are required. - /// - /// **Note**: Message contents must be under 2000 unicode code points. - /// - /// # Errors - /// - /// Returns an - /// [`HttpError::InvalidRequest(PayloadTooLarge)`][`HttpError::InvalidRequest`] - /// if the file is too large to send. - /// - /// If the content of the message is over the above limit, then a - /// [`ModelError::MessageTooLong`] will be returned, containing the number - /// of unicode code points over the limit. - /// - /// [`ChannelId::send_file`]: struct.ChannelId.html#method.send_file - /// [`HttpError::InvalidRequest`]: ../http/enum.HttpError.html#variant.InvalidRequest - /// [`ModelError::MessageTooLong`]: enum.ModelError.html#variant.MessageTooLong - /// [Attach Files]: permissions/constant.ATTACH_FILES.html - /// [Send Messages]: permissions/constant.SEND_MESSAGES.html - #[deprecated(since="0.2.0", note="Please use `send_files` instead.")] - #[allow(deprecated)] - pub fn send_file<F, R>(&self, file: R, filename: &str, f: F) -> Result<Message> - where F: FnOnce(CreateMessage) -> CreateMessage, R: Read { - self.channel_id.send_file(file, filename, f) - } - /// Sends (a) file(s) along with optional message contents. /// /// Refer to [`ChannelId::send_files`] for examples and more information. @@ -357,37 +326,4 @@ impl Group { pub fn unpin<M: Into<MessageId>>(&self, message_id: M) -> Result<()> { self.channel_id.unpin(message_id) } - - /// Alias of [`message`]. - /// - /// [`message`]: #method.message - #[deprecated(since="0.1.5", note="Use `message` instead.")] - #[inline] - pub fn get_message<M: Into<MessageId>>(&self, message_id: M) -> Result<Message> { - self.message(message_id) - } - - /// Alias of [`messages`]. - /// - /// [`messages`]: #method.messages - #[deprecated(since="0.1.5", note="Use `messages` instead.")] - #[inline] - pub fn get_messages<F>(&self, f: F) -> Result<Vec<Message>> - where F: FnOnce(GetMessages) -> GetMessages { - self.messages(f) - } - - /// Alias of [`reaction_users`]. - /// - /// [`reaction_users`]: #method.reaction_users - #[deprecated(since="0.1.5", note="Use `reaction_users` instead.")] - #[inline] - pub fn get_reaction_users<M, R, U>(&self, - message_id: M, - reaction_type: R, - limit: Option<u8>, - after: Option<U>) - -> Result<Vec<User>> where M: Into<MessageId>, R: Into<ReactionType>, U: Into<UserId> { - self.reaction_users(message_id, reaction_type, limit, after) - } } |