aboutsummaryrefslogtreecommitdiff
path: root/src/model/guild
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-07-11 22:13:57 +0200
committeracdenisSK <[email protected]>2017-07-11 22:13:57 +0200
commitebc4e51fe3b1e5bc61dc99da25a22d2e2277ffc6 (patch)
tree1eeee881705d8721cdb4238461e5422043a63ca1 /src/model/guild
parentAdd a way to add multiple fields at once (diff)
downloadserenity-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/guild')
-rw-r--r--src/model/guild/guild_id.rs91
-rw-r--r--src/model/guild/member.rs8
-rw-r--r--src/model/guild/mod.rs100
-rw-r--r--src/model/guild/partial_guild.rs91
-rw-r--r--src/model/guild/role.rs9
5 files changed, 0 insertions, 299 deletions
diff --git a/src/model/guild/guild_id.rs b/src/model/guild/guild_id.rs
index c707413..5d318a5 100644
--- a/src/model/guild/guild_id.rs
+++ b/src/model/guild/guild_id.rs
@@ -513,97 +513,6 @@ impl GuildId {
pub fn webhooks(&self) -> Result<Vec<Webhook>> {
http::get_guild_webhooks(self.0)
}
-
- /// Alias of [`bans`].
- ///
- /// [`bans`]: #method.bans
- #[deprecated(since="0.1.5", note="Use `bans` instead.")]
- #[inline]
- pub fn get_bans(&self) -> Result<Vec<Ban>> {
- self.bans()
- }
-
- /// Alias of [`channels`].
- ///
- /// [`channels`]: #method.channels
- #[deprecated(since="0.1.5", note="Use `channels` instead.")]
- #[inline]
- pub fn get_channels(&self) -> Result<HashMap<ChannelId, GuildChannel>> {
- self.channels()
- }
-
- /// Alias of [`emoji`].
- ///
- /// [`emoji`]: #method.emoji
- #[deprecated(since="0.1.5", note="Use `emoji` instead.")]
- #[inline]
- pub fn get_emoji<E: Into<EmojiId>>(&self, emoji_id: E) -> Result<Emoji> {
- self.emoji(emoji_id)
- }
-
- /// Alias of [`emojis`].
- ///
- /// [`emojis`]: #method.emojis
- #[deprecated(since="0.1.5", note="Use `emojis` instead.")]
- #[inline]
- pub fn get_emojis(&self) -> Result<Vec<Emoji>> {
- self.emojis()
- }
-
- /// Alias of [`integrations`].
- ///
- /// [`integrations`]: #method.integrations
- #[deprecated(since="0.1.5", note="Use `integrations` instead.")]
- #[inline]
- pub fn get_integrations(&self) -> Result<Vec<Integration>> {
- self.integrations()
- }
-
- /// 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 [`member`].
- ///
- /// [`member`]: #method.member
- #[deprecated(since="0.1.5", note="Use `member` instead.")]
- #[inline]
- pub fn get_member<U: Into<UserId>>(&self, user_id: U) -> Result<Member> {
- self.member(user_id)
- }
-
- /// Alias of [`members`].
- ///
- /// [`members`]: #method.members
- #[deprecated(since="0.1.5", note="Use `members` instead.")]
- #[inline]
- pub fn get_members<U>(&self, limit: Option<u64>, after: Option<U>)
- -> Result<Vec<Member>> where U: Into<UserId> {
- self.members(limit, after)
- }
-
- /// Alias of [`prune_count`].
- ///
- /// [`prune_count`]: #method.prune_count
- #[deprecated(since="0.1.5", note="Use `prune_count` instead.")]
- #[inline]
- pub fn get_prune_count(&self, days: u16) -> Result<GuildPrune> {
- self.prune_count(days)
- }
-
- /// 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()
- }
}
impl Display for GuildId {
diff --git a/src/model/guild/member.rs b/src/model/guild/member.rs
index 053360d..2b382a0 100644
--- a/src/model/guild/member.rs
+++ b/src/model/guild/member.rs
@@ -206,14 +206,6 @@ impl Member {
http::edit_member(self.guild_id.0, self.user.read().unwrap().id.0, &map)
}
- /// Returns the value of [`guild_id`].
- ///
- /// [`guild_id`]: #structfield.guild_id
- #[deprecated(since="0.2.1", note="Use the `guild_id` structfield instead.")]
- pub fn find_guild(&self) -> Result<GuildId> {
- Ok(self.guild_id)
- }
-
/// Kick the member from the guild.
///
/// **Note**: Requires the [Kick Members] permission.
diff --git a/src/model/guild/mod.rs b/src/model/guild/mod.rs
index 97eb3a4..fb91654 100644
--- a/src/model/guild/mod.rs
+++ b/src/model/guild/mod.rs
@@ -1008,106 +1008,6 @@ impl Guild {
pub fn webhooks(&self) -> Result<Vec<Webhook>> {
self.id.webhooks()
}
-
- /// Alias of [`bans`].
- ///
- /// [`bans`]: #method.bans
- #[deprecated(since="0.1.5", note="Use `bans` instead.")]
- #[inline]
- pub fn get_bans(&self) -> Result<Vec<Ban>> {
- self.bans()
- }
-
- /// Alias of [`channels`].
- ///
- /// [`channels`]: #method.channels
- #[deprecated(since="0.1.5", note="Use `channels` instead.")]
- #[inline]
- pub fn get_channels(&self) -> Result<HashMap<ChannelId, GuildChannel>> {
- self.channels()
- }
-
- /// Alias of [`emoji`].
- ///
- /// [`emoji`]: #method.emoji
- #[deprecated(since="0.1.5", note="Use `emoji` instead.")]
- #[inline]
- pub fn get_emoji<E: Into<EmojiId>>(&self, emoji_id: E) -> Result<Emoji> {
- self.emoji(emoji_id)
- }
-
- /// Alias of [`emojis`].
- ///
- /// [`emojis`]: #method.emojis
- #[deprecated(since="0.1.5", note="Use `emojis` instead.")]
- #[inline]
- pub fn get_emojis(&self) -> Result<Vec<Emoji>> {
- self.emojis()
- }
-
- /// Alias of [`integrations`].
- ///
- /// [`integrations`]: #method.integrations
- #[deprecated(since="0.1.5", note="Use `integrations` instead.")]
- #[inline]
- pub fn get_integrations(&self) -> Result<Vec<Integration>> {
- self.integrations()
- }
-
- /// 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 [`member`].
- ///
- /// [`member`]: #method.member
- #[deprecated(since="0.1.5", note="Use `member` instead.")]
- #[inline]
- pub fn get_member<U: Into<UserId>>(&self, user_id: U) -> Result<Member> {
- self.member(user_id)
- }
-
- /// Alias of [`members`].
- ///
- /// [`members`]: #method.members
- #[deprecated(since="0.1.5", note="Use `members` instead.")]
- #[inline]
- pub fn get_members<U>(&self, limit: Option<u64>, after: Option<U>)
- -> Result<Vec<Member>> where U: Into<UserId> {
- self.members(limit, after)
- }
-
- /// Alias of [`member_named`].
- ///
- /// [`member_named`]: #method.member_named
- #[deprecated(since="0.1.5", note="Use `member_named` instead.")]
- #[inline]
- pub fn get_member_named(&self, name: &str) -> Option<&Member> {
- self.member_named(name)
- }
-
- /// Alias of [`prune_count`].
- ///
- /// [`prune_count`]: #method.prune_count
- #[deprecated(since="0.1.5", note="Use `prune_count` instead.")]
- #[inline]
- pub fn get_prune_count(&self, days: u16) -> Result<GuildPrune> {
- self.prune_count(days)
- }
-
- /// 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()
- }
}
impl<'de> Deserialize<'de> for Guild {
diff --git a/src/model/guild/partial_guild.rs b/src/model/guild/partial_guild.rs
index 694a64b..26d4257 100644
--- a/src/model/guild/partial_guild.rs
+++ b/src/model/guild/partial_guild.rs
@@ -477,95 +477,4 @@ impl PartialGuild {
pub fn webhooks(&self) -> Result<Vec<Webhook>> {
self.id.webhooks()
}
-
- /// Alias of [`bans`].
- ///
- /// [`bans`]: #method.bans
- #[deprecated(since="0.1.5", note="Use `bans` instead.")]
- #[inline]
- pub fn get_bans(&self) -> Result<Vec<Ban>> {
- self.bans()
- }
-
- /// Alias of [`channels`].
- ///
- /// [`channels`]: #method.channels
- #[deprecated(since="0.1.5", note="Use `channels` instead.")]
- #[inline]
- pub fn get_channels(&self) -> Result<HashMap<ChannelId, GuildChannel>> {
- self.channels()
- }
-
- /// Alias of [`emoji`].
- ///
- /// [`emoji`]: #method.emoji
- #[deprecated(since="0.1.5", note="Use `emoji` instead.")]
- #[inline]
- pub fn get_emoji<E: Into<EmojiId>>(&self, emoji_id: E) -> Result<Emoji> {
- self.emoji(emoji_id)
- }
-
- /// Alias of [`emojis`].
- ///
- /// [`emojis`]: #method.emojis
- #[deprecated(since="0.1.5", note="Use `emojis` instead.")]
- #[inline]
- pub fn get_emojis(&self) -> Result<Vec<Emoji>> {
- self.emojis()
- }
-
- /// Alias of [`integrations`].
- ///
- /// [`integrations`]: #method.integrations
- #[deprecated(since="0.1.5", note="Use `integrations` instead.")]
- #[inline]
- pub fn get_integrations(&self) -> Result<Vec<Integration>> {
- self.integrations()
- }
-
- /// 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 [`member`].
- ///
- /// [`member`]: #method.member
- #[deprecated(since="0.1.5", note="Use `member` instead.")]
- #[inline]
- pub fn get_member<U: Into<UserId>>(&self, user_id: U) -> Result<Member> {
- self.member(user_id)
- }
-
- /// Alias of [`members`].
- ///
- /// [`members`]: #method.members
- #[deprecated(since="0.1.5", note="Use `members` instead.")]
- #[inline]
- pub fn get_members<U>(&self, limit: Option<u64>, after: Option<U>)
- -> Result<Vec<Member>> where U: Into<UserId> {
- self.members(limit, after)
- }
-
- /// Alias of [`prune_count`].
- ///
- /// [`prune_count`]: #method.prune_count
- #[deprecated(since="0.1.5", note="Use `prune_count` instead.")]
- #[inline]
- pub fn get_prune_count(&self, days: u16) -> Result<GuildPrune> {
- self.prune_count(days)
- }
-
- /// 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()
- }
}
diff --git a/src/model/guild/role.rs b/src/model/guild/role.rs
index 8383675..bed641b 100644
--- a/src/model/guild/role.rs
+++ b/src/model/guild/role.rs
@@ -101,15 +101,6 @@ impl Role {
}
}
- /// Alias of [`edit`]
- ///
- /// [`edit`]: struct.Role.html#method.edit
- #[deprecated(since="0.2.1", note="Please use `edit` instead.")]
- #[cfg(all(feature="builder", feature="cache"))]
- pub fn edit_role<F: FnOnce(EditRole) -> EditRole>(&self, f: F) -> Result<Role> {
- self.edit(f)
- }
-
/// Searches the cache for the guild that owns the role.
///
/// # Errors