aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-05-14 21:35:59 -0700
committerZeyla Hellyer <[email protected]>2017-05-22 16:44:46 -0700
commita0a933eb324fda96aedd1dfe2fbbcb10fa5190f5 (patch)
treed18ea1a1bdab9768b13c509920416d893b0016df /src/model
parentAdd `Invite::url()`, `RichInvite::url()` (diff)
downloadserenity-a0a933eb324fda96aedd1dfe2fbbcb10fa5190f5.tar.xz
serenity-a0a933eb324fda96aedd1dfe2fbbcb10fa5190f5.zip
Remove more remaining selfbot support
We removed these a long time ago, and these were missed.
Diffstat (limited to 'src/model')
-rw-r--r--src/model/channel/message.rs6
-rw-r--r--src/model/channel/mod.rs18
-rw-r--r--src/model/event.rs11
-rw-r--r--src/model/mod.rs33
-rw-r--r--src/model/user.rs146
5 files changed, 0 insertions, 214 deletions
diff --git a/src/model/channel/message.rs b/src/model/channel/message.rs
index 593aa48..91f6c89 100644
--- a/src/model/channel/message.rs
+++ b/src/model/channel/message.rs
@@ -31,12 +31,6 @@ pub struct Message {
pub edited_timestamp: Option<String>,
/// Array of embeds sent with the message.
pub embeds: Vec<Embed>,
- /// Whether the message is the "found" message in a search.
- ///
- /// Note that this is only relevant in the context of searches, and will
- /// otherwise always be `false`.
- #[serde(default)]
- pub hit: bool,
/// Indicator of the type of message this is, i.e. whether it is a regular
/// message or a system message.
#[serde(rename="type")]
diff --git a/src/model/channel/mod.rs b/src/model/channel/mod.rs
index a54acdf..33e4e9b 100644
--- a/src/model/channel/mod.rs
+++ b/src/model/channel/mod.rs
@@ -497,21 +497,3 @@ pub enum PermissionOverwriteType {
/// A role which is having its permission overwrites edited.
Role(RoleId),
}
-
-/// The results of a search, including the total results and a vector of
-/// messages.
-#[derive(Clone, Debug, Deserialize)]
-pub struct SearchResult {
- /// An amount of messages returned from the result.
- ///
- /// Note that this is a vectof of a vector of messages. Each "set" of
- /// messages contains the "found" message, as well as optional surrounding
- /// messages for context.
- #[serde(rename="messages")]
- pub results: Vec<Vec<Message>>,
- /// The number of messages directly related to the search.
- ///
- /// This does not count contextual messages.
- #[serde(rename="total_results")]
- pub total: u64,
-}
diff --git a/src/model/event.rs b/src/model/event.rs
index 5d81b71..c658ee2 100644
--- a/src/model/event.rs
+++ b/src/model/event.rs
@@ -79,17 +79,6 @@ impl<'de> Deserialize<'de> for ChannelUpdateEvent {
}
#[derive(Clone, Debug, Deserialize)]
-pub struct FriendSuggestionCreateEvent {
- pub reasons: Vec<SuggestionReason>,
- pub suggested_user: User,
-}
-
-#[derive(Clone, Copy, Debug, Deserialize)]
-pub struct FriendSuggestionDeleteEvent {
- pub suggested_user_id: UserId,
-}
-
-#[derive(Clone, Debug, Deserialize)]
pub struct GuildBanAddEvent {
pub guild_id: GuildId,
pub user: User,
diff --git a/src/model/mod.rs b/src/model/mod.rs
index e51970d..3f1a508 100644
--- a/src/model/mod.rs
+++ b/src/model/mod.rs
@@ -124,39 +124,6 @@ pub enum GuildContainer {
Id(GuildId),
}
-/// Denotes the target for a search.
-///
-/// This can be either a [`Guild`] - which can search multiple [`Channel`]s -
-/// or a `Channel`.
-///
-/// [`Channel`]: enum.Channel.html
-/// [`Guild`]: struct.Guild.html
-#[derive(Copy, Clone, Debug)]
-pub enum SearchTarget {
- /// An indicator that the target for a [`Search`] is a [`Channel`].
- ///
- /// [`Channel`]: enum.Channel.html
- /// [`Search`]: struct.Search.html
- Channel(ChannelId),
- /// An indicator that the target for a [`Search`] is a [`Guild`].
- ///
- /// [`Guild`]: struct.Guild.html
- /// [`Search`]: struct.Search.html
- Guild(GuildId),
-}
-
-impl From<ChannelId> for SearchTarget {
- fn from(channel_id: ChannelId) -> SearchTarget {
- SearchTarget::Channel(channel_id)
- }
-}
-
-impl From<GuildId> for SearchTarget {
- fn from(guild_id: GuildId) -> SearchTarget {
- SearchTarget::Guild(guild_id)
- }
-}
-
/// Information about a user's application. An application does not necessarily
/// have an associated bot user.
#[derive(Clone, Debug, Deserialize)]
diff --git a/src/model/user.rs b/src/model/user.rs
index 8e38c44..bff101b 100644
--- a/src/model/user.rs
+++ b/src/model/user.rs
@@ -13,41 +13,6 @@ use std::sync::{Arc, RwLock};
#[cfg(feature="cache")]
use ::client::CACHE;
-/// An override for a channel.
-#[derive(Clone, Debug, Deserialize)]
-pub struct ChannelOverride {
- /// The channel the override is for.
- pub channel_id: ChannelId,
- /// The notification level to use for the channel.
- pub message_notifications: NotificationLevel,
- /// Indicator of whether the channel is muted.
- ///
- /// In the client, this will not show an unread indicator for the channel,
- /// although it will continue to show when the user is mentioned in it.
- pub muted: bool,
-}
-
-/// The type of a user connection.
-///
-/// Note that this is related to a [`Connection`], and has nothing to do with
-/// WebSocket connections.
-///
-/// [`Connection`]: struct.Connection.html
-#[derive(Copy, Clone, Debug, Deserialize, Hash, Eq, PartialEq, PartialOrd, Ord, Serialize)]
-pub enum ConnectionType {
- /// A Battle.net connection.
- #[serde(rename="battlenet")]
- BattleNet,
- /// A Steam connection.
- #[serde(rename="steam")]
- Steam,
- /// A Twitch.tv connection.
- #[serde(rename="twitch")]
- TwitchTv,
- #[serde(rename="youtube")]
- YouTube,
-}
-
/// Information about the current user.
#[derive(Clone, Debug, Deserialize)]
pub struct CurrentUser {
@@ -170,17 +135,6 @@ impl DefaultAvatar {
}
}
-/// Flags about who may add the current user as a friend.
-#[derive(Clone, Debug, Deserialize)]
-pub struct FriendSourceFlags {
- #[serde(default)]
- pub all: bool,
- #[serde(default)]
- pub mutual_friends: bool,
- #[serde(default)]
- pub mutual_guilds: bool,
-}
-
enum_number!(
/// Identifier for the notification level of a channel.
NotificationLevel {
@@ -236,73 +190,6 @@ impl Default for OnlineStatus {
}
}
-/// A summary of messages for a channel.
-///
-/// These are received within a [`ReadyEvent`].
-///
-/// [`ReadyEvent`]: event/struct.ReadyEvent.html
-#[derive(Clone, Debug, Deserialize)]
-pub struct ReadState {
- /// The unique Id of the channel.
- pub id: ChannelId,
- /// The Id of the latest message sent to the channel.
- pub last_message_id: Option<MessageId>,
- /// The time that a message was most recently pinned to the channel.
- pub last_pin_timestamp: Option<String>,
- /// The amount of times that the current user has been mentioned in the
- /// channel since the last message ACKed.
- #[serde(default)]
- pub mention_count: u64,
-}
-
-/// Information about a relationship that a user has with another user.
-#[derive(Clone, Debug, Deserialize)]
-pub struct Relationship {
- /// Unique Id of the other user.
- pub id: UserId,
- /// The type of the relationship, e.g. blocked, friends, etc.
- #[serde(rename="type")]
- pub kind: RelationshipType,
- /// The User instance of the other user.
- pub user: User,
-}
-
-enum_number!(
- /// The type of relationship between the current user and another user.
- RelationshipType {
- /// The current user has a friend request ignored.
- Ignored = 0,
- /// The current user has the other user added as a friend.
- Friends = 1,
- /// The current user has the other blocked.
- Blocked = 2,
- /// The current user has an incoming friend request from the other user.
- IncomingRequest = 3,
- /// The current user has a friend request outgoing.
- OutgoingRequest = 4,
- }
-);
-
-/// A reason that a user was suggested to be added as a friend.
-#[derive(Clone, Debug, Deserialize)]
-pub struct SuggestionReason {
- /// The name of the user on the platform.
- pub name: String,
- /// The type of reason.
- pub kind: u64,
- /// The platform that the current user and the other user share.
- pub platform: ConnectionType,
-}
-
-/// The current user's progress through the Discord tutorial.
-///
-/// This is only applicable to selfbots.
-#[derive(Clone, Debug, Deserialize)]
-pub struct Tutorial {
- pub indicators_confirmed: Vec<String>,
- pub indicators_suppressed: bool,
-}
-
/// Information about a user.
#[derive(Clone, Debug, Deserialize)]
pub struct User {
@@ -536,39 +423,6 @@ impl fmt::Display for User {
}
}
-/// A user's connection.
-///
-/// **Note**: This is not in any way related to a WebSocket connection.
-#[derive(Clone, Debug, Deserialize)]
-pub struct UserConnection {
- /// The User's Id through the connection.
- pub id: String,
- /// Whether the user automatically syncs friends through the connection.
- pub friend_sync: bool,
- /// The relevant integrations.
- pub integrations: Vec<Integration>,
- /// The type of connection set.
- #[serde(rename="type")]
- pub kind: ConnectionType,
- /// The user's name through the connection.
- pub name: String,
- /// Indicator of whether the connection has been revoked.
- pub revoked: bool,
- /// The visibility level.
- pub visibility: u64,
-}
-
-/// Settings about a guild in regards to notification configuration.
-#[derive(Clone, Debug, Deserialize)]
-pub struct UserGuildSettings {
- pub channel_overriddes: Vec<ChannelOverride>,
- pub guild_id: Option<GuildId>,
- pub message_notifications: NotificationLevel,
- pub mobile_push: bool,
- pub muted: bool,
- pub suppress_everyone: bool,
-}
-
impl UserId {
/// Creates a direct message channel between the [current user] and the
/// user. This can also retrieve the channel if one already exists.