diff options
| author | Zeyla Hellyer <[email protected]> | 2017-04-09 10:44:43 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-04-09 10:44:43 -0700 |
| commit | c74cc15f8969c8db68119d07a4f273a0d3fc44f4 (patch) | |
| tree | a37a4989a4af4b6d78fe1d40a62a329ae336578c /src/ext/voice/threading.rs | |
| parent | Remove selfbot support (diff) | |
| download | serenity-c74cc15f8969c8db68119d07a4f273a0d3fc44f4.tar.xz serenity-c74cc15f8969c8db68119d07a4f273a0d3fc44f4.zip | |
Remove support for group calls and guild sync
Calls and guild sync are essentially leftovers from selfbot support
removal, the former moreso.
Removes the following `model::event` structs:
- CallCreateEvent
- CallDeleteEvent
- CallUpdateEvent
- GuildSyncEvent
which also removes the following `model::event::Event` variants:
`client::gateway::Shard::sync_calls` has been removed.
The following `client::Client` methods have been removed:
- `on_call_create`
- `on_call_delete`
- `on_call_update`
- `on_guild_sync`
Removes the following items on `ext::cache::Cache`:
```
ext::cache::Cache::{
// fields
calls,
// methods
get_call,
update_with_call_create,
update_with_call_delete,
update_with_call_update,
update_with_guild_sync,
}
```
Voice structs and methods now take solely a `guild_id` instead of a
`target`, due to the handling of 1-on-1 and group calls being removed.
This continues off commit d9118c0.<Paste>
Diffstat (limited to 'src/ext/voice/threading.rs')
| -rw-r--r-- | src/ext/voice/threading.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ext/voice/threading.rs b/src/ext/voice/threading.rs index 0aaafba..3986f48 100644 --- a/src/ext/voice/threading.rs +++ b/src/ext/voice/threading.rs @@ -1,19 +1,17 @@ use std::sync::mpsc::{Receiver as MpscReceiver, TryRecvError}; use std::thread::Builder as ThreadBuilder; use super::connection::Connection; -use super::{Status, Target}; +use super::Status; use ::internal::Timer; +use ::model::GuildId; -pub fn start(target_id: Target, rx: MpscReceiver<Status>) { - let name = match target_id { - Target::Channel(channel_id) => format!("Serenity Voice (C{})", channel_id), - Target::Guild(guild_id) => format!("Serenity Voice (G{})", guild_id), - }; +pub fn start(guild_id: GuildId, rx: MpscReceiver<Status>) { + let name = format!("Serenity Voice (G{})", guild_id); ThreadBuilder::new() .name(name) .spawn(move || runner(rx)) - .expect(&format!("[Voice] Error starting target: {:?}", target_id)); + .expect(&format!("[Voice] Error starting guild: {:?}", guild_id)); } fn runner(rx: MpscReceiver<Status>) { |