Songbird: Tokio 1.0 (#36)

Migrates to the new version of tokio, requiring channel and sleep changes in a few locations. Additionally points to the in-tree v0.3 version of twilight.
This commit is contained in:
Kyle Simpson
2021-01-06 13:01:14 +00:00
committed by GitHub
parent d42e09f72b
commit f05b7414a0
14 changed files with 57 additions and 49 deletions

View File

@@ -5,8 +5,9 @@ authors = ["my name <my@email.address>"]
edition = "2018"
[dependencies]
env_logger = "~0.6"
log = "~0.4"
tracing = "0.1"
tracing-subscriber = "0.2"
tracing-futures = "0.2"
[dependencies.songbird]
path = "../../../"
@@ -17,5 +18,5 @@ git = "https://github.com/serenity-rs/serenity"
branch = "current"
[dependencies.tokio]
version = "0.2"
features = ["macros"]
version = "1.0"
features = ["macros", "rt-multi-thread"]

View File

@@ -153,6 +153,8 @@ struct General;
#[tokio::main]
async fn main() {
tracing_subscriber::fmt::init();
// Configure the client with your Discord bot token in the environment.
let token = env::var("DISCORD_TOKEN")
.expect("Expected a token in the environment");