This commit undoes #64 (and bumps the library MSRV accordingly), and modifies #60 to match the new `Call` connection handling. This was tested using `cargo make ready`, and rustc v1.49.0 on `examples/serenity/voice`.
This commit is contained in:
@@ -85,11 +85,6 @@ version = "0.1"
|
|||||||
optional = true
|
optional = true
|
||||||
version = "1"
|
version = "1"
|
||||||
|
|
||||||
# TEMPORARY: remove on next breaking.
|
|
||||||
[dependencies.spinning_top]
|
|
||||||
optional = true
|
|
||||||
version = "=0.2.2"
|
|
||||||
|
|
||||||
[dependencies.streamcatcher]
|
[dependencies.streamcatcher]
|
||||||
optional = true
|
optional = true
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
@@ -153,7 +148,6 @@ gateway-core = [
|
|||||||
"flume",
|
"flume",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"pin-project",
|
"pin-project",
|
||||||
"spinning_top",
|
|
||||||
]
|
]
|
||||||
driver = [
|
driver = [
|
||||||
"async-tungstenite",
|
"async-tungstenite",
|
||||||
@@ -177,7 +171,6 @@ driver-core = [
|
|||||||
"rand",
|
"rand",
|
||||||
"serenity-voice-model",
|
"serenity-voice-model",
|
||||||
"spin_sleep",
|
"spin_sleep",
|
||||||
"spinning_top",
|
|
||||||
"streamcatcher",
|
"streamcatcher",
|
||||||
"typemap_rev",
|
"typemap_rev",
|
||||||
"url",
|
"url",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[![docs-badge][]][docs] [![build badge]][build] [![guild-badge][]][guild] [![crates.io version]][crates.io link] [![rust 1.48.0+ badge]][rust 1.48.0+ link]
|
[![docs-badge][]][docs] [![build badge]][build] [![guild-badge][]][guild] [![crates.io version]][crates.io link] [![rust 1.49.0+ badge]][rust 1.49.0+ link]
|
||||||
|
|
||||||
# Songbird
|
# Songbird
|
||||||
|
|
||||||
@@ -69,5 +69,5 @@ Songbird's logo is based upon the copyright-free image ["Black-Capped Chickadee"
|
|||||||
[crates.io link]: https://crates.io/crates/songbird
|
[crates.io link]: https://crates.io/crates/songbird
|
||||||
[crates.io version]: https://img.shields.io/crates/v/songbird.svg?style=flat-square
|
[crates.io version]: https://img.shields.io/crates/v/songbird.svg?style=flat-square
|
||||||
|
|
||||||
[rust 1.48.0+ badge]: https://img.shields.io/badge/rust-1.48.0+-93450a.svg?style=flat-square
|
[rust 1.49.0+ badge]: https://img.shields.io/badge/rust-1.49.0+-93450a.svg?style=flat-square
|
||||||
[rust 1.48.0+ link]: https://blog.rust-lang.org/2020/11/19/Rust-1.48.html
|
[rust 1.49.0+ link]: https://blog.rust-lang.org/2020/12/31/Rust-1.49.0.html
|
||||||
|
|||||||
@@ -279,15 +279,15 @@ impl Call {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `id` of the channel, if connected to any.
|
/// Returns `id` of the channel, if connected or connecting to any.
|
||||||
///
|
///
|
||||||
/// **Note:**: Returned `id` is of the channel, to which bot performed connection.
|
/// This remains set after a connection failure, to allow for reconnection
|
||||||
/// It is possible that it is different from actual channel due to ability of server's admin to
|
/// as needed. This will change if moved into another voice channel by an
|
||||||
/// move bot from channel to channel. This is to be fixed with next breaking change release.
|
/// admin, and will be unset if kicked from a voice channel.
|
||||||
#[instrument(skip(self))]
|
#[instrument(skip(self))]
|
||||||
pub fn current_channel(&self) -> Option<ChannelId> {
|
pub fn current_channel(&self) -> Option<ChannelId> {
|
||||||
match &self.connection {
|
match &self.connection {
|
||||||
Some((id, _, _)) => Some(*id),
|
Some((progress, _)) => Some(progress.channel_id()),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user