Skip to content

Commit

Permalink
Remove deprecated GuildChannel methods
Browse files Browse the repository at this point in the history
Remove the deprecated GuildChannel methods in preparation of an
incoming commit modifying GuildChannel.

Remove the following deprecated methods:

- `get_invites`
- `get_message`
- `get_messages`
- `get_reaction_users`
- `get_webhooks`
  • Loading branch information
Zeyla Hellyer committed May 27, 2017
1 parent 0102706 commit ab7f113
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions src/model/channel/guild_channel.rs
Expand Up @@ -614,57 +614,6 @@ impl GuildChannel {
pub fn webhooks(&self) -> Result<Vec<Webhook>> {
self.id.webhooks()
}

/// Alias of [`invites`].
///
/// [`invites`]: #method.invites
#[deprecated(since="0.1.5", note="Use `invites` instead.")]
#[inline]
pub fn get_invites(&self) -> Result<Vec<RichInvite>> {
self.invites()
}

/// 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)
}

/// Alias of [`webhooks`].
///
/// [`webhooks`]: #method.webhooks
#[deprecated(since="0.1.5", note="Use `webhooks` instead.")]
#[inline]
pub fn get_webhooks(&self) -> Result<Vec<Webhook>> {
self.webhooks()
}
}

#[cfg(feature="model")]
Expand Down

0 comments on commit ab7f113

Please sign in to comment.