diff options
Diffstat (limited to 'src/model/channel/mod.rs')
| -rw-r--r-- | src/model/channel/mod.rs | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs index 730410e..5c29a52 100644 --- a/src/model/channel/mod.rs +++ b/src/model/channel/mod.rs @@ -105,37 +105,6 @@ impl Channel { self.id().delete_message(message_id) } - /// Deletes all messages by Ids from the given vector in the channel. - /// - /// The minimum amount of messages is 2 and the maximum amount is 100. - /// - /// Requires the [Manage Messages] permission. - /// - /// **Note**: This uses bulk delete endpoint which is not available - /// for user accounts. - /// - /// **Note**: Messages that are older than 2 weeks can't be deleted using - /// this method. - /// - /// [Manage Messages]: permissions/constant.MANAGE_MESSAGES.html - #[deprecated(since="0.2.0", note="Use the inner channel's `delete_messages` method instead.")] - #[inline] - pub fn delete_messages(&self, message_ids: &[MessageId]) -> Result<()> { - self.id().delete_messages(message_ids) - } - - /// Deletes all permission overrides in the channel from a member - /// or role. - /// - /// **Note**: Requires the [Manage Channel] permission. - /// - /// [Manage Channel]: permissions/constant.MANAGE_CHANNELS.html - #[deprecated(since="0.2.0", note="Use the inner channel's `delete_permission` method instead.")] - #[inline] - pub fn delete_permission(&self, permission_type: PermissionOverwriteType) -> Result<()> { - self.id().delete_permission(permission_type) - } - /// Deletes the given [`Reaction`] from the channel. /// /// **Note**: Requires the [Manage Messages] permission, _if_ the current @@ -275,37 +244,6 @@ impl Channel { self.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.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. @@ -365,39 +303,6 @@ impl Channel { pub fn unpin<M: Into<MessageId>>(&self, message_id: M) -> Result<()> { self.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) - } } impl<'de> Deserialize<'de> for Channel { |