diff options
Diffstat (limited to 'src/ext/voice/mod.rs')
| -rw-r--r-- | src/ext/voice/mod.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/ext/voice/mod.rs b/src/ext/voice/mod.rs index 9ccb1d9..94e3b40 100644 --- a/src/ext/voice/mod.rs +++ b/src/ext/voice/mod.rs @@ -17,7 +17,6 @@ pub use self::manager::Manager; pub use self::streamer::{ffmpeg, pcm, ytdl}; use self::connection_info::ConnectionInfo; -use ::model::{ChannelId, GuildId}; const CRYPTO_MODE: &'static str = "xsalsa20_poly1305"; @@ -28,33 +27,3 @@ pub enum Status { SetReceiver(Option<Box<AudioReceiver>>), SetSender(Option<Box<AudioSource>>), } - -/// Denotes the target to manage a connection for. -/// -/// For most cases, targets should entirely be guilds, except for the one case -/// where a user account can be in a 1-to-1 or group call. -/// -/// It _may_ be possible in the future for bots to be in multiple groups. If -/// this turns out to be the case, supporting that now rather than messily in -/// the future is the best option. Thus, these types of calls are specified by -/// the group's channel Id. -#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] -pub enum Target { - /// Used for managing a voice handler for a 1-on-1 (user-to-user) or group - /// call. - Channel(ChannelId), - /// Used for managing a voice handler for a guild. - Guild(GuildId), -} - -impl From<ChannelId> for Target { - fn from(channel_id: ChannelId) -> Target { - Target::Channel(channel_id) - } -} - -impl From<GuildId> for Target { - fn from(guild_id: GuildId) -> Target { - Target::Guild(guild_id) - } -} |