From 30177474e13e30b8778edf7bdd6a4d8468ec7ac4 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Sat, 9 Jan 2021 15:45:16 -0600 Subject: [PATCH 01/10] Initial async update commit + Naive port of all code to async serenity + Limited testing has been done, but the bot seems to work + Removed WhiteRabbit dependency (does not work in async) + Further cleanup needed --- .gitignore | 4 +- Cargo.lock | 1173 +++++++++++++---------------------------- Cargo.toml | 8 +- LICENSE | 2 +- src/discord/events.rs | 57 +- src/discord/mod.rs | 168 +++--- src/main.rs | 152 +++--- 7 files changed, 550 insertions(+), 1014 deletions(-) diff --git a/.gitignore b/.gitignore index 20770a1..523b8bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /target **/*.rs.bk .env -log/* +log/ +config.toml +.idea \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 84471b7..0d13284 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,13 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "addr2line" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gimli 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "adler32" version = "1.0.4" @@ -42,6 +34,31 @@ name = "arc-swap" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "async-trait" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "async-tungstenite" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tungstenite 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" version = "0.2.14" @@ -52,39 +69,19 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "backtrace" -version = "0.3.48" +name = "base64" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "addr2line 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "object 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "base64" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -94,21 +91,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "block-buffer" -version = "0.7.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -116,46 +102,20 @@ name = "bumpalo" version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bytecount" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "bytes" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "cargo_metadata" -version = "0.6.4" +name = "bytes" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "cc" @@ -167,6 +127,11 @@ name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "chrono" version = "0.4.11" @@ -211,12 +176,12 @@ dependencies = [ [[package]] name = "command_attr" -version = "0.2.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -235,17 +200,8 @@ dependencies = [ ] [[package]] -name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "core-foundation-sys" -version = "0.7.0" +name = "cpuid-bool" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -256,14 +212,6 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ct-logs" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "diesel" version = "1.4.4" @@ -274,7 +222,7 @@ dependencies = [ "diesel_derives 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "mysqlclient-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -282,9 +230,9 @@ name = "diesel_derives" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -298,10 +246,10 @@ dependencies = [ [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -317,20 +265,6 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "error-chain" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.48 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "flate2" version = "1.0.14" @@ -348,23 +282,26 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" +name = "form_urlencoded" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" +name = "futures" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "futures-channel" @@ -372,6 +309,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -390,9 +328,9 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -410,9 +348,11 @@ name = "futures-util" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -423,10 +363,11 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.12.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -439,32 +380,23 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "gimli" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "h2" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -475,16 +407,6 @@ dependencies = [ "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "http" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "http" version = "0.2.1" @@ -497,10 +419,10 @@ dependencies = [ [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -509,6 +431,11 @@ name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "httpdate" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "humantime" version = "1.3.0" @@ -519,7 +446,7 @@ dependencies = [ [[package]] name = "hype_bot" -version = "0.1.0" +version = "0.2.0" dependencies = [ "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "chrono-tz 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -531,49 +458,46 @@ dependencies = [ "log4rs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serenity 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serenity 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "strfmt 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "white_rabbit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper" -version = "0.13.5" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-rustls" -version = "0.20.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls-native-certs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -597,19 +521,16 @@ dependencies = [ [[package]] name = "input_buffer" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "iovec" -version = "0.1.4" +name = "ipnet" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "itoa" @@ -618,19 +539,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "js-sys" -version = "0.3.37" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -662,14 +574,6 @@ name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lock_api" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "lock_api" version = "0.3.4" @@ -721,11 +625,6 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "memchr" version = "2.3.3" @@ -745,9 +644,9 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "migrations_internals 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -774,31 +673,23 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.21" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ntapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miow" -version = "0.2.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -810,16 +701,6 @@ dependencies = [ "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "net2" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "nom" version = "4.2.3" @@ -829,6 +710,14 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ntapi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.42" @@ -863,19 +752,9 @@ dependencies = [ "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "object" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "openssl-probe" -version = "0.1.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -886,26 +765,6 @@ dependencies = [ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parking_lot" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parking_lot" version = "0.10.2" @@ -915,35 +774,6 @@ dependencies = [ "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parking_lot_core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parking_lot_core" version = "0.7.2" @@ -978,14 +808,32 @@ dependencies = [ "pin-project-internal 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pin-project" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pin-project-internal" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -993,6 +841,11 @@ name = "pin-project-lite" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pin-project-lite" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pin-utils" version = "0.1.0-alpha.4" @@ -1020,20 +873,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "1.0.10" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "pulldown-cmark" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -1044,37 +889,7 @@ name = "quote" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1089,15 +904,6 @@ dependencies = [ "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -1107,19 +913,6 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "rand_core" version = "0.5.1" @@ -1128,14 +921,6 @@ dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -1144,62 +929,6 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "redox_syscall" version = "0.1.56" @@ -1241,48 +970,40 @@ name = "regex-syntax" version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "remove_dir_all" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "reqwest" -version = "0.10.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1304,76 +1025,23 @@ name = "rust-ini" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rustls" -version = "0.16.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rustls" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustls-native-certs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ryu" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "schannel" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "scopeguard" version = "1.1.0" @@ -1388,41 +1056,6 @@ dependencies = [ "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "security-framework" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "security-framework-sys" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "serde" version = "0.8.23" @@ -1462,9 +1095,9 @@ name = "serde_derive" version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1487,13 +1120,13 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1509,54 +1142,41 @@ dependencies = [ [[package]] name = "serenity" -version = "0.8.6" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-trait 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "async-tungstenite 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "command_attr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "command_attr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tungstenite 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "typemap_rev 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uwl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sha-1" -version = "0.8.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "skeptic" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytecount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cargo_metadata 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cpuid-bool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1564,19 +1184,21 @@ name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "smallvec" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "socket2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "spin" version = "0.5.2" @@ -1599,23 +1221,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "1.0.17" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -1650,14 +1263,6 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "threadpool" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "time" version = "0.1.43" @@ -1669,43 +1274,61 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.18" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-macros 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-rustls" -version = "0.13.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-util" -version = "0.3.1" +name = "tokio-stream" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-util" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-stream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1721,6 +1344,44 @@ name = "tower-service" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "tracing" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-attributes 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-core" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-futures" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "traitobject" version = "0.1.0" @@ -1733,19 +1394,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "tungstenite" -version = "0.9.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "input_buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1757,6 +1418,11 @@ dependencies = [ "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "typemap_rev" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "typenum" version = "1.12.0" @@ -1816,9 +1482,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "url" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1859,16 +1526,6 @@ name = "version_check" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "walkdir" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "want" version = "0.3.0" @@ -1885,64 +1542,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen" -version = "0.2.60" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.60" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bumpalo 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.10" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.60" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.60" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.60" +version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1950,8 +1607,8 @@ name = "web-sys" version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "js-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1965,30 +1622,20 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "white_rabbit" -version = "0.1.1" +name = "webpki-roots" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "skeptic 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "winapi" version = "0.3.8" @@ -1998,24 +1645,11 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2023,21 +1657,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winreg" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "yaml-rust" version = "0.4.3" @@ -2047,53 +1672,44 @@ dependencies = [ ] [metadata] -"checksum addr2line 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a49806b9dadc843c61e7c97e72490ad7f7220ae249012fbda9ad0609457c0543" "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" "checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum arc-swap 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" +"checksum async-trait 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" +"checksum async-tungstenite 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7cc5408453d37e2b1c6f01d8078af1da58b6cfa6a80fa2ede3bd2b9a6ada9c4" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum backtrace 0.3.48 (registry+https://github.com/rust-lang/crates.io-index)" = "0df2f85c8a2abbe3b7d7e748052fdd9b76a0458fdeb16ad4223f5eca78c7c130" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +"checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +"checksum base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" "checksum bumpalo 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" -"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -"checksum bytecount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b92204551573580e078dc80017f36a213eb77a0450e4ddd8cfa0f3f2d1f0178f" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" -"checksum cargo_metadata 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d1b4d380e1bab994591a24c2bdd1b054f64b60bef483a8c598c7c345bc3bbe" +"checksum bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" "checksum chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" "checksum chrono-tz 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa1878c18b5b01b9978d5f130fe366d434022004d12fb87c182e8459b427c4a3" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum command_attr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c27d6155f93d880b6379d93ddc9b2417b3b69b715360c5f25525e4576338a381" +"checksum command_attr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef54b146e4ff8a036b9d632fd48c183c9757992535e5f557275f4a01dfd9c7c7" "checksum config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9107d78ed62b3fa5a86e7d18e647abed48cfd8f8fab6c72f4cdb982d196f7e6" -"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +"checksum cpuid-bool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" "checksum diesel 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "33d7ca63eb2efea87a7f56a283acc49e2ce4b2bd54adf7465dc1d81fef13d8fc" "checksum diesel_derives 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" "checksum diesel_migrations 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c" -"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +"checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" "checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" -"checksum error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" -"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" "checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" "checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" "checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" @@ -2101,116 +1717,84 @@ dependencies = [ "checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" "checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" "checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" -"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +"checksum generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum gimli 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum h2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "377038bf3c89d18d6ca1431e7a5027194fbd724ca10592b9487ede5e8e144f42" +"checksum h2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" "checksum hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" -"checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" "checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +"checksum http-body 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14" -"checksum hyper-rustls 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08" +"checksum hyper 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" +"checksum hyper-rustls 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" -"checksum input_buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e1b822cc844905551931d6f81608ed5f50a79c1078a4e2b4d42dbc7c1eedfbf" -"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +"checksum input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" +"checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" "checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" -"checksum js-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" "checksum linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" "checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" "checksum log4rs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b47ba5437ccdf01e4addd4d2347ef561911d57f908f4db1e1b192d5c25a92715" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum migrations_internals 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860" "checksum migrations_macros 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" "checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" -"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum mio 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" +"checksum miow 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" "checksum mysqlclient-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9637d93448044078aaafea7419aed69d301b4a12bcc4aa0ae856eb169bef85" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +"checksum ntapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" "checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum object 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" -"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +"checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" "checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" "checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" "checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" "checksum parse-zoneinfo 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ee19a3656dadae35a33467f9714f1228dd34766dbe49e10e656b5296867aea" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pin-project 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6f6a7f5eee6292c559c793430c55c00aea9d3b3d1905e855806ca4d7253426a2" +"checksum pin-project 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" "checksum pin-project-internal 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "8988430ce790d8682672117bc06dda364c0be32d3abd738234f19f3240bad99a" +"checksum pin-project-internal 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" "checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +"checksum pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ba36e0a6cc5a4c645073f4984f1ed55d09f5857d4de7c14550baa81a39ef5a17" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" "checksum proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" -"checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" -"checksum pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15" +"checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" -"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" "checksum regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" "checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" -"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b81e49ddec5109a9dcfc5f2a317ff53377c915e9ae9d4f2fb50914b85614e2" +"checksum reqwest 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" "checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" "checksum rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -"checksum rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" -"checksum rustls-native-certs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5" +"checksum rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" "checksum ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" -"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum schannel 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "039c25b130bd8c1321ee2d7de7fde2659fa9c2744e4bb29711cfc852ea53cd19" "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" "checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -"checksum security-framework 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "572dfa3a0785509e7a44b5b4bebcf94d41ba34e9ed9eb9df722545c3b3c4144a" -"checksum security-framework-sys 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8ddb15a5fec93b7021b8a9e96009c5d8d51c15673569f7c0f6b7204e5b7b404f" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" "checksum serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" "checksum serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0b833c5ad67d52ced5f5938b2980f32a9c1c5ef047f0b4fb3127e7a423c76153" @@ -2218,35 +1802,39 @@ dependencies = [ "checksum serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" "checksum serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" "checksum serde_test 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" -"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +"checksum serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" "checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" -"checksum serenity 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3dcb21751f749cd60c0779dddb08a8d339d87b79318c536eaf875b3985c22c" -"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -"checksum skeptic 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fb8ed853fdc19ce09752d63f3a2e5b5158aeb261520cd75eb618bd60305165" +"checksum serenity 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4dac8367ecfd3380c00dcedf5eb9a47888ae74ae391419b5b1f7735895ed8df4" +"checksum sha-1 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ce3cdf1b5e620a498ee6f2a171885ac7e22f0e12089ec4b3d22b84921792507c" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" "checksum smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a" +"checksum socket2 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" "checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" "checksum strfmt 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b278b244ef7aa5852b277f52dd0c6cac3a109919e1f6d699adde63251227a30f" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +"checksum syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" "checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -"checksum tokio 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "34ef16d072d2b6dc8b4a56c70f5c5ced1a37752116f8e7c1e80c659aa7cb6713" -"checksum tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" -"checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +"checksum tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d258221f566b6c803c7b4714abadc080172b272090cdc5e244a6d4dd13c3a6bd" +"checksum tokio-macros 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" +"checksum tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +"checksum tokio-stream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e4cdeb73537e63f98adcd73138af75e3f368ccaecffaa29d7eb61b9f5a440457" +"checksum tokio-util 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "36135b7e7da911f5f8b9331209f7fab4cc13498f3fff52f72a710c78187e3148" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +"checksum tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" +"checksum tracing-attributes 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +"checksum tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +"checksum tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum tungstenite 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8a0c2bd5aeb7dcd2bb32e472c8872759308495e5eccc942e929a513cd8d36110" +"checksum tungstenite 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" +"checksum typemap_rev 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "078d41124321488746becfa144977b9b54667af408ff933cbbce9d83e7796ac9" "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" "checksum ucd-util 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236" "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" @@ -2256,7 +1844,7 @@ dependencies = [ "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" "checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" -"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +"checksum url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" "checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" "checksum utf8-ranges 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" "checksum uwl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" @@ -2264,25 +1852,20 @@ dependencies = [ "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" -"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f" -"checksum wasm-bindgen-backend 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd" -"checksum wasm-bindgen-futures 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7add542ea1ac7fdaa9dc25e031a6af33b7d63376292bd24140c637d00d1c312a" -"checksum wasm-bindgen-macro 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" -"checksum wasm-bindgen-macro-support 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" -"checksum wasm-bindgen-shared 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" +"checksum wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" +"checksum wasm-bindgen-backend 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" +"checksum wasm-bindgen-futures 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" +"checksum wasm-bindgen-macro 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" +"checksum wasm-bindgen-macro-support 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" +"checksum wasm-bindgen-shared 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" "checksum web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" "checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -"checksum webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" -"checksum white_rabbit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "65781ea0a31d0bf8de2f6d832d0216d15eda102fe47b59a668ac5ce3974dff7b" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" +"checksum webpki-roots 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +"checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" "checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" diff --git a/Cargo.toml b/Cargo.toml index 9cdd1cc..44a72d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hype_bot" -version = "0.1.0" +version = "0.2.0" authors = ["Joey Hines "] edition = "2018" @@ -19,8 +19,8 @@ log = "0.4.8" log4rs = "0.11.0" strfmt = "0.1.6" url = "2.1.1" -white_rabbit = "0.1.1" +tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } [dependencies.serenity] -version = "0.8.6" -features = ["framework", "standard_framework"] +version = "0.10.2" +features = ["framework", "standard_framework", "utils", "builder"] diff --git a/LICENSE b/LICENSE index 9eea483..8ccf9d4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 ZeroHD +Copyright (c) 2020-2021 ZeroHD Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/discord/events.rs b/src/discord/events.rs index 05e8b47..41650f2 100644 --- a/src/discord/events.rs +++ b/src/discord/events.rs @@ -20,25 +20,25 @@ use url::Url; /// /// **Note** /// You can only post events you have created. Only one preview event can exist at a time. -fn confirm(ctx: &mut Context, msg: &Message, _args: Args) -> CommandResult { - let config = get_config(&ctx.data)?; - let draft_event = get_draft_event(&ctx.data)?; +async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { + let config = get_config(&ctx.data).await?; + let draft_event = get_draft_event(&ctx.data).await?; let mut new_event = draft_event.event.clone(); // Check to to see if message author is the owner of the pending event if draft_event.creator_id == msg.author.id.0 { // Send event message - let event_msg = send_event_msg(&ctx.http, &config, config.event_channel, &new_event, true)?; + let event_msg = send_event_msg(&ctx, &config, config.event_channel, &new_event, true).await?; - msg.reply(&ctx, "Event posted!")?; + msg.reply(&ctx, "Event posted!").await?; new_event.message_id = event_msg.id.0.to_string(); let event = insert_event(config.db_url.clone(), &new_event)?; - schedule_event(&ctx.http, &ctx.data, &event); + schedule_event(&ctx, &event).await; } else { - msg.reply(&ctx, format!("You do not have a pending event!"))?; + msg.reply(&ctx, format!("You do not have a pending event!")).await?; } Ok(()) @@ -57,29 +57,29 @@ fn confirm(ctx: &mut Context, msg: &Message, _args: Args) -> CommandResult { /// /// **Organizer** /// The user or group that is organizing the event, defaults to the user creating the event -fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { +async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { // Get config - let config = get_config(&ctx.data)?; + let config = get_config(&ctx.data).await?; // Parse args let event_name = match args.find::() { Ok(event_name) => event_name.replace("\"", ""), Err(_) => { - msg.reply(&ctx, "No event name provided.".to_string())?; + msg.reply(&ctx, "No event name provided.".to_string()).await?; return Ok(()); } }; let date_string = match args.find::() { Ok(date_string) => date_string.replace("\"", ""), Err(_) => { - msg.reply(&ctx, "No date provided.".to_string())?; + msg.reply(&ctx, "No date provided.".to_string()).await?; return Ok(()); } }; let description = match args.find::() { Ok(desc) => desc.replace("\"", ""), Err(_) => { - msg.reply(&ctx, "No description provided.".to_string())?; + msg.reply(&ctx, "No description provided.".to_string()).await?; return Ok(()); } }; @@ -87,7 +87,7 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { let location = match args.find::() { Ok(desc) => desc.replace("\"", ""), Err(_) => { - msg.reply(&ctx, "No location provided.".to_string())?; + msg.reply(&ctx, "No location provided.".to_string()).await?; return Ok(()); } }; @@ -99,7 +99,7 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { let organizer = match args.find::() { Ok(link) => link.replace("\"", ""), - Err(_) => msg.author.mention(), + Err(_) => msg.author.mention().to_string(), }; // Parse date @@ -110,7 +110,7 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { msg.reply( &ctx, "Invalid date format. Format is HH:MMam YYYY-MM-DD".to_string(), - )?; + ).await?; return Ok(()); } }; @@ -130,7 +130,7 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { let event_time = input_date.with_timezone(&Utc).naive_utc(); if Utc::now().naive_utc() > event_time { - msg.reply(&ctx, "The scheduled time has already passed!")?; + msg.reply(&ctx, "The scheduled time has already passed!").await?; return Ok(()); } @@ -141,10 +141,10 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { .clean_user(false) .clean_everyone(true); - let description = content_safe(&ctx.cache, description, &settings); - let event_name = content_safe(&ctx.cache, event_name, &settings); - let location = content_safe(&ctx.cache, location, &settings); - let organizer = content_safe(&ctx.cache, organizer, &settings); + let description = content_safe(&ctx.cache, description, &settings).await; + let event_name = content_safe(&ctx.cache, event_name, &settings).await; + let location = content_safe(&ctx.cache, location, &settings).await; + let organizer = content_safe(&ctx.cache, organizer, &settings).await; update_draft_event( &ctx, @@ -155,8 +155,8 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { thumbnail_link, event_time, msg.author.id.0, - )?; - send_draft_event(&ctx, msg.channel_id)?; + ).await?; + send_draft_event(&ctx, msg.channel_id).await?; Ok(()) } @@ -165,31 +165,32 @@ fn create(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { /// Cancels an already scheduled event /// /// `~cancel "event name"` -fn cancel(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { - let config = get_config(&ctx.data)?; +async fn cancel(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { + let config = get_config(&ctx.data).await?; // Parse args let event_name = args.single::()?.replace("\"", ""); let event = get_event_by_name(config.db_url.clone(), event_name)?; let message_id = event.message_id.parse::()?; - let message = ctx.http.get_message(config.event_channel, message_id)?; + let message = ctx.http.get_message(config.event_channel, message_id).await?; let reaction_users = message .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) + .await .unwrap_or(Vec::::new()); let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); for user in reaction_users { - send_dm_message(&ctx.http, user, &cancel_msg); + send_dm_message(ctx, user, &cancel_msg).await; } remove_event(config.db_url.clone(), event.id)?; - message.delete(&ctx)?; + message.delete(&ctx).await?; - msg.reply(&ctx, &cancel_msg)?; + msg.reply(&ctx, &cancel_msg).await?; Ok(()) } diff --git a/src/discord/mod.rs b/src/discord/mod.rs index e780fe3..6c53cdb 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -1,19 +1,20 @@ use crate::database::models::{Event, NewEvent}; -use crate::database::{get_event_by_msg_id, remove_event, set_reminder}; +use crate::database::{get_event_by_msg_id, remove_event}; use crate::hypebot_config::HypeBotConfig; use crate::{INTERESTED_EMOJI, UNINTERESTED_EMOJI}; use chrono::{DateTime, NaiveDateTime, Utc}; use serenity::framework::standard::{CommandError, CommandResult}; use serenity::http::Http; use serenity::model::prelude::{ChannelId, Message, Reaction, User}; -use serenity::prelude::TypeMapKey; -use serenity::prelude::{Context, RwLock, ShareMap}; +use serenity::prelude::{TypeMapKey, TypeMap}; +use serenity::prelude::{Context, RwLock}; use serenity::utils::Colour; use serenity::Result; +use serenity::framework::standard::macros::hook; use std::collections::HashMap; use std::sync::Arc; use strfmt::strfmt; -use white_rabbit::{DateResult, Scheduler}; +use diesel::result::Error; pub mod events; @@ -28,22 +29,18 @@ impl TypeMapKey for DraftEvent { type Value = DraftEvent; } -pub struct SchedulerKey; - -impl TypeMapKey for SchedulerKey { - type Value = Arc>; -} - /// Send a message to a reaction user -pub fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, msg_text: &str) { - if let Ok(config) = get_config(&ctx.data) { +pub async fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, msg_text: &str) { + if let Ok(config) = get_config(&ctx.data).await { let db_link = config.db_url.clone(); let message_id = reaction.message_id.0.to_string(); let event = match get_event_by_msg_id(db_link, message_id) { Ok(event) => event, Err(e) => { - error!("Error getting event from reaction {}", e); + if !matches!(e, diesel::result::Error::NotFound) { + error!("Error getting event from reaction {}", e); + } return; } }; @@ -62,16 +59,16 @@ pub fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, msg_te msg = format!("**{}** has already started!", &event.event_name) } - if let Ok(user) = reaction.user(&ctx.http) { - send_dm_message(&ctx.http, user, &msg); + if let Ok(user) = reaction.user(&ctx).await { + send_dm_message(&ctx, user, &msg).await; } } } /// Send a DM message to a user -pub fn send_dm_message(http: &Http, user: User, message: &String) { - if let Ok(dm_channel) = user.create_dm_channel(&http) { - dm_channel.send_message(&http, |m| m.content(message)).ok(); +pub async fn send_dm_message(ctx: &Context, user: User, message: &String) { + if let Ok(dm_channel) = user.create_dm_channel(ctx).await { + dm_channel.send_message(ctx, |m| m.content(message)).await.ok(); } } @@ -87,14 +84,14 @@ pub fn get_countdown_link(event_name: &String, utc: &DateTime) -> String { } /// Sends the event message to the event channel -pub fn send_event_msg( - http: &Http, +pub async fn send_event_msg( + ctx: &Context, config: &HypeBotConfig, channel_id: u64, event: &NewEvent, react: bool, ) -> Result { - let channel = http.get_channel(channel_id)?; + let channel = ctx.http.get_channel(channel_id).await?; let utc_time = DateTime::::from_utc(event.event_time.clone(), Utc); @@ -109,7 +106,7 @@ pub fn send_event_msg( .join(" "); // Send message - let msg = channel.id().send_message(&http, |m| { + let msg = channel.id().send_message(&ctx, |m| { m.embed(|e| { e.title(event.event_name.clone()) .color(Colour::PURPLE) @@ -126,19 +123,19 @@ pub fn send_event_msg( .field("Location", &event.event_loc, true) .field("Organizer", &event.organizer, true) }).content(ping_roles) - })?; + }).await?; if react { // Add reacts - msg.react(http, INTERESTED_EMOJI)?; - msg.react(http, UNINTERESTED_EMOJI)?; + msg.react(ctx, INTERESTED_EMOJI).await?; + msg.react(ctx, UNINTERESTED_EMOJI).await?; } Ok(msg) } /// Updates the draft event stored in the context data -pub fn update_draft_event( +pub async fn update_draft_event( ctx: &Context, event_name: String, event_desc: String, @@ -148,10 +145,10 @@ pub fn update_draft_event( event_time: NaiveDateTime, creator_id: u64, ) -> CommandResult { - let mut data = ctx.data.write(); + let mut data = ctx.data.write().await; let mut draft_event = data .get_mut::() - .ok_or(CommandError("Unable get draft event!".to_string()))?; + .ok_or(CommandError::from("Unable get draft event!".to_string()))?; draft_event.event.event_name = event_name; draft_event.event.event_desc = event_desc; @@ -165,62 +162,52 @@ pub fn update_draft_event( } /// Sends the draft event stored in the context data -pub fn send_draft_event(ctx: &Context, channel: ChannelId) -> CommandResult { - let data = ctx.data.read(); +pub async fn send_draft_event(ctx: &Context, channel: ChannelId) -> CommandResult { + let data = ctx.data.read().await; let config = data .get::() - .ok_or(CommandError("Config not found!".to_string()))?; + .ok_or(CommandError::from("Config not found!".to_string()))?; let draft_event = data .get::() - .ok_or(CommandError("Draft event not found!".to_string()))?; + .ok_or(CommandError::from("Draft event not found!".to_string()))?; channel.send_message(&ctx, |m| { m.content(format!( "Draft message, use the `confirm` command to post it." )) - })?; - send_event_msg(&ctx.http, config, channel.0, &draft_event.event, false)?; + }).await?; + send_event_msg(ctx, config, channel.0, &draft_event.event, false).await?; Ok(()) } /// Gets the config from context data -pub fn get_config( - data: &Arc>, +pub async fn get_config( + data: &Arc>, ) -> std::result::Result { - let data_read = data.read(); + let data_read = data.read().await; let config = data_read .get::() - .ok_or(CommandError("Unable to get config".to_string()))?; + .ok_or(CommandError::from("Unable to get config".to_string()))?; Ok(config.clone()) } /// Gets the draft event from context data -pub fn get_draft_event( - data: &Arc>, +pub async fn get_draft_event( + data: &Arc>, ) -> std::result::Result { - let data_read = data.read(); + let data_read = data.read().await; let draft_event = data_read .get::() - .ok_or(CommandError("Unable to queued event".to_string()))?; + .ok_or(CommandError::from("Unable to queued event".to_string()))?; Ok(draft_event.clone()) } -/// Get the scheduler -pub fn get_scheduler( - data: &Arc>, -) -> std::result::Result>, CommandError> { - let mut context = data.write(); - Ok(context - .get_mut::() - .ok_or(CommandError("Unable to get scheduler".to_string()))? - .clone()) -} - /// Logs command errors to the logger -pub fn log_error( - _ctx: &mut Context, +#[hook] +pub async fn log_error( + _ctx: &Context, _msg: &Message, command_name: &str, result: std::result::Result<(), CommandError>, @@ -232,19 +219,17 @@ pub fn log_error( } /// Checks if the user has permission to use this bot -pub fn permission_check(ctx: &mut Context, msg: &Message, _command_name: &str) -> bool { +#[hook] +pub async fn permission_check(ctx: &Context, msg: &Message, _command_name: &str) -> bool { if let Some(guild_id) = msg.guild_id { - if let Ok(config) = get_config(&ctx.data) { - if let Ok(roles) = ctx.http.get_guild_roles(guild_id.0) { + if let Ok(config) = get_config(&ctx.data).await { + if let Ok(roles) = ctx.http.get_guild_roles(guild_id.0).await { for role in roles { if config.event_roles.contains(&role.id.0) { - let has_role = match msg.author.has_role(&ctx, guild_id, role) { + return match msg.author.has_role(&ctx, guild_id, role).await { Ok(has_role) => has_role, Err(_) => false, }; - if has_role { - return true; - } } } } @@ -255,63 +240,48 @@ pub fn permission_check(ctx: &mut Context, msg: &Message, _command_name: &str) - } /// Schedule event reminders -pub fn schedule_event(http: &Arc, data: &Arc>, event: &Event) { - let scheduler = { - let mut context = data.write(); - context - .get_mut::() - .expect("Expected Scheduler.") - .clone() - }; - - let config = get_config(&data).unwrap(); +pub async fn schedule_event(ctx: &Context, event: &Event) { + let config = get_config(&ctx.data).await.expect("Unable to get config"); if let Some(reminders) = config.reminders { let event_time: DateTime = DateTime::::from_utc(event.event_time.clone(), Utc); - let delete_time = event_time + chrono::Duration::minutes(1); - let mut scheduler = scheduler.write(); for reminder in reminders { let reminder_time = event_time - chrono::Duration::minutes(reminder.reminder_time as i64); if reminder_time > chrono::offset::Utc::now() { + let ctx = ctx.clone(); let reminder_msg = reminder.msg.clone(); - let http = http.clone(); - let data = data.clone(); let event = event.clone(); - scheduler.add_task_datetime(reminder_time, move |_| { - send_reminders(&http, &data, &event, &reminder_msg) - }); + tokio::task::spawn(async move { + send_reminders_task(&ctx, reminder_time, &event, &reminder_msg).await; + } + ); } } - - let http = http.clone(); - let data = data.clone(); - let event = event.clone(); - scheduler.add_task_datetime(delete_time, move |_| { - delete_event(&http, &data, &event); - DateResult::Done - }); } } /// Send reminders -pub fn send_reminders( - http: &Arc, - data: &Arc>, +pub async fn send_reminders_task( + ctx: &Context, + datetime: DateTime, event: &Event, reminder_msg: &String, -) -> DateResult { - let config = get_config(&data).unwrap(); +) { + let duration = datetime - chrono::offset::Utc::now(); + tokio::time::sleep(tokio::time::Duration::from_millis(duration.num_milliseconds() as u64)).await; + let config = get_config(&ctx.data).await.expect("Unable to get config"); let event_channel_id = config.event_channel; if let Ok(message_id) = event.message_id.parse::() { // Get message id - if let Ok(message) = http.get_message(event_channel_id, message_id) { + if let Ok(message) = ctx.http.get_message(event_channel_id, message_id).await { let reaction_users = message - .reaction_users(&http, INTERESTED_EMOJI, None, None) + .reaction_users(ctx, INTERESTED_EMOJI, None, None) + .await .unwrap_or(Vec::::new()); // Build reminder message @@ -319,20 +289,18 @@ pub fn send_reminders( // Send reminder to each reacted user for user in reaction_users { - send_dm_message(&http, user, &msg); + send_dm_message(ctx, user, &msg).await; } } } - - DateResult::Done } /// Delete event -pub fn delete_event(http: &Arc, data: &Arc>, event: &Event) { - let config = get_config(&data).unwrap(); +pub async fn delete_event(http: &Arc, data: &Arc>, event: &Event) { + let config = get_config(&data).await.expect("Unable to get config"); remove_event(config.db_url.clone(), event.id).ok(); if let Ok(message_id) = event.message_id.parse::() { - http.delete_message(config.event_channel, message_id).ok(); + http.delete_message(config.event_channel, message_id).await.ok(); } } diff --git a/src/main.rs b/src/main.rs index ad21e9c..13786b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,52 +2,52 @@ extern crate diesel; #[macro_use] extern crate diesel_migrations; -extern crate serde; #[macro_use] extern crate log; extern crate log4rs; +extern crate serde; + +use std::collections::HashSet; +use std::path::Path; +use std::process::exit; use chrono::{DateTime, Utc}; use clap::{App, Arg}; -use log::LevelFilter; use log4rs::append::console::ConsoleAppender; +use log4rs::append::rolling_file::policy::compound::CompoundPolicy; use log4rs::append::rolling_file::policy::compound::roll::fixed_window::FixedWindowRoller; use log4rs::append::rolling_file::policy::compound::trigger::size::SizeTrigger; -use log4rs::append::rolling_file::policy::compound::CompoundPolicy; use log4rs::append::rolling_file::RollingFileAppender; use log4rs::config::{Appender, Config, Root}; use log4rs::encode::pattern::PatternEncoder; use log4rs::filter::threshold::ThresholdFilter; use log4rs::init_config; +use log::LevelFilter; use serenity::client::Client; -use serenity::framework::standard::macros::{group, help}; -use serenity::framework::standard::{help_commands, Args, CommandGroup, HelpOptions}; +use serenity::async_trait; +use serenity::framework::standard::{Args, CommandGroup, help_commands, HelpOptions}; use serenity::framework::standard::{CommandResult, StandardFramework}; +use serenity::framework::standard::macros::{group, help}; use serenity::model::channel::{Message, Reaction}; use serenity::model::id::UserId; use serenity::model::prelude::Ready; -use serenity::prelude::{Context, EventHandler, RwLock}; -use std::collections::HashSet; -use std::path::Path; -use std::process::exit; -use std::sync::Arc; -use white_rabbit::{DateResult, Scheduler}; +use serenity::prelude::{Context, EventHandler}; + +use database::*; +use database::models::NewEvent; +use discord::{ + delete_event, DraftEvent, get_config, log_error, permission_check, + schedule_event, send_message_to_reaction_users, +}; +use discord::events::{CANCEL_COMMAND, CONFIRM_COMMAND, CREATE_COMMAND}; +use hypebot_config::HypeBotConfig; mod database; mod discord; mod hypebot_config; -use database::models::NewEvent; -use database::*; -use discord::events::{CANCEL_COMMAND, CONFIRM_COMMAND, CREATE_COMMAND}; -use discord::{ - delete_event, get_config, get_scheduler, log_error, permission_check, schedule_event, - send_message_to_reaction_users, DraftEvent, SchedulerKey, -}; -use hypebot_config::HypeBotConfig; - -const INTERESTED_EMOJI: &str = "\u{2705}"; -const UNINTERESTED_EMOJI: &str = "\u{274C}"; +const INTERESTED_EMOJI: char = '\u{2705}'; +const UNINTERESTED_EMOJI: char = '\u{274C}'; type HypeBotResult = std::result::Result>; @@ -61,65 +61,78 @@ struct EventCommands; /// Handler for Discord events struct Handler; +#[async_trait] impl EventHandler for Handler { /// On reaction add - fn reaction_add(&self, ctx: Context, reaction: Reaction) { - let config = match get_config(&ctx.data) { + async fn reaction_add(&self, ctx: Context, reaction: Reaction) { + let config = match get_config(&ctx.data).await { Ok(config) => config, Err(e) => { - error!("Unable to get config: {}", e.0); + error!("Unable to get config: {}", e); return; } }; if reaction.channel_id.0 == config.event_channel - && reaction.emoji.as_data() == INTERESTED_EMOJI + && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI { send_message_to_reaction_users( &ctx, &reaction, "Hello, you are now receiving reminders for **{event}**", - ); + ).await; } } /// On reaction remove - fn reaction_remove(&self, ctx: Context, reaction: Reaction) { - let config = match get_config(&ctx.data) { + async fn reaction_remove(&self, ctx: Context, reaction: Reaction) { + let config = match get_config(&ctx.data).await { Ok(config) => config, Err(e) => { - error!("Unable to get config: {}", e.0); + error!("Unable to get config: {}", e); return; } }; if reaction.channel_id.0 == config.event_channel - && reaction.emoji.as_data() == INTERESTED_EMOJI + && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI { send_message_to_reaction_users( &ctx, &reaction, "Hello, you are no longer receiving reminders for **{event}**", - ); + ).await; } } /// On bot ready - fn ready(&self, _: Context, ready: Ready) { + async fn ready(&self, ctx: Context, ready: Ready) { info!("Connected to Discord as {}", ready.user.name); + + // Schedule current events + let config = get_config(&ctx.data).await.expect("Unable to get config"); + for event in get_all_events(config.db_url.clone()).unwrap() { + let event_time: DateTime = + DateTime::::from_utc(event.event_time.clone(), Utc); + + if event.reminder_sent == 0 { + schedule_event(&ctx, &event).await; + } + } } } #[help] #[command_not_found_text = "Could not find: `{}`."] -#[strikethrough_commands_tip_in_guild("HypeBot")] -fn bot_help( - context: &mut Context, +#[strikethrough_commands_tip_in_guild("")] +async fn bot_help( + context: &Context, msg: &Message, args: Args, help_options: &'static HelpOptions, groups: &[&'static CommandGroup], owners: HashSet, ) -> CommandResult { - help_commands::with_embeds(context, msg, args, help_options, groups, owners) + help_commands::with_embeds(context, msg, args, help_options, groups, owners).await; + Ok(()) } /// Does the setup for logging @@ -181,7 +194,8 @@ fn setup_logging(config: &HypeBotConfig) -> HypeBotResult<()> { } embed_migrations!("migrations/"); -fn main() -> HypeBotResult<()> { +#[tokio::main] +async fn main() -> HypeBotResult<()> { // Initialize arg parser let mut app = App::new("Hype Bot") .about("Hype Bot: Hype Up Your Discord Events!") @@ -217,26 +231,23 @@ fn main() -> HypeBotResult<()> { // New client let mut client = - Client::new(cfg.discord_key.clone(), Handler).expect("Error creating client"); - - // Configure client - client.with_framework( - StandardFramework::new() - .configure(|c| { - c.prefix(cfg.prefix.as_str().clone()) - .allow_dm(false) - .ignore_bots(true) - .ignore_webhooks(true) - }) - .before(permission_check) - .after(log_error) - .group(&EVENTCOMMANDS_GROUP) - .help(&BOT_HELP), - ); + Client::builder(cfg.discord_key.clone()).event_handler(Handler).framework( + StandardFramework::new() + .configure(|c| { + c.prefix(cfg.prefix.as_str().clone()) + .allow_dm(false) + .ignore_bots(true) + .ignore_webhooks(true) + }) + .before(permission_check) + .after(log_error) + .group(&EVENTCOMMANDS_GROUP) + .help(&BOT_HELP), + ).await?; // Copy config data to client data and setup scheduler { - let mut data = client.data.write(); + let mut data = client.data.write().await; data.insert::(cfg); data.insert::(DraftEvent { event: NewEvent { @@ -251,41 +262,12 @@ fn main() -> HypeBotResult<()> { }, creator_id: 0, }); - - // Create scheduler - let scheduler = Scheduler::new(2); - let scheduler = Arc::new(RwLock::new(scheduler)); - data.insert::(scheduler); } - // Schedule current events - let config = get_config(&client.data).expect("Unable to find get config"); - let duration = chrono::Duration::minutes(60); - for event in get_all_events(config.db_url.clone()).unwrap() { - let event_time: DateTime = - DateTime::::from_utc(event.event_time.clone(), Utc); - - if Utc::now() > event_time + duration { - delete_event(&client.cache_and_http.http, &client.data, &event); - } else if Utc::now() > event_time { - let scheduler = get_scheduler(&client.data).unwrap(); - let mut scheduler = scheduler.write(); - let cancel_time = event_time + duration; - let http = client.cache_and_http.http.clone(); - let data = client.data.clone(); - - scheduler.add_task_datetime(cancel_time, move |_| { - delete_event(&http, &data, &event); - DateResult::Done - }); - } else if event.reminder_sent == 0 { - schedule_event(&client.cache_and_http.http, &client.data, &event); - } - } // Start bot info!("Starting HypeBot!"); - if let Err(why) = client.start() { + if let Err(why) = client.start().await { error!("An error occurred while running the client: {:?}", why); } } else { From af9952878e4e8ee2984d9300f97c5d385186c930 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Fri, 15 Jan 2021 21:51:26 -0600 Subject: [PATCH 02/10] clippy + fmt --- src/database/mod.rs | 14 +------- src/database/models.rs | 2 +- src/discord/events.rs | 43 ++++++++++++++---------- src/discord/mod.rs | 74 +++++++++++++++++++++++------------------- src/hypebot_config.rs | 6 ++-- src/main.rs | 42 ++++++++++++------------ 6 files changed, 93 insertions(+), 88 deletions(-) diff --git a/src/database/mod.rs b/src/database/mod.rs index 66bdc4c..746e8f9 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -3,14 +3,13 @@ pub mod schema; use diesel::prelude::*; use diesel::result::Error; -use diesel::update; use models::{Event, NewEvent}; use std::vec::Vec; /// Establish a connection to the database pub fn establish_connection(database_url: String) -> MysqlConnection { MysqlConnection::establish(&database_url) - .expect(&format!("Error connecting to {}", database_url)) + .unwrap_or_else(|_| panic!("Error connecting to {}", database_url)) } /// Insert an event into the database pub fn insert_event(database_url: String, new_event: &NewEvent) -> Result { @@ -65,14 +64,3 @@ pub fn get_all_events(database_url: String) -> Result, Error> { events.order(event_time).load(&connection) } - -/// Set the reminder state of an event -pub fn set_reminder(database_url: String, event_id: i32, state: i32) -> Result { - use schema::events::dsl::{events, id, reminder_sent}; - let connection = establish_connection(database_url); - - let target = events.filter(id.eq(event_id)); - update(target) - .set(reminder_sent.eq(state)) - .execute(&connection) -} diff --git a/src/database/models.rs b/src/database/models.rs index 04814fb..6230913 100644 --- a/src/database/models.rs +++ b/src/database/models.rs @@ -30,7 +30,7 @@ impl Into for Event { event_desc: self.event_desc.clone(), organizer: self.organizer.clone(), event_loc: self.event_loc.clone(), - event_time: self.event_time.clone(), + event_time: self.event_time, message_id: self.message_id.clone(), thumbnail_link: self.message_id.clone(), reminder_sent: self.reminder_sent, diff --git a/src/discord/events.rs b/src/discord/events.rs index 41650f2..8e84b51 100644 --- a/src/discord/events.rs +++ b/src/discord/events.rs @@ -8,7 +8,7 @@ use chrono::offset::TimeZone; use chrono::{Datelike, NaiveDateTime, Timelike, Utc}; use chrono_tz::Tz; use serenity::framework::standard::{macros::command, Args, CommandResult}; -use serenity::model::prelude::{Mentionable, Message, User}; +use serenity::model::prelude::{Mentionable, Message}; use serenity::prelude::Context; use serenity::utils::{content_safe, ContentSafeOptions}; use url::Url; @@ -28,7 +28,8 @@ async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { // Check to to see if message author is the owner of the pending event if draft_event.creator_id == msg.author.id.0 { // Send event message - let event_msg = send_event_msg(&ctx, &config, config.event_channel, &new_event, true).await?; + let event_msg = + send_event_msg(&ctx, &config, config.event_channel, &new_event, true).await?; msg.reply(&ctx, "Event posted!").await?; @@ -38,7 +39,8 @@ async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { schedule_event(&ctx, &event).await; } else { - msg.reply(&ctx, format!("You do not have a pending event!")).await?; + msg.reply(&ctx, "You do not have a pending event!".to_string()) + .await?; } Ok(()) @@ -65,7 +67,8 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { let event_name = match args.find::() { Ok(event_name) => event_name.replace("\"", ""), Err(_) => { - msg.reply(&ctx, "No event name provided.".to_string()).await?; + msg.reply(&ctx, "No event name provided.".to_string()) + .await?; return Ok(()); } }; @@ -79,7 +82,8 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { let description = match args.find::() { Ok(desc) => desc.replace("\"", ""), Err(_) => { - msg.reply(&ctx, "No description provided.".to_string()).await?; + msg.reply(&ctx, "No description provided.".to_string()) + .await?; return Ok(()); } }; @@ -110,7 +114,8 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { msg.reply( &ctx, "Invalid date format. Format is HH:MMam YYYY-MM-DD".to_string(), - ).await?; + ) + .await?; return Ok(()); } }; @@ -130,7 +135,8 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { let event_time = input_date.with_timezone(&Utc).naive_utc(); if Utc::now().naive_utc() > event_time { - msg.reply(&ctx, "The scheduled time has already passed!").await?; + msg.reply(&ctx, "The scheduled time has already passed!") + .await?; return Ok(()); } @@ -155,7 +161,8 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { thumbnail_link, event_time, msg.author.id.0, - ).await?; + ) + .await?; send_draft_event(&ctx, msg.channel_id).await?; Ok(()) @@ -173,17 +180,19 @@ async fn cancel(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { let event = get_event_by_name(config.db_url.clone(), event_name)?; let message_id = event.message_id.parse::()?; - let message = ctx.http.get_message(config.event_channel, message_id).await?; - - let reaction_users = message - .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) - .await - .unwrap_or(Vec::::new()); - + let message = ctx + .http + .get_message(config.event_channel, message_id) + .await?; let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); - for user in reaction_users { - send_dm_message(ctx, user, &cancel_msg).await; + if let Ok(reaction_users) = message + .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) + .await + { + for user in reaction_users { + send_dm_message(ctx, user, &cancel_msg).await; + } } remove_event(config.db_url.clone(), event.id)?; diff --git a/src/discord/mod.rs b/src/discord/mod.rs index 6c53cdb..1adb3ac 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -3,18 +3,17 @@ use crate::database::{get_event_by_msg_id, remove_event}; use crate::hypebot_config::HypeBotConfig; use crate::{INTERESTED_EMOJI, UNINTERESTED_EMOJI}; use chrono::{DateTime, NaiveDateTime, Utc}; +use serenity::framework::standard::macros::hook; use serenity::framework::standard::{CommandError, CommandResult}; use serenity::http::Http; use serenity::model::prelude::{ChannelId, Message, Reaction, User}; -use serenity::prelude::{TypeMapKey, TypeMap}; use serenity::prelude::{Context, RwLock}; +use serenity::prelude::{TypeMap, TypeMapKey}; use serenity::utils::Colour; use serenity::Result; -use serenity::framework::standard::macros::hook; use std::collections::HashMap; use std::sync::Arc; use strfmt::strfmt; -use diesel::result::Error; pub mod events; @@ -45,7 +44,7 @@ pub async fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, } }; - let event_utc_time = DateTime::::from_utc(event.event_time.clone(), Utc); + let event_utc_time = DateTime::::from_utc(event.event_time, Utc); let current_utc_time = chrono::offset::Utc::now(); let msg; @@ -66,14 +65,17 @@ pub async fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, } /// Send a DM message to a user -pub async fn send_dm_message(ctx: &Context, user: User, message: &String) { +pub async fn send_dm_message(ctx: &Context, user: User, message: &str) { if let Ok(dm_channel) = user.create_dm_channel(ctx).await { - dm_channel.send_message(ctx, |m| m.content(message)).await.ok(); + dm_channel + .send_message(ctx, |m| m.content(message)) + .await + .ok(); } } /// Create a countdown link for the event -pub fn get_countdown_link(event_name: &String, utc: &DateTime) -> String { +pub fn get_countdown_link(event_name: &str, utc: &DateTime) -> String { let msg = event_name.replace(" ", "+"); let time = utc.format("%G%m%dT%H%M").to_string(); @@ -93,7 +95,7 @@ pub async fn send_event_msg( ) -> Result { let channel = ctx.http.get_channel(channel_id).await?; - let utc_time = DateTime::::from_utc(event.event_time.clone(), Utc); + let utc_time = DateTime::::from_utc(event.event_time, Utc); let native_time = utc_time.with_timezone(&config.event_timezone); @@ -135,6 +137,7 @@ pub async fn send_event_msg( } /// Updates the draft event stored in the context data +#[allow(clippy::too_many_arguments)] pub async fn update_draft_event( ctx: &Context, event_name: String, @@ -148,7 +151,7 @@ pub async fn update_draft_event( let mut data = ctx.data.write().await; let mut draft_event = data .get_mut::() - .ok_or(CommandError::from("Unable get draft event!".to_string()))?; + .ok_or_else(|| CommandError::from("Unable get draft event!".to_string()))?; draft_event.event.event_name = event_name; draft_event.event.event_desc = event_desc; @@ -166,16 +169,16 @@ pub async fn send_draft_event(ctx: &Context, channel: ChannelId) -> CommandResul let data = ctx.data.read().await; let config = data .get::() - .ok_or(CommandError::from("Config not found!".to_string()))?; + .ok_or_else(|| CommandError::from("Config not found!".to_string()))?; let draft_event = data .get::() - .ok_or(CommandError::from("Draft event not found!".to_string()))?; + .ok_or_else(|| CommandError::from("Draft event not found!".to_string()))?; - channel.send_message(&ctx, |m| { - m.content(format!( - "Draft message, use the `confirm` command to post it." - )) - }).await?; + channel + .send_message(&ctx, |m| { + m.content("Draft message, use the `confirm` command to post it.".to_string()) + }) + .await?; send_event_msg(ctx, config, channel.0, &draft_event.event, false).await?; Ok(()) } @@ -187,7 +190,7 @@ pub async fn get_config( let data_read = data.read().await; let config = data_read .get::() - .ok_or(CommandError::from("Unable to get config".to_string()))?; + .ok_or_else(|| CommandError::from("Unable to get config".to_string()))?; Ok(config.clone()) } @@ -199,7 +202,7 @@ pub async fn get_draft_event( let data_read = data.read().await; let draft_event = data_read .get::() - .ok_or(CommandError::from("Unable to queued event".to_string()))?; + .ok_or_else(|| CommandError::from("Unable to queued event".to_string()))?; Ok(draft_event.clone()) } @@ -244,7 +247,7 @@ pub async fn schedule_event(ctx: &Context, event: &Event) { let config = get_config(&ctx.data).await.expect("Unable to get config"); if let Some(reminders) = config.reminders { - let event_time: DateTime = DateTime::::from_utc(event.event_time.clone(), Utc); + let event_time: DateTime = DateTime::::from_utc(event.event_time, Utc); for reminder in reminders { let reminder_time = @@ -256,9 +259,8 @@ pub async fn schedule_event(ctx: &Context, event: &Event) { let event = event.clone(); tokio::task::spawn(async move { - send_reminders_task(&ctx, reminder_time, &event, &reminder_msg).await; - } - ); + send_reminders_task(&ctx, reminder_time, &event, &reminder_msg).await; + }); } } } @@ -269,38 +271,44 @@ pub async fn send_reminders_task( ctx: &Context, datetime: DateTime, event: &Event, - reminder_msg: &String, + reminder_msg: &str, ) { let duration = datetime - chrono::offset::Utc::now(); - tokio::time::sleep(tokio::time::Duration::from_millis(duration.num_milliseconds() as u64)).await; + tokio::time::sleep(tokio::time::Duration::from_millis( + duration.num_milliseconds() as u64, + )) + .await; let config = get_config(&ctx.data).await.expect("Unable to get config"); let event_channel_id = config.event_channel; if let Ok(message_id) = event.message_id.parse::() { // Get message id if let Ok(message) = ctx.http.get_message(event_channel_id, message_id).await { - let reaction_users = message + if let Ok(reaction_users) = message .reaction_users(ctx, INTERESTED_EMOJI, None, None) .await - .unwrap_or(Vec::::new()); + { + // Build reminder message + let msg: String = reminder_msg.replace("{EVENT_NAME}", event.event_name.as_str()); - // Build reminder message - let msg: String = reminder_msg.replace("{EVENT_NAME}", event.event_name.as_str()); - - // Send reminder to each reacted user - for user in reaction_users { - send_dm_message(ctx, user, &msg).await; + // Send reminder to each reacted user + for user in reaction_users { + send_dm_message(ctx, user, &msg).await; + } } } } } /// Delete event +#[allow(dead_code)] pub async fn delete_event(http: &Arc, data: &Arc>, event: &Event) { let config = get_config(&data).await.expect("Unable to get config"); remove_event(config.db_url.clone(), event.id).ok(); if let Ok(message_id) = event.message_id.parse::() { - http.delete_message(config.event_channel, message_id).await.ok(); + http.delete_message(config.event_channel, message_id) + .await + .ok(); } } diff --git a/src/hypebot_config.rs b/src/hypebot_config.rs index e50825b..9d067d3 100644 --- a/src/hypebot_config.rs +++ b/src/hypebot_config.rs @@ -48,9 +48,9 @@ where { let string = deserializer.deserialize_struct("Value", &["into_str"], ConfigValueVisitor)?; - let tz: Tz = string.parse().ok().ok_or(D::Error::custom( - "Unable to parse datetime, should be in format \"Country/City\"", - ))?; + let tz: Tz = string.parse().ok().ok_or_else(|| { + D::Error::custom("Unable to parse datetime, should be in format \"Country/City\"") + })?; Ok(tz) } diff --git a/src/main.rs b/src/main.rs index 13786b0..3d5fb9f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,35 +11,35 @@ use std::collections::HashSet; use std::path::Path; use std::process::exit; -use chrono::{DateTime, Utc}; +use chrono::Utc; use clap::{App, Arg}; +use log::LevelFilter; use log4rs::append::console::ConsoleAppender; -use log4rs::append::rolling_file::policy::compound::CompoundPolicy; use log4rs::append::rolling_file::policy::compound::roll::fixed_window::FixedWindowRoller; use log4rs::append::rolling_file::policy::compound::trigger::size::SizeTrigger; +use log4rs::append::rolling_file::policy::compound::CompoundPolicy; use log4rs::append::rolling_file::RollingFileAppender; use log4rs::config::{Appender, Config, Root}; use log4rs::encode::pattern::PatternEncoder; use log4rs::filter::threshold::ThresholdFilter; use log4rs::init_config; -use log::LevelFilter; -use serenity::client::Client; use serenity::async_trait; -use serenity::framework::standard::{Args, CommandGroup, help_commands, HelpOptions}; -use serenity::framework::standard::{CommandResult, StandardFramework}; +use serenity::client::Client; use serenity::framework::standard::macros::{group, help}; +use serenity::framework::standard::{help_commands, Args, CommandGroup, HelpOptions}; +use serenity::framework::standard::{CommandResult, StandardFramework}; use serenity::model::channel::{Message, Reaction}; use serenity::model::id::UserId; use serenity::model::prelude::Ready; use serenity::prelude::{Context, EventHandler}; -use database::*; use database::models::NewEvent; -use discord::{ - delete_event, DraftEvent, get_config, log_error, permission_check, - schedule_event, send_message_to_reaction_users, -}; +use database::*; use discord::events::{CANCEL_COMMAND, CONFIRM_COMMAND, CREATE_COMMAND}; +use discord::{ + get_config, log_error, permission_check, schedule_event, send_message_to_reaction_users, + DraftEvent, +}; use hypebot_config::HypeBotConfig; mod database; @@ -79,7 +79,8 @@ impl EventHandler for Handler { &ctx, &reaction, "Hello, you are now receiving reminders for **{event}**", - ).await; + ) + .await; } } @@ -99,7 +100,8 @@ impl EventHandler for Handler { &ctx, &reaction, "Hello, you are no longer receiving reminders for **{event}**", - ).await; + ) + .await; } } @@ -110,9 +112,6 @@ impl EventHandler for Handler { // Schedule current events let config = get_config(&ctx.data).await.expect("Unable to get config"); for event in get_all_events(config.db_url.clone()).unwrap() { - let event_time: DateTime = - DateTime::::from_utc(event.event_time.clone(), Utc); - if event.reminder_sent == 0 { schedule_event(&ctx, &event).await; } @@ -230,11 +229,12 @@ async fn main() -> HypeBotResult<()> { embedded_migrations::run(&connection)?; // New client - let mut client = - Client::builder(cfg.discord_key.clone()).event_handler(Handler).framework( + let mut client = Client::builder(cfg.discord_key.clone()) + .event_handler(Handler) + .framework( StandardFramework::new() .configure(|c| { - c.prefix(cfg.prefix.as_str().clone()) + c.prefix(cfg.prefix.as_str()) .allow_dm(false) .ignore_bots(true) .ignore_webhooks(true) @@ -243,7 +243,8 @@ async fn main() -> HypeBotResult<()> { .after(log_error) .group(&EVENTCOMMANDS_GROUP) .help(&BOT_HELP), - ).await?; + ) + .await?; // Copy config data to client data and setup scheduler { @@ -264,7 +265,6 @@ async fn main() -> HypeBotResult<()> { }); } - // Start bot info!("Starting HypeBot!"); if let Err(why) = client.start().await { From 04014c24d6fcedc347bd4c26fcf2410de81dad07 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Sat, 16 Jan 2021 13:58:46 -0600 Subject: [PATCH 03/10] Code cleanup + Reduced copies needed to access config or the draft event from global data + fmt + clippy --- src/database/models.rs | 17 +++++++++- src/discord/events.rs | 23 +++++++------ src/discord/mod.rs | 75 +++++++++++++++++++++++------------------- src/hypebot_config.rs | 3 +- src/main.rs | 44 ++++++++----------------- 5 files changed, 86 insertions(+), 76 deletions(-) diff --git a/src/database/models.rs b/src/database/models.rs index 6230913..ebcfe9f 100644 --- a/src/database/models.rs +++ b/src/database/models.rs @@ -1,5 +1,5 @@ use super::schema::events; -use chrono::NaiveDateTime; +use chrono::{NaiveDateTime, Utc}; #[derive(Queryable, Clone, Debug)] pub struct Event { @@ -58,3 +58,18 @@ pub struct NewEvent { /// Reminder sent tracker pub reminder_sent: i32, } + +impl Default for NewEvent { + fn default() -> Self { + Self { + message_id: String::default(), + event_time: Utc::now().naive_utc(), + event_name: String::default(), + organizer: String::default(), + event_desc: String::default(), + event_loc: String::default(), + thumbnail_link: String::default(), + reminder_sent: i32::default(), + } + } +} diff --git a/src/discord/events.rs b/src/discord/events.rs index 8e84b51..0b9b7d8 100644 --- a/src/discord/events.rs +++ b/src/discord/events.rs @@ -21,8 +21,8 @@ use url::Url; /// **Note** /// You can only post events you have created. Only one preview event can exist at a time. async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { - let config = get_config(&ctx.data).await?; - let draft_event = get_draft_event(&ctx.data).await?; + let config = get_config(&ctx.data.read().await).await?; + let draft_event = get_draft_event(&ctx.data.read().await).await?; let mut new_event = draft_event.event.clone(); // Check to to see if message author is the owner of the pending event @@ -61,7 +61,7 @@ async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { /// The user or group that is organizing the event, defaults to the user creating the event async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { // Get config - let config = get_config(&ctx.data).await?; + let config = get_config(&ctx.data.read().await).await?; // Parse args let event_name = match args.find::() { @@ -173,7 +173,7 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { /// /// `~cancel "event name"` async fn cancel(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { - let config = get_config(&ctx.data).await?; + let config = get_config(&ctx.data.read().await).await?; // Parse args let event_name = args.single::()?.replace("\"", ""); @@ -186,12 +186,15 @@ async fn cancel(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { .await?; let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); - if let Ok(reaction_users) = message - .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) - .await - { - for user in reaction_users { - send_dm_message(ctx, user, &cancel_msg).await; + // Only send a cancel message if the even has not already happened + if event.event_time > Utc::now().naive_utc() { + if let Ok(reaction_users) = message + .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) + .await + { + for user in reaction_users { + send_dm_message(ctx, user, &cancel_msg).await; + } } } diff --git a/src/discord/mod.rs b/src/discord/mod.rs index 1adb3ac..acca503 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -14,23 +14,24 @@ use serenity::Result; use std::collections::HashMap; use std::sync::Arc; use strfmt::strfmt; +use tokio::sync::RwLockReadGuard; pub mod events; /// Struct for storing drafted events -#[derive(Clone)] +#[derive(Debug, Clone, Default)] pub struct DraftEvent { pub event: NewEvent, pub creator_id: u64, } impl TypeMapKey for DraftEvent { - type Value = DraftEvent; + type Value = Arc; } /// Send a message to a reaction user pub async fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, msg_text: &str) { - if let Ok(config) = get_config(&ctx.data).await { + if let Ok(config) = get_config(&ctx.data.read().await).await { let db_link = config.db_url.clone(); let message_id = reaction.message_id.0.to_string(); @@ -149,46 +150,49 @@ pub async fn update_draft_event( creator_id: u64, ) -> CommandResult { let mut data = ctx.data.write().await; - let mut draft_event = data + let draft_event = data .get_mut::() .ok_or_else(|| CommandError::from("Unable get draft event!".to_string()))?; - draft_event.event.event_name = event_name; - draft_event.event.event_desc = event_desc; - draft_event.event.event_loc = location; - draft_event.event.organizer = organizer; - draft_event.event.thumbnail_link = thumbnail; - draft_event.event.message_id = String::new(); - draft_event.event.event_time = event_time; - draft_event.creator_id = creator_id; + let new_draft_event = DraftEvent { + event: NewEvent { + event_name, + event_desc, + event_loc: location, + organizer, + event_time, + message_id: "".to_string(), + thumbnail_link: thumbnail, + reminder_sent: 0, + }, + creator_id, + }; + + *draft_event = Arc::new(new_draft_event); + Ok(()) } /// Sends the draft event stored in the context data pub async fn send_draft_event(ctx: &Context, channel: ChannelId) -> CommandResult { let data = ctx.data.read().await; - let config = data - .get::() - .ok_or_else(|| CommandError::from("Config not found!".to_string()))?; - let draft_event = data - .get::() - .ok_or_else(|| CommandError::from("Draft event not found!".to_string()))?; + let config = get_config(&data).await?; + let draft_event = get_draft_event(&data).await?; channel .send_message(&ctx, |m| { m.content("Draft message, use the `confirm` command to post it.".to_string()) }) .await?; - send_event_msg(ctx, config, channel.0, &draft_event.event, false).await?; + send_event_msg(ctx, &config, channel.0, &draft_event.event, false).await?; Ok(()) } /// Gets the config from context data pub async fn get_config( - data: &Arc>, -) -> std::result::Result { - let data_read = data.read().await; - let config = data_read + data: &RwLockReadGuard<'_, TypeMap>, +) -> std::result::Result, CommandError> { + let config = data .get::() .ok_or_else(|| CommandError::from("Unable to get config".to_string()))?; @@ -197,12 +201,11 @@ pub async fn get_config( /// Gets the draft event from context data pub async fn get_draft_event( - data: &Arc>, -) -> std::result::Result { - let data_read = data.read().await; - let draft_event = data_read + data: &RwLockReadGuard<'_, TypeMap>, +) -> std::result::Result, CommandError> { + let draft_event = data .get::() - .ok_or_else(|| CommandError::from("Unable to queued event".to_string()))?; + .ok_or_else(|| CommandError::from("Unable to get queued event".to_string()))?; Ok(draft_event.clone()) } @@ -225,7 +228,7 @@ pub async fn log_error( #[hook] pub async fn permission_check(ctx: &Context, msg: &Message, _command_name: &str) -> bool { if let Some(guild_id) = msg.guild_id { - if let Ok(config) = get_config(&ctx.data).await { + if let Ok(config) = get_config(&ctx.data.read().await).await { if let Ok(roles) = ctx.http.get_guild_roles(guild_id.0).await { for role in roles { if config.event_roles.contains(&role.id.0) { @@ -244,9 +247,11 @@ pub async fn permission_check(ctx: &Context, msg: &Message, _command_name: &str) /// Schedule event reminders pub async fn schedule_event(ctx: &Context, event: &Event) { - let config = get_config(&ctx.data).await.expect("Unable to get config"); + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); - if let Some(reminders) = config.reminders { + if let Some(reminders) = &config.reminders { let event_time: DateTime = DateTime::::from_utc(event.event_time, Utc); for reminder in reminders { @@ -278,7 +283,9 @@ pub async fn send_reminders_task( duration.num_milliseconds() as u64, )) .await; - let config = get_config(&ctx.data).await.expect("Unable to get config"); + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); let event_channel_id = config.event_channel; if let Ok(message_id) = event.message_id.parse::() { @@ -303,7 +310,9 @@ pub async fn send_reminders_task( /// Delete event #[allow(dead_code)] pub async fn delete_event(http: &Arc, data: &Arc>, event: &Event) { - let config = get_config(&data).await.expect("Unable to get config"); + let config = get_config(&data.read().await) + .await + .expect("Unable to get config"); remove_event(config.db_url.clone(), event.id).ok(); if let Ok(message_id) = event.message_id.parse::() { diff --git a/src/hypebot_config.rs b/src/hypebot_config.rs index 9d067d3..ab4f76f 100644 --- a/src/hypebot_config.rs +++ b/src/hypebot_config.rs @@ -4,6 +4,7 @@ use serde::de::{self, Error, Visitor}; use serde::{Deserialize, Deserializer}; use serenity::prelude::TypeMapKey; use std::fmt; +use std::sync::Arc; #[derive(Debug, Deserialize, Clone)] pub struct EventReminder { @@ -65,5 +66,5 @@ impl HypeBotConfig { } impl TypeMapKey for HypeBotConfig { - type Value = HypeBotConfig; + type Value = Arc; } diff --git a/src/main.rs b/src/main.rs index 3d5fb9f..3fcd406 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,6 @@ use std::collections::HashSet; use std::path::Path; use std::process::exit; -use chrono::Utc; use clap::{App, Arg}; use log::LevelFilter; use log4rs::append::console::ConsoleAppender; @@ -33,7 +32,6 @@ use serenity::model::id::UserId; use serenity::model::prelude::Ready; use serenity::prelude::{Context, EventHandler}; -use database::models::NewEvent; use database::*; use discord::events::{CANCEL_COMMAND, CONFIRM_COMMAND, CREATE_COMMAND}; use discord::{ @@ -41,6 +39,7 @@ use discord::{ DraftEvent, }; use hypebot_config::HypeBotConfig; +use std::sync::Arc; mod database; mod discord; @@ -65,13 +64,9 @@ struct Handler; impl EventHandler for Handler { /// On reaction add async fn reaction_add(&self, ctx: Context, reaction: Reaction) { - let config = match get_config(&ctx.data).await { - Ok(config) => config, - Err(e) => { - error!("Unable to get config: {}", e); - return; - } - }; + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); if reaction.channel_id.0 == config.event_channel && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI { @@ -86,13 +81,10 @@ impl EventHandler for Handler { /// On reaction remove async fn reaction_remove(&self, ctx: Context, reaction: Reaction) { - let config = match get_config(&ctx.data).await { - Ok(config) => config, - Err(e) => { - error!("Unable to get config: {}", e); - return; - } - }; + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + if reaction.channel_id.0 == config.event_channel && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI { @@ -110,7 +102,9 @@ impl EventHandler for Handler { info!("Connected to Discord as {}", ready.user.name); // Schedule current events - let config = get_config(&ctx.data).await.expect("Unable to get config"); + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); for event in get_all_events(config.db_url.clone()).unwrap() { if event.reminder_sent == 0 { schedule_event(&ctx, &event).await; @@ -249,20 +243,8 @@ async fn main() -> HypeBotResult<()> { // Copy config data to client data and setup scheduler { let mut data = client.data.write().await; - data.insert::(cfg); - data.insert::(DraftEvent { - event: NewEvent { - message_id: String::new(), - event_time: Utc::now().naive_utc(), - event_name: String::new(), - organizer: String::new(), - event_desc: String::new(), - event_loc: String::new(), - thumbnail_link: String::new(), - reminder_sent: 0 as i32, - }, - creator_id: 0, - }); + data.insert::(Arc::new(cfg)); + data.insert::(Arc::new(DraftEvent::default())); } // Start bot From 8fb01ba1a45e7615bcc9550d809d8dfd117e73cd Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Thu, 28 Jan 2021 16:31:07 -0600 Subject: [PATCH 04/10] Added reminder system + Reminders are stored in the Reminders struct + Every 5 seconds, a async task is run to check if any reminders need to be sent + Events are not pulled from the database until a reminder needs to be sent --- src/database/mod.rs | 9 ++ src/database/models.rs | 2 +- src/discord/events.rs | 32 ++---- src/discord/mod.rs | 219 ++++++++++++++++++++++++++++++----------- src/main.rs | 101 +++---------------- src/reminder/mod.rs | 156 +++++++++++++++++++++++++++++ 6 files changed, 344 insertions(+), 175 deletions(-) create mode 100644 src/reminder/mod.rs diff --git a/src/database/mod.rs b/src/database/mod.rs index 746e8f9..6a0019c 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -64,3 +64,12 @@ pub fn get_all_events(database_url: String) -> Result, Error> { events.order(event_time).load(&connection) } + +/// Get event with id +pub fn get_event_by_id(database_url: String, event_id: i32) -> Result { + use schema::events::dsl::{events, id}; + + let connection = establish_connection(database_url); + + events.filter(id.eq(event_id)).first::(&connection) +} diff --git a/src/database/models.rs b/src/database/models.rs index ebcfe9f..c368b51 100644 --- a/src/database/models.rs +++ b/src/database/models.rs @@ -1,7 +1,7 @@ use super::schema::events; use chrono::{NaiveDateTime, Utc}; -#[derive(Queryable, Clone, Debug)] +#[derive(Queryable, Clone, Debug, Hash)] pub struct Event { /// Event ID pub id: i32, diff --git a/src/discord/events.rs b/src/discord/events.rs index 0b9b7d8..ae3c512 100644 --- a/src/discord/events.rs +++ b/src/discord/events.rs @@ -1,9 +1,8 @@ use super::{get_config, send_event_msg}; -use crate::database::{get_event_by_name, insert_event, remove_event}; +use crate::database::{get_event_by_name, insert_event}; use crate::discord::{ - get_draft_event, schedule_event, send_dm_message, send_draft_event, update_draft_event, + delete_event, get_draft_event, schedule_event, send_draft_event, update_draft_event, }; -use crate::INTERESTED_EMOJI; use chrono::offset::TimeZone; use chrono::{Datelike, NaiveDateTime, Timelike, Utc}; use chrono_tz::Tz; @@ -179,30 +178,11 @@ async fn cancel(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { let event_name = args.single::()?.replace("\"", ""); let event = get_event_by_name(config.db_url.clone(), event_name)?; - let message_id = event.message_id.parse::()?; - let message = ctx - .http - .get_message(config.event_channel, message_id) + + delete_event(ctx, &event).await?; + + msg.reply(&ctx, format!("{} has been cancelled", event.event_name)) .await?; - let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); - - // Only send a cancel message if the even has not already happened - if event.event_time > Utc::now().naive_utc() { - if let Ok(reaction_users) = message - .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) - .await - { - for user in reaction_users { - send_dm_message(ctx, user, &cancel_msg).await; - } - } - } - - remove_event(config.db_url.clone(), event.id)?; - - message.delete(&ctx).await?; - - msg.reply(&ctx, &cancel_msg).await?; Ok(()) } diff --git a/src/discord/mod.rs b/src/discord/mod.rs index acca503..b0a55ad 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -1,21 +1,29 @@ -use crate::database::models::{Event, NewEvent}; -use crate::database::{get_event_by_msg_id, remove_event}; -use crate::hypebot_config::HypeBotConfig; -use crate::{INTERESTED_EMOJI, UNINTERESTED_EMOJI}; +use std::collections::{HashMap, HashSet}; +use std::sync::Arc; + use chrono::{DateTime, NaiveDateTime, Utc}; +use serenity::async_trait; +use serenity::framework::standard::macros::help; use serenity::framework::standard::macros::hook; -use serenity::framework::standard::{CommandError, CommandResult}; -use serenity::http::Http; +use serenity::framework::standard::{ + help_commands, Args, CommandError, CommandGroup, CommandResult, HelpOptions, +}; +use serenity::model::gateway::Ready; +use serenity::model::id::UserId; use serenity::model::prelude::{ChannelId, Message, Reaction, User}; -use serenity::prelude::{Context, RwLock}; +use serenity::prelude::{Context, EventHandler}; use serenity::prelude::{TypeMap, TypeMapKey}; use serenity::utils::Colour; use serenity::Result; -use std::collections::HashMap; -use std::sync::Arc; use strfmt::strfmt; use tokio::sync::RwLockReadGuard; +use crate::database::models::{Event, NewEvent}; +use crate::database::{get_all_events, get_event_by_id, get_event_by_msg_id, remove_event}; +use crate::hypebot_config::HypeBotConfig; +use crate::reminder::Reminders; +use crate::{INTERESTED_EMOJI, UNINTERESTED_EMOJI}; + pub mod events; /// Struct for storing drafted events @@ -251,56 +259,53 @@ pub async fn schedule_event(ctx: &Context, event: &Event) { .await .expect("Unable to get config"); - if let Some(reminders) = &config.reminders { - let event_time: DateTime = DateTime::::from_utc(event.event_time, Utc); + let mut data = ctx.data.write().await; - for reminder in reminders { - let reminder_time = - event_time - chrono::Duration::minutes(reminder.reminder_time as i64); + let reminders = data.get_mut::().unwrap(); - if reminder_time > chrono::offset::Utc::now() { - let ctx = ctx.clone(); - let reminder_msg = reminder.msg.clone(); - let event = event.clone(); - - tokio::task::spawn(async move { - send_reminders_task(&ctx, reminder_time, &event, &reminder_msg).await; - }); - } - } - } + reminders.add_reminders(event, &*config); } /// Send reminders -pub async fn send_reminders_task( - ctx: &Context, - datetime: DateTime, - event: &Event, - reminder_msg: &str, -) { - let duration = datetime - chrono::offset::Utc::now(); - tokio::time::sleep(tokio::time::Duration::from_millis( - duration.num_milliseconds() as u64, - )) - .await; - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - let event_channel_id = config.event_channel; +pub async fn send_reminders_task(ctx: &Context) { + let duration = tokio::time::Duration::from_secs(1); + loop { + tokio::time::sleep(duration).await; + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + let event_channel_id = config.event_channel; - if let Ok(message_id) = event.message_id.parse::() { - // Get message id - if let Ok(message) = ctx.http.get_message(event_channel_id, message_id).await { - if let Ok(reaction_users) = message - .reaction_users(ctx, INTERESTED_EMOJI, None, None) - .await - { - // Build reminder message - let msg: String = reminder_msg.replace("{EVENT_NAME}", event.event_name.as_str()); + let reminder_msg: Vec<&String> = match &config.reminders { + None => return, + Some(reminder_msg) => reminder_msg.iter().map(|r| &r.msg).collect(), + }; - // Send reminder to each reacted user - for user in reaction_users { - send_dm_message(ctx, user, &msg).await; + let mut data = ctx.data.write().await; + let reminders = data + .get_mut::() + .unwrap(); + + let current_reminders = reminders.get_reminders(); + + for reminder in current_reminders { + if let Ok(event) = get_event_by_id(config.db_url.clone(), reminder.event_id) { + let message_id = event.message_id.parse::().unwrap_or_default(); + // Get message id + if let Ok(message) = ctx.http.get_message(event_channel_id, message_id).await { + if let Ok(reaction_users) = message + .reaction_users(ctx, INTERESTED_EMOJI, None, None) + .await + { + // Build reminder message + let msg: String = reminder_msg[reminder.reminder_id] + .replace("{EVENT_NAME}", event.event_name.as_str()); + + // Send reminder to each reacted user + for user in reaction_users { + send_dm_message(ctx, user, &msg).await; + } + } } } } @@ -308,16 +313,112 @@ pub async fn send_reminders_task( } /// Delete event -#[allow(dead_code)] -pub async fn delete_event(http: &Arc, data: &Arc>, event: &Event) { - let config = get_config(&data.read().await) +pub async fn delete_event(ctx: &Context, event: &Event) -> CommandResult { + let config = get_config(&ctx.data.read().await) .await .expect("Unable to get config"); - remove_event(config.db_url.clone(), event.id).ok(); - if let Ok(message_id) = event.message_id.parse::() { - http.delete_message(config.event_channel, message_id) + let message_id = event.message_id.parse::()?; + let message = ctx + .http + .get_message(config.event_channel, message_id) + .await?; + let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); + + // Only send a cancel message if the even has not already happened + if event.event_time > Utc::now().naive_utc() { + if let Ok(reaction_users) = message + .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) .await - .ok(); + { + for user in reaction_users { + send_dm_message(ctx, user, &cancel_msg).await; + } + } + } + + remove_event(config.db_url.clone(), event.id)?; + + message.delete(ctx).await?; + + if let Some(reminders) = ctx.data.write().await.get_mut::() { + reminders.remove_reminders(&event); + } + + Ok(()) +} + +#[help] +#[command_not_found_text = "Could not find: `{}`."] +#[strikethrough_commands_tip_in_guild("")] +async fn bot_help( + context: &Context, + msg: &Message, + args: Args, + help_options: &'static HelpOptions, + groups: &[&'static CommandGroup], + owners: HashSet, +) -> CommandResult { + help_commands::with_embeds(context, msg, args, help_options, groups, owners).await; + Ok(()) +} + +/// Handler for Discord events +pub struct Handler; + +#[async_trait] +impl EventHandler for Handler { + /// On reaction add + async fn reaction_add(&self, ctx: Context, reaction: Reaction) { + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + if reaction.channel_id.0 == config.event_channel + && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI + { + send_message_to_reaction_users( + &ctx, + &reaction, + "Hello, you are now receiving reminders for **{event}**", + ) + .await; + } + } + + /// On reaction remove + async fn reaction_remove(&self, ctx: Context, reaction: Reaction) { + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + + if reaction.channel_id.0 == config.event_channel + && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI + { + send_message_to_reaction_users( + &ctx, + &reaction, + "Hello, you are no longer receiving reminders for **{event}**", + ) + .await; + } + } + + /// On bot ready + async fn ready(&self, ctx: Context, ready: Ready) { + info!("Connected to Discord as {}", ready.user.name); + + // Schedule current events + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + for event in get_all_events(config.db_url.clone()).unwrap() { + if event.reminder_sent == 0 { + schedule_event(&ctx, &event).await; + } + } + + tokio::spawn(async move { + send_reminders_task(&ctx).await; + }); } } diff --git a/src/main.rs b/src/main.rs index 3fcd406..a03cf0f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,9 +7,14 @@ extern crate log; extern crate log4rs; extern crate serde; -use std::collections::HashSet; +mod database; +mod discord; +mod hypebot_config; +mod reminder; + use std::path::Path; use std::process::exit; +use std::sync::Arc; use clap::{App, Arg}; use log::LevelFilter; @@ -22,28 +27,16 @@ use log4rs::config::{Appender, Config, Root}; use log4rs::encode::pattern::PatternEncoder; use log4rs::filter::threshold::ThresholdFilter; use log4rs::init_config; -use serenity::async_trait; use serenity::client::Client; -use serenity::framework::standard::macros::{group, help}; -use serenity::framework::standard::{help_commands, Args, CommandGroup, HelpOptions}; -use serenity::framework::standard::{CommandResult, StandardFramework}; -use serenity::model::channel::{Message, Reaction}; -use serenity::model::id::UserId; -use serenity::model::prelude::Ready; -use serenity::prelude::{Context, EventHandler}; +use serenity::framework::standard::macros::group; +use serenity::framework::standard::StandardFramework; use database::*; use discord::events::{CANCEL_COMMAND, CONFIRM_COMMAND, CREATE_COMMAND}; -use discord::{ - get_config, log_error, permission_check, schedule_event, send_message_to_reaction_users, - DraftEvent, -}; +use discord::BOT_HELP; +use discord::{log_error, permission_check, DraftEvent, Handler}; use hypebot_config::HypeBotConfig; -use std::sync::Arc; - -mod database; -mod discord; -mod hypebot_config; +use reminder::Reminders; const INTERESTED_EMOJI: char = '\u{2705}'; const UNINTERESTED_EMOJI: char = '\u{274C}'; @@ -57,77 +50,6 @@ type HypeBotResult = std::result::Result>; #[commands(create, confirm, cancel)] struct EventCommands; -/// Handler for Discord events -struct Handler; - -#[async_trait] -impl EventHandler for Handler { - /// On reaction add - async fn reaction_add(&self, ctx: Context, reaction: Reaction) { - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - if reaction.channel_id.0 == config.event_channel - && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI - { - send_message_to_reaction_users( - &ctx, - &reaction, - "Hello, you are now receiving reminders for **{event}**", - ) - .await; - } - } - - /// On reaction remove - async fn reaction_remove(&self, ctx: Context, reaction: Reaction) { - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - - if reaction.channel_id.0 == config.event_channel - && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI - { - send_message_to_reaction_users( - &ctx, - &reaction, - "Hello, you are no longer receiving reminders for **{event}**", - ) - .await; - } - } - - /// On bot ready - async fn ready(&self, ctx: Context, ready: Ready) { - info!("Connected to Discord as {}", ready.user.name); - - // Schedule current events - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - for event in get_all_events(config.db_url.clone()).unwrap() { - if event.reminder_sent == 0 { - schedule_event(&ctx, &event).await; - } - } - } -} - -#[help] -#[command_not_found_text = "Could not find: `{}`."] -#[strikethrough_commands_tip_in_guild("")] -async fn bot_help( - context: &Context, - msg: &Message, - args: Args, - help_options: &'static HelpOptions, - groups: &[&'static CommandGroup], - owners: HashSet, -) -> CommandResult { - help_commands::with_embeds(context, msg, args, help_options, groups, owners).await; - Ok(()) -} - /// Does the setup for logging fn setup_logging(config: &HypeBotConfig) -> HypeBotResult<()> { // Build log file path @@ -245,6 +167,7 @@ async fn main() -> HypeBotResult<()> { let mut data = client.data.write().await; data.insert::(Arc::new(cfg)); data.insert::(Arc::new(DraftEvent::default())); + data.insert::(Reminders::default()); } // Start bot diff --git a/src/reminder/mod.rs b/src/reminder/mod.rs new file mode 100644 index 0000000..4555bcd --- /dev/null +++ b/src/reminder/mod.rs @@ -0,0 +1,156 @@ +use crate::database::models::Event; +use crate::hypebot_config::HypeBotConfig; +use chrono::{Duration, NaiveDateTime, Utc}; +use serenity::prelude::TypeMapKey; + +/// Event Reminder +#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] +pub struct Reminder { + pub event_id: i32, + pub time: NaiveDateTime, + pub reminder_id: usize, +} + +/// Set of reminders for currently active events +#[derive(Debug, Clone, Default)] +pub struct Reminders { + reminders: Vec, +} + +impl TypeMapKey for Reminders { + type Value = Reminders; +} + +impl Reminders { + /// Add all the reminders for an event + pub fn add_reminders(&mut self, event: &Event, config: &HypeBotConfig) { + if let Some(event_reminders) = &config.reminders { + for (reminder_id, event_reminder) in event_reminders.iter().enumerate() { + let reminder_time = event.event_time + - chrono::Duration::minutes(event_reminder.reminder_time as i64); + + if reminder_time > Utc::now().naive_utc() { + self.reminders.push(Reminder { + event_id: event.id, + time: reminder_time, + reminder_id, + }); + } + } + } + } + + /// Get reminders that need to be sent + pub fn get_reminders(&mut self) -> Vec { + let reminders: Vec = self + .reminders + .iter() + .filter(|r| { + let time_diff = r.time - Utc::now().naive_utc(); + time_diff > Duration::seconds(-5) && time_diff < Duration::seconds(5) + }) + .copied() + .collect(); + + self.reminders.retain(|r| !reminders.contains(r)); + + reminders + } + + /// Removes reminders for an event + pub fn remove_reminders(&mut self, event: &Event) { + self.reminders.retain(|e| e.event_id != event.id) + } + + /// Update reminders for an event + #[allow(dead_code)] + pub fn update_reminders(&mut self, event: &Event, config: &HypeBotConfig) { + self.remove_reminders(event); + self.add_reminders(event, config); + } +} + +#[cfg(test)] +mod tests { + use crate::hypebot_config::{EventReminder, HypeBotConfig}; + use crate::models::Event; + use crate::reminder::Reminders; + use chrono::{Duration, Utc}; + + fn setup() -> (Reminders, HypeBotConfig, Event) { + let r = Reminders::default(); + + let c = HypeBotConfig { + db_url: "".to_string(), + default_thumbnail_link: "".to_string(), + discord_key: "".to_string(), + prefix: "".to_string(), + event_channel: 0, + event_roles: vec![], + ping_roles: vec![], + event_timezone: chrono_tz::UTC, + log_path: "".to_string(), + reminders: Some( + [EventReminder { + msg: "".to_string(), + reminder_time: 5, + }, + EventReminder { + msg: "".to_string(), + reminder_time: 1, + }] + .to_vec(), + ), + }; + + let e = Event { + id: 0, + event_name: "".to_string(), + event_desc: "".to_string(), + event_loc: "".to_string(), + organizer: "".to_string(), + event_time: Utc::now().naive_utc() + Duration::minutes(5) + Duration::seconds(5), + message_id: "".to_string(), + thumbnail_link: "".to_string(), + reminder_sent: 0, + }; + + (r, c, e) + } + + #[test] + fn test_add_reminders() { + let (mut r, c, e) = setup(); + r.add_reminders(&e, &c); + + assert_eq!(r.reminders.len(), c.reminders.unwrap().len()); + } + + #[test] + fn test_get_reminders() { + let (mut r, c, e) = setup(); + r.add_reminders(&e, &c); + + assert_eq!(r.get_reminders().len(), 1); + assert_eq!(r.reminders.len(), c.reminders.unwrap().len()-1); + } + + #[test] + fn test_remove_reminders() { + let (mut r, c, e) = setup(); + r.add_reminders(&e, &c); + + r.remove_reminders(&e); + assert_eq!(r.reminders.len(), 0); + } + + #[test] + fn test_update_reminders() { + let (mut r, c, e) = setup(); + r.add_reminders(&e, &c); + + r.update_reminders(&e, &c); + + assert_eq!(r.get_reminders().len(), 1); + } +} From 7c441028a79edc9ba9596e1e52bb6397ee6c792c Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Fri, 26 Feb 2021 18:00:16 -0600 Subject: [PATCH 05/10] Added event cleanup --- Cargo.lock | 1269 ++++++++++++++++++++++--------------------- Cargo.toml | 5 +- src/database/mod.rs | 13 +- src/discord/mod.rs | 35 +- 4 files changed, 678 insertions(+), 644 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d13284..f653980 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,1868 +4,1869 @@ name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" [[package]] name = "aho-corasick" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "aho-corasick" version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "arc-swap" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" [[package]] name = "async-trait" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "async-tungstenite" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7cc5408453d37e2b1c6f01d8078af1da58b6cfa6a80fa2ede3bd2b9a6ada9c4" dependencies = [ - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tungstenite 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io", + "futures-util", + "log", + "pin-project 1.0.1", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots 0.20.0", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi", ] [[package]] name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "base64" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "base64" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", ] [[package]] name = "bumpalo" version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" [[package]] name = "bytes" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" [[package]] name = "cc" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.11" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "num-integer", + "num-traits 0.2.11", + "serde 1.0.106", + "time", + "winapi", ] [[package]] name = "chrono-tz" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa1878c18b5b01b9978d5f130fe366d434022004d12fb87c182e8459b427c4a3" dependencies = [ - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parse-zoneinfo 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "parse-zoneinfo", ] [[package]] name = "clap" version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", ] [[package]] name = "command_attr" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef54b146e4ff8a036b9d632fd48c183c9757992535e5f557275f4a01dfd9c7c7" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "config" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9107d78ed62b3fa5a86e7d18e647abed48cfd8f8fab6c72f4cdb982d196f7e6" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0", + "nom", + "rust-ini", + "serde 1.0.106", + "serde-hjson", + "serde_json", + "toml", + "yaml-rust", ] [[package]] name = "cpuid-bool" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", ] [[package]] name = "diesel" version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d7ca63eb2efea87a7f56a283acc49e2ce4b2bd54adf7465dc1d81fef13d8fc" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_derives 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mysqlclient-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "chrono", + "diesel_derives", + "mysqlclient-sys", + "percent-encoding", + "url", ] [[package]] name = "diesel_derives" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "diesel_migrations" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c" dependencies = [ - "migrations_internals 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "migrations_macros 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "migrations_internals", + "migrations_macros", ] [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", ] [[package]] name = "dtoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" [[package]] name = "encoding_rs" version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", ] [[package]] name = "flate2" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "form_urlencoded" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "percent-encoding", ] [[package]] name = "futures" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] name = "futures-channel" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-sink", ] [[package]] name = "futures-core" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" [[package]] name = "futures-io" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" [[package]] name = "futures-macro" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" dependencies = [ - "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "futures-sink" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" [[package]] name = "futures-task" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" [[package]] name = "futures-util" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", ] [[package]] name = "generic-array" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", + "version_check 0.9.1", ] [[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "libc", + "wasi", ] [[package]] name = "h2" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" dependencies = [ - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", + "tracing-futures", ] [[package]] name = "hermit-abi" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "http" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "itoa", ] [[package]] name = "http-body" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" dependencies = [ - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0", + "http", ] [[package]] name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "httpdate" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "humantime" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" dependencies = [ - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error", ] [[package]] name = "hype_bot" version = "0.2.0" dependencies = [ - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono-tz 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_migrations 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log4rs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serenity 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "strfmt 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "chrono-tz", + "clap", + "config", + "diesel", + "diesel_migrations", + "log", + "log4rs", + "percent-encoding", + "serde 1.0.106", + "serde_derive", + "serenity", + "strfmt", + "tokio", + "url", ] [[package]] name = "hyper" version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" dependencies = [ - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project 1.0.1", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] name = "hyper-rustls" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util", + "hyper", + "log", + "rustls", + "tokio", + "tokio-rustls", + "webpki", ] [[package]] name = "idna" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "indexmap" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "input_buffer" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", ] [[package]] name = "ipnet" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" [[package]] name = "itoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" [[package]] name = "js-sys" version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" dependencies = [ - "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", ] [[package]] name = "lazy_static" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" [[package]] name = "linked-hash-map" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" dependencies = [ - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_test 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.8.23", + "serde_test", ] [[package]] name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" [[package]] name = "lock_api" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard", ] [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "serde 1.0.106", ] [[package]] name = "log-mdc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" [[package]] name = "log4rs" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47ba5437ccdf01e4addd4d2347ef561911d57f908f4db1e1b192d5c25a92715" dependencies = [ - "arc-swap 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde-value 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", - "thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "arc-swap", + "chrono", + "flate2", + "fnv", + "humantime", + "libc", + "log", + "log-mdc", + "parking_lot", + "serde 1.0.106", + "serde-value", + "serde_derive", + "serde_json", + "serde_yaml", + "thread-id", + "typemap", + "winapi", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "migrations_internals" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860" dependencies = [ - "diesel 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel", ] [[package]] name = "migrations_macros" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" dependencies = [ - "migrations_internals 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "migrations_internals", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" dependencies = [ - "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mime", + "unicase", ] [[package]] name = "miniz_oxide" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" dependencies = [ - "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32", ] [[package]] name = "mio" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ntapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "log", + "miow", + "ntapi", + "winapi", ] [[package]] name = "miow" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ - "socket2 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2", + "winapi", ] [[package]] name = "mysqlclient-sys" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9637d93448044078aaafea7419aed69d301b4a12bcc4aa0ae856eb169bef85" dependencies = [ - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config", + "vcpkg", ] [[package]] name = "nom" version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", + "version_check 0.1.5", ] [[package]] name = "ntapi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "num-integer" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "num-traits 0.2.11", ] [[package]] name = "num-traits" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11", ] [[package]] name = "num-traits" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "num_cpus" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[package]] name = "opaque-debug" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "ordered-float" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11", ] [[package]] name = "parking_lot" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api", + "parking_lot_core", ] [[package]] name = "parking_lot_core" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall", + "smallvec", + "winapi", ] [[package]] name = "parse-zoneinfo" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ee19a3656dadae35a33467f9714f1228dd34766dbe49e10e656b5296867aea" dependencies = [ - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.11", ] [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f6a7f5eee6292c559c793430c55c00aea9d3b3d1905e855806ca4d7253426a2" dependencies = [ - "pin-project-internal 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal 0.4.9", ] [[package]] name = "pin-project" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" dependencies = [ - "pin-project-internal 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal 1.0.1", ] [[package]] name = "pin-project-internal" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8988430ce790d8682672117bc06dda364c0be32d3abd738234f19f3240bad99a" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "pin-project-internal" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "pin-project-lite" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" [[package]] name = "pin-project-lite" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba36e0a6cc5a4c645073f4984f1ed55d09f5857d4de7c14550baa81a39ef5a17" [[package]] name = "pin-utils" version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" [[package]] name = "pkg-config" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" [[package]] name = "ppv-lite86" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "proc-macro-hack" version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" [[package]] name = "proc-macro-nested" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" [[package]] name = "proc-macro2" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid", ] [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", ] [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", ] [[package]] name = "rand_chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", + "rand_core", ] [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core", ] [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] name = "regex" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" dependencies = [ - "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10", + "memchr", + "regex-syntax 0.5.6", + "thread_local 0.3.6", + "utf8-ranges", ] [[package]] name = "regex" version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" dependencies = [ - "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.10", + "memchr", + "regex-syntax 0.6.17", + "thread_local 1.0.1", ] [[package]] name = "regex-syntax" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" dependencies = [ - "ucd-util 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util", ] [[package]] name = "regex-syntax" version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" [[package]] name = "reqwest" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" dependencies = [ - "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.13.0", + "bytes 1.0.0", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "lazy_static 1.4.0", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite 0.2.3", + "rustls", + "serde 1.0.106", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-rustls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.21.0", + "winreg", ] [[package]] name = "ring" version = "0.16.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "lazy_static 1.4.0", + "libc", + "spin", + "untrusted", + "web-sys", + "winapi", ] [[package]] name = "rust-ini" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" [[package]] name = "rustls" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" dependencies = [ - "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.13.0", + "log", + "ring", + "sct", + "webpki", ] [[package]] name = "ryu" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" dependencies = [ - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "serde" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" dependencies = [ - "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde-hjson" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b833c5ad67d52ced5f5938b2980f32a9c1c5ef047f0b4fb3127e7a423c76153" dependencies = [ - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11", + "linked-hash-map 0.3.0", + "num-traits 0.1.43", + "regex 1.3.7", + "serde 0.8.23", ] [[package]] name = "serde-value" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a65a7291a8a568adcae4c10a677ebcedbc6c9cec91c054dee2ce40b0e3290eb" dependencies = [ - "ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "ordered-float", + "serde 1.0.106", ] [[package]] name = "serde_derive" version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "serde_json" version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" dependencies = [ - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde 1.0.106", ] [[package]] name = "serde_test" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" dependencies = [ - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.8.23", ] [[package]] name = "serde_urlencoded" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ - "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "form_urlencoded", + "itoa", + "ryu", + "serde 1.0.106", ] [[package]] name = "serde_yaml" version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" dependencies = [ - "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa", + "linked-hash-map 0.5.2", + "serde 1.0.106", + "yaml-rust", ] [[package]] name = "serenity" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dac8367ecfd3380c00dcedf5eb9a47888ae74ae391419b5b1f7735895ed8df4" dependencies = [ - "async-trait 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "async-tungstenite 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "command_attr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap_rev 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uwl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-trait", + "async-tungstenite", + "base64 0.13.0", + "bitflags", + "bytes 1.0.0", + "chrono", + "command_attr", + "flate2", + "futures", + "percent-encoding", + "reqwest", + "serde 1.0.106", + "serde_json", + "static_assertions", + "tokio", + "tracing", + "tracing-futures", + "typemap_rev", + "url", + "uwl", ] [[package]] name = "sha-1" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce3cdf1b5e620a498ee6f2a171885ac7e22f0e12089ec4b3d22b84921792507c" dependencies = [ - "block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cpuid-bool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer", + "cfg-if 1.0.0", + "cpuid-bool", + "digest", + "opaque-debug", ] [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a" [[package]] name = "socket2" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "winapi", ] [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strfmt" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b278b244ef7aa5852b277f52dd0c6cac3a109919e1f6d699adde63251227a30f" [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width", ] [[package]] name = "thread-id" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "redox_syscall", + "winapi", ] [[package]] name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0", ] [[package]] name = "time" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi", ] [[package]] name = "tokio" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d258221f566b6c803c7b4714abadc080172b272090cdc5e244a6d4dd13c3a6bd" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-macros 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "bytes 1.0.0", + "libc", + "memchr", + "mio", + "num_cpus", + "pin-project-lite 0.2.3", + "tokio-macros", ] [[package]] name = "tokio-macros" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "tokio-rustls" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls", + "tokio", + "webpki", ] [[package]] name = "tokio-stream" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4cdeb73537e63f98adcd73138af75e3f368ccaecffaa29d7eb61b9f5a440457" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "pin-project-lite 0.2.3", + "tokio", ] [[package]] name = "tokio-util" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36135b7e7da911f5f8b9331209f7fab4cc13498f3fff52f72a710c78187e3148" dependencies = [ - "bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-stream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.0", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.2.3", + "tokio", + "tokio-stream", ] [[package]] name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" dependencies = [ - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.106", ] [[package]] name = "tower-service" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-attributes 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "pin-project-lite 0.1.4", + "tracing-attributes", + "tracing-core", ] [[package]] name = "tracing-attributes" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "tracing-core" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0", ] [[package]] name = "tracing-futures" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" dependencies = [ - "pin-project 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.9", + "tracing", ] [[package]] name = "traitobject" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "tungstenite" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" dependencies = [ - "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.3", + "byteorder", + "bytes 0.5.4", + "http", + "httparse", + "input_buffer", + "log", + "rand", + "sha-1", + "url", + "utf-8", ] [[package]] name = "typemap" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" dependencies = [ - "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unsafe-any", ] [[package]] name = "typemap_rev" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078d41124321488746becfa144977b9b54667af408ff933cbbce9d83e7796ac9" [[package]] name = "typenum" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "ucd-util" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236" [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1", ] [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] name = "unicode-normalization" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" dependencies = [ - "smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec", ] [[package]] name = "unicode-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" [[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "unsafe-any" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "traitobject", ] [[package]] name = "untrusted" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" [[package]] name = "url" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" dependencies = [ - "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "form_urlencoded", + "idna", + "matches", + "percent-encoding", ] [[package]] name = "utf-8" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "utf8-ranges" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" [[package]] name = "uwl" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" [[package]] name = "vcpkg" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" [[package]] name = "vec_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" [[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] name = "version_check" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "try-lock", ] [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "serde 1.0.106", + "serde_json", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" dependencies = [ - "bumpalo 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static 1.4.0", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" dependencies = [ - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "quote", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.69" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" [[package]] name = "web-sys" version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" dependencies = [ - "js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "wasm-bindgen", ] [[package]] name = "webpki" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" dependencies = [ - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "webpki-roots" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" dependencies = [ - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki", ] [[package]] name = "webpki-roots" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" dependencies = [ - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki", ] [[package]] name = "winapi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winreg" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "yaml-rust" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" dependencies = [ - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.2", ] - -[metadata] -"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" -"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum arc-swap 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" -"checksum async-trait 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" -"checksum async-tungstenite 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7cc5408453d37e2b1c6f01d8078af1da58b6cfa6a80fa2ede3bd2b9a6ada9c4" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" -"checksum base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -"checksum bumpalo 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" -"checksum bytes 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" -"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -"checksum chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" -"checksum chrono-tz 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa1878c18b5b01b9978d5f130fe366d434022004d12fb87c182e8459b427c4a3" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum command_attr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef54b146e4ff8a036b9d632fd48c183c9757992535e5f557275f4a01dfd9c7c7" -"checksum config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9107d78ed62b3fa5a86e7d18e647abed48cfd8f8fab6c72f4cdb982d196f7e6" -"checksum cpuid-bool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum diesel 1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "33d7ca63eb2efea87a7f56a283acc49e2ce4b2bd54adf7465dc1d81fef13d8fc" -"checksum diesel_derives 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" -"checksum diesel_migrations 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c" -"checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" -"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" -"checksum flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" -"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" -"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" -"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" -"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" -"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" -"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" -"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" -"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" -"checksum generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum h2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" -"checksum hermit-abi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" -"checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -"checksum http-body 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" -"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" -"checksum hyper-rustls 0.22.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" -"checksum input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" -"checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" -"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" -"checksum js-sys 0.3.46 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" -"checksum linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" -"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" -"checksum log4rs 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b47ba5437ccdf01e4addd4d2347ef561911d57f908f4db1e1b192d5c25a92715" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" -"checksum migrations_internals 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860" -"checksum migrations_macros 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" -"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" -"checksum mio 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" -"checksum miow 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" -"checksum mysqlclient-sys 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7e9637d93448044078aaafea7419aed69d301b4a12bcc4aa0ae856eb169bef85" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum ntapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" -"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" -"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" -"checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -"checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -"checksum parse-zoneinfo 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ee19a3656dadae35a33467f9714f1228dd34766dbe49e10e656b5296867aea" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum pin-project 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6f6a7f5eee6292c559c793430c55c00aea9d3b3d1905e855806ca4d7253426a2" -"checksum pin-project 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" -"checksum pin-project-internal 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "8988430ce790d8682672117bc06dda364c0be32d3abd738234f19f3240bad99a" -"checksum pin-project-internal 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" -"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" -"checksum pin-project-lite 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ba36e0a6cc5a4c645073f4984f1ed55d09f5857d4de7c14550baa81a39ef5a17" -"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" -"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" -"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" -"checksum proc-macro-nested 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" -"checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" -"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" -"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" -"checksum reqwest 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" -"checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" -"checksum rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" -"checksum rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" -"checksum ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" -"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -"checksum serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" -"checksum serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" -"checksum serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0b833c5ad67d52ced5f5938b2980f32a9c1c5ef047f0b4fb3127e7a423c76153" -"checksum serde-value 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a65a7291a8a568adcae4c10a677ebcedbc6c9cec91c054dee2ce40b0e3290eb" -"checksum serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)" = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" -"checksum serde_json 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" -"checksum serde_test 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" -"checksum serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" -"checksum serenity 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4dac8367ecfd3380c00dcedf5eb9a47888ae74ae391419b5b1f7735895ed8df4" -"checksum sha-1 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ce3cdf1b5e620a498ee6f2a171885ac7e22f0e12089ec4b3d22b84921792507c" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a" -"checksum socket2 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -"checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -"checksum strfmt 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b278b244ef7aa5852b277f52dd0c6cac3a109919e1f6d699adde63251227a30f" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum syn 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -"checksum tokio 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d258221f566b6c803c7b4714abadc080172b272090cdc5e244a6d4dd13c3a6bd" -"checksum tokio-macros 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" -"checksum tokio-rustls 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -"checksum tokio-stream 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e4cdeb73537e63f98adcd73138af75e3f368ccaecffaa29d7eb61b9f5a440457" -"checksum tokio-util 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "36135b7e7da911f5f8b9331209f7fab4cc13498f3fff52f72a710c78187e3148" -"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" -"checksum tracing 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" -"checksum tracing-attributes 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" -"checksum tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -"checksum tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum tungstenite 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum typemap_rev 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "078d41124321488746becfa144977b9b54667af408ff933cbbce9d83e7796ac9" -"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" -"checksum ucd-util 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c85f514e095d348c279b1e5cd76795082cf15bd59b93207832abe0b1d8fed236" -"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" -"checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" -"checksum url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" -"checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" -"checksum utf8-ranges 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" -"checksum uwl 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" -"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" -"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" -"checksum wasm-bindgen-backend 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" -"checksum wasm-bindgen-futures 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" -"checksum wasm-bindgen-macro 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" -"checksum wasm-bindgen-macro-support 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" -"checksum wasm-bindgen-shared 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" -"checksum web-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" -"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -"checksum webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" -"checksum webpki-roots 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" diff --git a/Cargo.toml b/Cargo.toml index 44a72d6..b7d7980 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,15 +11,16 @@ clap = "2.33.0" serde = "1.0.106" serde_derive = "1.0.104" config = "0.9" -chrono = "0.4.11" +chrono = { version = "0.4.19", default-features = false, features = ["clock", "std"] } chrono-tz = "0.4" -diesel = { version = "1.4.0", features = ["mysql", "chrono"] } +diesel = { version = "1.4.4", features = ["mysql", "chrono"] } diesel_migrations = "1.4.0" log = "0.4.8" log4rs = "0.11.0" strfmt = "0.1.6" url = "2.1.1" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } +percent-encoding = "2.1.0" [dependencies.serenity] version = "0.10.2" diff --git a/src/database/mod.rs b/src/database/mod.rs index 6a0019c..61a047e 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -5,6 +5,7 @@ use diesel::prelude::*; use diesel::result::Error; use models::{Event, NewEvent}; use std::vec::Vec; +use chrono::{Utc, DateTime}; /// Establish a connection to the database pub fn establish_connection(database_url: String) -> MysqlConnection { @@ -58,11 +59,11 @@ pub fn get_event_by_msg_id(database_url: String, msg_id: String) -> Result Result, Error> { - use schema::events::dsl::{event_time, events}; + use schema::events::dsl::{events}; let connection = establish_connection(database_url); - events.order(event_time).load(&connection) + events.load(&connection) } /// Get event with id @@ -73,3 +74,11 @@ pub fn get_event_by_id(database_url: String, event_id: i32) -> Result(&connection) } + +pub fn get_event_older_than(database_url: String, time: DateTime) -> Result, Error> { + use schema::events::dsl::{events, event_time}; + + let connection = establish_connection(database_url); + + events.filter(event_time.lt(time.naive_utc())).load(&connection) +} diff --git a/src/discord/mod.rs b/src/discord/mod.rs index b0a55ad..48554e5 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -1,7 +1,7 @@ use std::collections::{HashMap, HashSet}; use std::sync::Arc; -use chrono::{DateTime, NaiveDateTime, Utc}; +use chrono::{DateTime, NaiveDateTime, Utc, Duration}; use serenity::async_trait; use serenity::framework::standard::macros::help; use serenity::framework::standard::macros::hook; @@ -17,9 +17,10 @@ use serenity::utils::Colour; use serenity::Result; use strfmt::strfmt; use tokio::sync::RwLockReadGuard; +use percent_encoding::{AsciiSet, CONTROLS, utf8_percent_encode}; use crate::database::models::{Event, NewEvent}; -use crate::database::{get_all_events, get_event_by_id, get_event_by_msg_id, remove_event}; +use crate::database::{get_all_events, get_event_by_id, get_event_by_msg_id, remove_event, get_event_older_than}; use crate::hypebot_config::HypeBotConfig; use crate::reminder::Reminders; use crate::{INTERESTED_EMOJI, UNINTERESTED_EMOJI}; @@ -83,9 +84,11 @@ pub async fn send_dm_message(ctx: &Context, user: User, message: &str) { } } +const FRAGMENT: &AsciiSet = &CONTROLS.add(b' ').add(b'"').add(b'<').add(b'>').add(b'`'); + /// Create a countdown link for the event pub fn get_countdown_link(event_name: &str, utc: &DateTime) -> String { - let msg = event_name.replace(" ", "+"); + let msg = utf8_percent_encode(event_name, FRAGMENT); let time = utc.format("%G%m%dT%H%M").to_string(); format!( @@ -312,6 +315,22 @@ pub async fn send_reminders_task(ctx: &Context) { } } +/// Delete old events +pub async fn cleanup_task(ctx: &Context) { + let duration = tokio::time::Duration::from_secs(60*60); + loop { + tokio::time::sleep(duration).await; + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + let one_week_ago = Utc::now() - Duration::from_std(std::time::Duration::from_secs(60*60*24*7)).unwrap(); + + for event in get_event_older_than(config.db_url.clone(), one_week_ago).unwrap() { + delete_event(ctx, &event).await.ok(); + } + } +} + /// Delete event pub async fn delete_event(ctx: &Context, event: &Event) -> CommandResult { let config = get_config(&ctx.data.read().await) @@ -412,13 +431,17 @@ impl EventHandler for Handler { .await .expect("Unable to get config"); for event in get_all_events(config.db_url.clone()).unwrap() { - if event.reminder_sent == 0 { - schedule_event(&ctx, &event).await; - } + schedule_event(&ctx, &event).await; } + let cleanup_ctx = ctx.clone(); + tokio::spawn(async move { send_reminders_task(&ctx).await; }); + + tokio::spawn(async move { + cleanup_task(&cleanup_ctx).await; + }); } } From 32f100c4cf64999a64a3b7f9d4b7de52fe10c9e0 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Thu, 4 Mar 2021 19:07:31 -0600 Subject: [PATCH 06/10] Moved to sled for the database + code cleanup + Moved to the sled embedded rust database + Refactored code during migration + fmt+clippy --- Cargo.lock | 214 ++++++---- Cargo.toml | 4 +- diesel.toml | 5 - migrations/.gitkeep | 0 .../2020-04-22-222856_create_events/down.sql | 2 - .../2020-04-22-222856_create_events/up.sql | 12 - .../down.sql | 2 - .../up.sql | 2 - src/database/mod.rs | 148 +++---- src/database/models.rs | 70 ++-- src/database/schema.rs | 13 - src/discord/events.rs | 32 +- src/discord/handler.rs | 68 +++ src/discord/mod.rs | 394 ++---------------- src/discord/tasks.rs | 71 ++++ src/discord/utility.rs | 247 +++++++++++ src/hypebot_config.rs | 3 +- src/main.rs | 24 +- src/reminder/mod.rs | 32 +- 19 files changed, 687 insertions(+), 656 deletions(-) delete mode 100644 diesel.toml delete mode 100644 migrations/.gitkeep delete mode 100644 migrations/2020-04-22-222856_create_events/down.sql delete mode 100644 migrations/2020-04-22-222856_create_events/up.sql delete mode 100644 migrations/2020-07-10-032139_bigger_desc_field/down.sql delete mode 100644 migrations/2020-07-10-032139_bigger_desc_field/up.sql delete mode 100644 src/database/schema.rs create mode 100644 src/discord/handler.rs create mode 100644 src/discord/tasks.rs create mode 100644 src/discord/utility.rs diff --git a/Cargo.lock b/Cargo.lock index f653980..c643a25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,9 +118,9 @@ checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" @@ -235,46 +235,35 @@ checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", ] [[package]] -name = "diesel" -version = "1.4.4" +name = "crossbeam-epoch" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d7ca63eb2efea87a7f56a283acc49e2ce4b2bd54adf7465dc1d81fef13d8fc" +checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" dependencies = [ - "byteorder", - "chrono", - "diesel_derives", - "mysqlclient-sys", - "percent-encoding", - "url", + "cfg-if 1.0.0", + "crossbeam-utils", + "lazy_static 1.4.0", + "memoffset", + "scopeguard", ] [[package]] -name = "diesel_derives" -version = "1.4.1" +name = "crossbeam-utils" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "diesel_migrations" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c" -dependencies = [ - "migrations_internals", - "migrations_macros", + "autocfg", + "cfg-if 1.0.0", + "lazy_static 1.4.0", ] [[package]] @@ -329,6 +318,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "futures" version = "0.3.4" @@ -408,6 +407,15 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "generic-array" version = "0.14.4" @@ -508,14 +516,14 @@ dependencies = [ "chrono-tz", "clap", "config", - "diesel", - "diesel_migrations", "log", "log4rs", "percent-encoding", "serde 1.0.106", "serde_derive", + "serde_json", "serenity", + "sled", "strfmt", "tokio", "url", @@ -589,6 +597,15 @@ dependencies = [ "bytes 0.5.4", ] +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "ipnet" version = "2.3.0" @@ -624,9 +641,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.69" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" +checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" [[package]] name = "linked-hash-map" @@ -654,12 +671,21 @@ dependencies = [ ] [[package]] -name = "log" -version = "0.4.8" +name = "lock_api" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ - "cfg-if 0.1.10", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", "serde 1.0.106", ] @@ -683,7 +709,7 @@ dependencies = [ "libc", "log", "log-mdc", - "parking_lot", + "parking_lot 0.10.2", "serde 1.0.106", "serde-value", "serde_derive", @@ -707,24 +733,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] -name = "migrations_internals" -version = "1.4.1" +name = "memoffset" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ - "diesel", -] - -[[package]] -name = "migrations_macros" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" -dependencies = [ - "migrations_internals", - "proc-macro2", - "quote", - "syn", + "autocfg", ] [[package]] @@ -775,16 +789,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "mysqlclient-sys" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9637d93448044078aaafea7419aed69d301b4a12bcc4aa0ae856eb169bef85" -dependencies = [ - "pkg-config", - "vcpkg", -] - [[package]] name = "nom" version = "4.2.3" @@ -863,8 +867,19 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api", - "parking_lot_core", + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.2", + "parking_lot_core 0.8.3", ] [[package]] @@ -876,7 +891,21 @@ dependencies = [ "cfg-if 0.1.10", "cloudabi", "libc", - "redox_syscall", + "redox_syscall 0.1.56", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.5", "smallvec", "winapi", ] @@ -954,12 +983,6 @@ version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" -[[package]] -name = "pkg-config" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" - [[package]] name = "ppv-lite86" version = "0.2.6" @@ -1049,6 +1072,15 @@ version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +[[package]] +name = "redox_syscall" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +dependencies = [ + "bitflags", +] + [[package]] name = "regex" version = "0.2.11" @@ -1233,9 +1265,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.51" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" +checksum = "43535db9747a4ba938c0ce0a98cc631a46ebf943c9e1d604e091df6007620bf6" dependencies = [ "itoa", "ryu", @@ -1323,10 +1355,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] -name = "smallvec" -version = "1.3.0" +name = "sled" +version = "0.34.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05720e22615919e4734f6a99ceae50d00226c3c5aca406e102ebc33298214e0a" +checksum = "1d0132f3e393bcb7390c60bb45769498cf4550bcb7a21d7f95c02b69f6362cdc" +dependencies = [ + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "fs2", + "fxhash", + "libc", + "log", + "parking_lot 0.11.1", +] + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" @@ -1390,7 +1438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" dependencies = [ "libc", - "redox_syscall", + "redox_syscall 0.1.56", "winapi", ] @@ -1685,12 +1733,6 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" -[[package]] -name = "vcpkg" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" - [[package]] name = "vec_map" version = "0.8.1" diff --git a/Cargo.toml b/Cargo.toml index b7d7980..04615cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,17 +10,17 @@ edition = "2018" clap = "2.33.0" serde = "1.0.106" serde_derive = "1.0.104" +serde_json = "1.0.63" config = "0.9" chrono = { version = "0.4.19", default-features = false, features = ["clock", "std"] } chrono-tz = "0.4" -diesel = { version = "1.4.4", features = ["mysql", "chrono"] } -diesel_migrations = "1.4.0" log = "0.4.8" log4rs = "0.11.0" strfmt = "0.1.6" url = "2.1.1" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } percent-encoding = "2.1.0" +sled = "0.34.6" [dependencies.serenity] version = "0.10.2" diff --git a/diesel.toml b/diesel.toml deleted file mode 100644 index bfb01bc..0000000 --- a/diesel.toml +++ /dev/null @@ -1,5 +0,0 @@ -# For documentation on how to configure this file, -# see diesel.rs/guides/configuring-diesel-cli - -[print_schema] -file = "src/database/schema.rs" diff --git a/migrations/.gitkeep b/migrations/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/migrations/2020-04-22-222856_create_events/down.sql b/migrations/2020-04-22-222856_create_events/down.sql deleted file mode 100644 index cb693a2..0000000 --- a/migrations/2020-04-22-222856_create_events/down.sql +++ /dev/null @@ -1,2 +0,0 @@ --- This file should undo anything in `up.sql` -DROP TABLE events; \ No newline at end of file diff --git a/migrations/2020-04-22-222856_create_events/up.sql b/migrations/2020-04-22-222856_create_events/up.sql deleted file mode 100644 index 8b1d411..0000000 --- a/migrations/2020-04-22-222856_create_events/up.sql +++ /dev/null @@ -1,12 +0,0 @@ --- Your SQL goes here -CREATE TABLE events ( - id INTEGER AUTO_INCREMENT PRIMARY KEY, - event_name VARCHAR(255) NOT NULL, - event_desc VARCHAR(255) NOT NULL, - event_loc VARCHAR(255) NOT NULL, - organizer VARCHAR(255) NOT NULL, - event_time DATETIME NOT NULL, - message_id VARCHAR(255) NOT NULL, - thumbnail_link VARCHAR(255) NOT NULL, - reminder_sent INTEGER NOT NULL -) \ No newline at end of file diff --git a/migrations/2020-07-10-032139_bigger_desc_field/down.sql b/migrations/2020-07-10-032139_bigger_desc_field/down.sql deleted file mode 100644 index a0b6650..0000000 --- a/migrations/2020-07-10-032139_bigger_desc_field/down.sql +++ /dev/null @@ -1,2 +0,0 @@ --- This file should undo anything in `up.sql` -ALTER TABLE events MODIFY event_desc VARCHAR(255) ; \ No newline at end of file diff --git a/migrations/2020-07-10-032139_bigger_desc_field/up.sql b/migrations/2020-07-10-032139_bigger_desc_field/up.sql deleted file mode 100644 index 3fee40b..0000000 --- a/migrations/2020-07-10-032139_bigger_desc_field/up.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Your SQL goes here -ALTER TABLE events MODIFY event_desc VARCHAR(2050); \ No newline at end of file diff --git a/src/database/mod.rs b/src/database/mod.rs index 61a047e..5933dc3 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -1,84 +1,84 @@ pub mod models; -pub mod schema; -use diesel::prelude::*; -use diesel::result::Error; -use models::{Event, NewEvent}; -use std::vec::Vec; -use chrono::{Utc, DateTime}; +use crate::models::Event; +use serenity::prelude::TypeMapKey; +use sled::{open, Db, IVec, Result}; +use std::path::Path; +use std::sync::Arc; -/// Establish a connection to the database -pub fn establish_connection(database_url: String) -> MysqlConnection { - MysqlConnection::establish(&database_url) - .unwrap_or_else(|_| panic!("Error connecting to {}", database_url)) -} -/// Insert an event into the database -pub fn insert_event(database_url: String, new_event: &NewEvent) -> Result { - use schema::events::dsl::{events, id}; - - let connection = establish_connection(database_url); - - diesel::insert_into(events) - .values(new_event) - .execute(&connection) - .expect("Error saving event"); - - events.order(id).first(&connection) +pub struct Database { + db: Db, } -/// Remove event -pub fn remove_event(database_url: String, event_id: i32) -> Result { - use schema::events::dsl::{events, id}; +impl Database { + /// Open the database + pub fn new(db_path: &Path) -> Result { + let db = open(db_path)?; - let connection = establish_connection(database_url); + Ok(Self { db }) + } - diesel::delete(events.filter(id.eq(event_id))).execute(&connection) + /// DB iterator + fn db_iter(&self) -> sled::Iter { + self.db.iter() + } + + /// Get events by a filter + pub fn filter_events(&self, filter: F) -> Vec + where + F: Fn(&String, &Event) -> bool, + { + self.db_iter() + .filter_map(|pair| { + if let Ok((message_id, event)) = pair { + let event: Event = event.into(); + let message_id: String = String::from_utf8(message_id.to_vec()).unwrap(); + if filter(&message_id, &event) { + Some(event) + } else { + None + } + } else { + None + } + }) + .collect() + } + + /// Insert an event into the database + pub fn insert_event(&self, event: &Event) -> Result<()> { + let msg_id = &event.message_id; + let event: IVec = event.into(); + self.db.insert(msg_id, event)?; + + Ok(()) + } + + /// Remove event from database + pub fn remove_event(&self, event: &Event) -> Result<()> { + self.db.remove(event.message_id.clone())?; + + Ok(()) + } + + /// Get event by name + pub fn get_event_by_name(&self, event_name: &str) -> Option { + self.filter_events(|_, e| e.event_name.as_str() == event_name) + .pop() + } + + /// Get all events + pub fn get_all_events(&self) -> Vec { + self.filter_events(|_, _| true) + } + + /// Get event my discord msg id + pub fn get_event_by_msg_id(&self, target_msg_id: &str) -> Option { + self.filter_events(|msg_id, _| msg_id.as_str() == target_msg_id) + .pop() + } } -/// Get an event by name -pub fn get_event_by_name(database_url: String, name: String) -> Result { - use schema::events::dsl::{event_name, events}; - - let connection = establish_connection(database_url); - - events - .filter(event_name.eq(&name)) - .get_result::(&connection) -} - -/// Get event by its message id -pub fn get_event_by_msg_id(database_url: String, msg_id: String) -> Result { - use schema::events::dsl::{events, message_id}; - - let connection = establish_connection(database_url); - - events - .filter(message_id.eq(&msg_id)) - .get_result::(&connection) -} - -/// Get all events -pub fn get_all_events(database_url: String) -> Result, Error> { - use schema::events::dsl::{events}; - - let connection = establish_connection(database_url); - - events.load(&connection) -} - -/// Get event with id -pub fn get_event_by_id(database_url: String, event_id: i32) -> Result { - use schema::events::dsl::{events, id}; - - let connection = establish_connection(database_url); - - events.filter(id.eq(event_id)).first::(&connection) -} - -pub fn get_event_older_than(database_url: String, time: DateTime) -> Result, Error> { - use schema::events::dsl::{events, event_time}; - - let connection = establish_connection(database_url); - - events.filter(event_time.lt(time.naive_utc())).load(&connection) +impl TypeMapKey for Database { + type Value = Arc; } diff --git a/src/database/models.rs b/src/database/models.rs index c368b51..1523c6e 100644 --- a/src/database/models.rs +++ b/src/database/models.rs @@ -1,10 +1,9 @@ -use super::schema::events; use chrono::{NaiveDateTime, Utc}; +use serde::{Deserialize, Serialize}; +use sled::IVec; -#[derive(Queryable, Clone, Debug, Hash)] +#[derive(Debug, Clone, Deserialize, Serialize)] pub struct Event { - /// Event ID - pub id: i32, /// Event name pub event_name: String, /// Event long description @@ -19,47 +18,9 @@ pub struct Event { pub message_id: String, /// Event message thumbnail link pub thumbnail_link: String, - /// Reminder sent tracker - pub reminder_sent: i32, } -impl Into for Event { - fn into(self) -> NewEvent { - NewEvent { - event_name: self.event_name.clone(), - event_desc: self.event_desc.clone(), - organizer: self.organizer.clone(), - event_loc: self.event_loc.clone(), - event_time: self.event_time, - message_id: self.message_id.clone(), - thumbnail_link: self.message_id.clone(), - reminder_sent: self.reminder_sent, - } - } -} - -#[derive(Insertable, Clone, Debug)] -#[table_name = "events"] -pub struct NewEvent { - /// Event name - pub event_name: String, - /// Event long description - pub event_desc: String, - /// Event location - pub event_loc: String, - /// Event organizer - pub organizer: String, - /// Event datetime - pub event_time: NaiveDateTime, - /// Event discord message id - pub message_id: String, - /// Event message thumbnail link - pub thumbnail_link: String, - /// Reminder sent tracker - pub reminder_sent: i32, -} - -impl Default for NewEvent { +impl Default for Event { fn default() -> Self { Self { message_id: String::default(), @@ -69,7 +30,28 @@ impl Default for NewEvent { event_desc: String::default(), event_loc: String::default(), thumbnail_link: String::default(), - reminder_sent: i32::default(), } } } + +impl Into for &Event { + fn into(self) -> IVec { + IVec::from(serde_json::to_string(self).unwrap().as_str()) + } +} + +impl From<&IVec> for Event { + fn from(v: &IVec) -> Self { + let s = String::from_utf8(v.to_vec()).unwrap(); + + let e: Event = serde_json::from_str(s.as_str()).unwrap(); + + e + } +} + +impl From for Event { + fn from(v: IVec) -> Self { + Self::from(&v) + } +} diff --git a/src/database/schema.rs b/src/database/schema.rs deleted file mode 100644 index 6aae4d0..0000000 --- a/src/database/schema.rs +++ /dev/null @@ -1,13 +0,0 @@ -table! { - events (id) { - id -> Integer, - event_name -> Varchar, - event_desc -> Varchar, - event_loc -> Varchar, - organizer -> Varchar, - event_time -> Datetime, - message_id -> Varchar, - thumbnail_link -> Varchar, - reminder_sent -> Integer, - } -} diff --git a/src/discord/events.rs b/src/discord/events.rs index ae3c512..96a8653 100644 --- a/src/discord/events.rs +++ b/src/discord/events.rs @@ -1,8 +1,3 @@ -use super::{get_config, send_event_msg}; -use crate::database::{get_event_by_name, insert_event}; -use crate::discord::{ - delete_event, get_draft_event, schedule_event, send_draft_event, update_draft_event, -}; use chrono::offset::TimeZone; use chrono::{Datelike, NaiveDateTime, Timelike, Utc}; use chrono_tz::Tz; @@ -12,6 +7,11 @@ use serenity::prelude::Context; use serenity::utils::{content_safe, ContentSafeOptions}; use url::Url; +use crate::discord::utility::{ + delete_event, get_config, schedule_event, send_draft_event, send_event_msg, update_draft_event, +}; +use crate::discord::{get_db, get_draft_event}; + #[command] /// Posts a previewed event /// @@ -22,6 +22,7 @@ use url::Url; async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { let config = get_config(&ctx.data.read().await).await?; let draft_event = get_draft_event(&ctx.data.read().await).await?; + let db = get_db(&ctx.data.read().await).await?; let mut new_event = draft_event.event.clone(); // Check to to see if message author is the owner of the pending event @@ -34,9 +35,9 @@ async fn confirm(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { new_event.message_id = event_msg.id.0.to_string(); - let event = insert_event(config.db_url.clone(), &new_event)?; + db.insert_event(&new_event)?; - schedule_event(&ctx, &event).await; + schedule_event(&ctx, &new_event).await; } else { msg.reply(&ctx, "You do not have a pending event!".to_string()) .await?; @@ -172,17 +173,18 @@ async fn create(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { /// /// `~cancel "event name"` async fn cancel(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { - let config = get_config(&ctx.data.read().await).await?; + let db = get_db(&ctx.data.read().await).await?; // Parse args let event_name = args.single::()?.replace("\"", ""); - let event = get_event_by_name(config.db_url.clone(), event_name)?; - - delete_event(ctx, &event).await?; - - msg.reply(&ctx, format!("{} has been cancelled", event.event_name)) - .await?; - + if let Some(event) = db.get_event_by_name(&event_name) { + delete_event(ctx, &event).await?; + msg.reply(&ctx, format!("{} has been cancelled", event.event_name)) + .await?; + } else { + msg.reply(&ctx, format!("{} now found!", event_name)) + .await?; + } Ok(()) } diff --git a/src/discord/handler.rs b/src/discord/handler.rs new file mode 100644 index 0000000..10f3972 --- /dev/null +++ b/src/discord/handler.rs @@ -0,0 +1,68 @@ +use serenity::async_trait; +use serenity::model::channel::Reaction; +use serenity::model::gateway::Ready; +use serenity::prelude::{Context, EventHandler}; + +use crate::discord::utility::schedule_all_events; +use crate::discord::{tasks, utility}; +use crate::INTERESTED_EMOJI; + +/// Handler for Discord events +pub struct Handler; + +#[async_trait] +impl EventHandler for Handler { + /// On reaction add + async fn reaction_add(&self, ctx: Context, reaction: Reaction) { + let config = utility::get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + if reaction.channel_id.0 == config.event_channel + && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI + { + utility::send_message_to_reaction_users( + &ctx, + &reaction, + "Hello, you are now receiving reminders for **{event}**", + ) + .await; + } + } + + /// On reaction remove + async fn reaction_remove(&self, ctx: Context, reaction: Reaction) { + let config = utility::get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + + if reaction.channel_id.0 == config.event_channel + && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI + { + utility::send_message_to_reaction_users( + &ctx, + &reaction, + "Hello, you are no longer receiving reminders for **{event}**", + ) + .await; + } + } + + /// On bot ready + async fn ready(&self, ctx: Context, ready: Ready) { + info!("Connected to Discord as {}", ready.user.name); + + schedule_all_events(&ctx).await; + + let cleanup_ctx = ctx.clone(); + + tokio::spawn(async move { + tasks::send_reminders_task(&ctx).await; + }); + + tokio::spawn(async move { + tasks::cleanup_task(&cleanup_ctx).await; + }); + + info!("Setup complete.") + } +} diff --git a/src/discord/mod.rs b/src/discord/mod.rs index 48554e5..933a2cc 100644 --- a/src/discord/mod.rs +++ b/src/discord/mod.rs @@ -1,36 +1,29 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::HashSet; use std::sync::Arc; -use chrono::{DateTime, NaiveDateTime, Utc, Duration}; -use serenity::async_trait; use serenity::framework::standard::macros::help; use serenity::framework::standard::macros::hook; use serenity::framework::standard::{ help_commands, Args, CommandError, CommandGroup, CommandResult, HelpOptions, }; -use serenity::model::gateway::Ready; use serenity::model::id::UserId; -use serenity::model::prelude::{ChannelId, Message, Reaction, User}; -use serenity::prelude::{Context, EventHandler}; +use serenity::model::prelude::Message; +use serenity::prelude::Context; use serenity::prelude::{TypeMap, TypeMapKey}; -use serenity::utils::Colour; -use serenity::Result; -use strfmt::strfmt; use tokio::sync::RwLockReadGuard; -use percent_encoding::{AsciiSet, CONTROLS, utf8_percent_encode}; -use crate::database::models::{Event, NewEvent}; -use crate::database::{get_all_events, get_event_by_id, get_event_by_msg_id, remove_event, get_event_older_than}; -use crate::hypebot_config::HypeBotConfig; -use crate::reminder::Reminders; -use crate::{INTERESTED_EMOJI, UNINTERESTED_EMOJI}; +use crate::database::models::Event; +use crate::database::Database; pub mod events; +pub mod handler; +pub mod tasks; +pub mod utility; /// Struct for storing drafted events #[derive(Debug, Clone, Default)] pub struct DraftEvent { - pub event: NewEvent, + pub event: Event, pub creator_id: u64, } @@ -38,178 +31,6 @@ impl TypeMapKey for DraftEvent { type Value = Arc; } -/// Send a message to a reaction user -pub async fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, msg_text: &str) { - if let Ok(config) = get_config(&ctx.data.read().await).await { - let db_link = config.db_url.clone(); - let message_id = reaction.message_id.0.to_string(); - - let event = match get_event_by_msg_id(db_link, message_id) { - Ok(event) => event, - Err(e) => { - if !matches!(e, diesel::result::Error::NotFound) { - error!("Error getting event from reaction {}", e); - } - return; - } - }; - - let event_utc_time = DateTime::::from_utc(event.event_time, Utc); - let current_utc_time = chrono::offset::Utc::now(); - - let msg; - - if event_utc_time > current_utc_time { - // Format message - let mut fmt = HashMap::new(); - fmt.insert("event".to_string(), event.event_name); - msg = strfmt(msg_text, &fmt).unwrap(); - } else { - msg = format!("**{}** has already started!", &event.event_name) - } - - if let Ok(user) = reaction.user(&ctx).await { - send_dm_message(&ctx, user, &msg).await; - } - } -} - -/// Send a DM message to a user -pub async fn send_dm_message(ctx: &Context, user: User, message: &str) { - if let Ok(dm_channel) = user.create_dm_channel(ctx).await { - dm_channel - .send_message(ctx, |m| m.content(message)) - .await - .ok(); - } -} - -const FRAGMENT: &AsciiSet = &CONTROLS.add(b' ').add(b'"').add(b'<').add(b'>').add(b'`'); - -/// Create a countdown link for the event -pub fn get_countdown_link(event_name: &str, utc: &DateTime) -> String { - let msg = utf8_percent_encode(event_name, FRAGMENT); - let time = utc.format("%G%m%dT%H%M").to_string(); - - format!( - "https://www.timeanddate.com/countdown/generic?iso={}&p0=&msg={}&font=sanserif&csz=1", - time, msg - ) -} - -/// Sends the event message to the event channel -pub async fn send_event_msg( - ctx: &Context, - config: &HypeBotConfig, - channel_id: u64, - event: &NewEvent, - react: bool, -) -> Result { - let channel = ctx.http.get_channel(channel_id).await?; - - let utc_time = DateTime::::from_utc(event.event_time, Utc); - - let native_time = utc_time.with_timezone(&config.event_timezone); - - let ping_roles = config - .ping_roles - .clone() - .into_iter() - .map(|role| format!("<@&{}>", role)) - .collect::>() - .join(" "); - - // Send message - let msg = channel.id().send_message(&ctx, |m| { - m.embed(|e| { - e.title(event.event_name.clone()) - .color(Colour::PURPLE) - .description(format!( - "**{}**\n{}\n\n[Click Here For A Countdown]({})\n\nReact with {} below to receive event reminders!", - native_time.format("%A, %B %d @ %I:%M %P %t %Z"), - event.event_desc, - get_countdown_link(&event.event_name, &utc_time), - INTERESTED_EMOJI - )) - .thumbnail(event.thumbnail_link.clone()) - .footer(|f| f.text("Local Event Time")) - .timestamp(utc_time.to_rfc3339()) - .field("Location", &event.event_loc, true) - .field("Organizer", &event.organizer, true) - }).content(ping_roles) - }).await?; - - if react { - // Add reacts - msg.react(ctx, INTERESTED_EMOJI).await?; - msg.react(ctx, UNINTERESTED_EMOJI).await?; - } - - Ok(msg) -} - -/// Updates the draft event stored in the context data -#[allow(clippy::too_many_arguments)] -pub async fn update_draft_event( - ctx: &Context, - event_name: String, - event_desc: String, - organizer: String, - location: String, - thumbnail: String, - event_time: NaiveDateTime, - creator_id: u64, -) -> CommandResult { - let mut data = ctx.data.write().await; - let draft_event = data - .get_mut::() - .ok_or_else(|| CommandError::from("Unable get draft event!".to_string()))?; - - let new_draft_event = DraftEvent { - event: NewEvent { - event_name, - event_desc, - event_loc: location, - organizer, - event_time, - message_id: "".to_string(), - thumbnail_link: thumbnail, - reminder_sent: 0, - }, - creator_id, - }; - - *draft_event = Arc::new(new_draft_event); - - Ok(()) -} - -/// Sends the draft event stored in the context data -pub async fn send_draft_event(ctx: &Context, channel: ChannelId) -> CommandResult { - let data = ctx.data.read().await; - let config = get_config(&data).await?; - let draft_event = get_draft_event(&data).await?; - - channel - .send_message(&ctx, |m| { - m.content("Draft message, use the `confirm` command to post it.".to_string()) - }) - .await?; - send_event_msg(ctx, &config, channel.0, &draft_event.event, false).await?; - Ok(()) -} - -/// Gets the config from context data -pub async fn get_config( - data: &RwLockReadGuard<'_, TypeMap>, -) -> std::result::Result, CommandError> { - let config = data - .get::() - .ok_or_else(|| CommandError::from("Unable to get config".to_string()))?; - - Ok(config.clone()) -} - /// Gets the draft event from context data pub async fn get_draft_event( data: &RwLockReadGuard<'_, TypeMap>, @@ -221,6 +42,17 @@ pub async fn get_draft_event( Ok(draft_event.clone()) } +/// Gets the database from context data +pub async fn get_db( + data: &RwLockReadGuard<'_, TypeMap>, +) -> std::result::Result, CommandError> { + let db = data + .get::() + .ok_or_else(|| CommandError::from("Unable to get db".to_string()))?; + + Ok(db.clone()) +} + /// Logs command errors to the logger #[hook] pub async fn log_error( @@ -239,14 +71,15 @@ pub async fn log_error( #[hook] pub async fn permission_check(ctx: &Context, msg: &Message, _command_name: &str) -> bool { if let Some(guild_id) = msg.guild_id { - if let Ok(config) = get_config(&ctx.data.read().await).await { + if let Ok(config) = utility::get_config(&ctx.data.read().await).await { if let Ok(roles) = ctx.http.get_guild_roles(guild_id.0).await { for role in roles { if config.event_roles.contains(&role.id.0) { - return match msg.author.has_role(&ctx, guild_id, role).await { - Ok(has_role) => has_role, - Err(_) => false, - }; + return msg + .author + .has_role(&ctx, guild_id, role) + .await + .unwrap_or(false) } } } @@ -256,117 +89,6 @@ pub async fn permission_check(ctx: &Context, msg: &Message, _command_name: &str) false } -/// Schedule event reminders -pub async fn schedule_event(ctx: &Context, event: &Event) { - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - - let mut data = ctx.data.write().await; - - let reminders = data.get_mut::().unwrap(); - - reminders.add_reminders(event, &*config); -} - -/// Send reminders -pub async fn send_reminders_task(ctx: &Context) { - let duration = tokio::time::Duration::from_secs(1); - loop { - tokio::time::sleep(duration).await; - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - let event_channel_id = config.event_channel; - - let reminder_msg: Vec<&String> = match &config.reminders { - None => return, - Some(reminder_msg) => reminder_msg.iter().map(|r| &r.msg).collect(), - }; - - let mut data = ctx.data.write().await; - let reminders = data - .get_mut::() - .unwrap(); - - let current_reminders = reminders.get_reminders(); - - for reminder in current_reminders { - if let Ok(event) = get_event_by_id(config.db_url.clone(), reminder.event_id) { - let message_id = event.message_id.parse::().unwrap_or_default(); - // Get message id - if let Ok(message) = ctx.http.get_message(event_channel_id, message_id).await { - if let Ok(reaction_users) = message - .reaction_users(ctx, INTERESTED_EMOJI, None, None) - .await - { - // Build reminder message - let msg: String = reminder_msg[reminder.reminder_id] - .replace("{EVENT_NAME}", event.event_name.as_str()); - - // Send reminder to each reacted user - for user in reaction_users { - send_dm_message(ctx, user, &msg).await; - } - } - } - } - } - } -} - -/// Delete old events -pub async fn cleanup_task(ctx: &Context) { - let duration = tokio::time::Duration::from_secs(60*60); - loop { - tokio::time::sleep(duration).await; - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - let one_week_ago = Utc::now() - Duration::from_std(std::time::Duration::from_secs(60*60*24*7)).unwrap(); - - for event in get_event_older_than(config.db_url.clone(), one_week_ago).unwrap() { - delete_event(ctx, &event).await.ok(); - } - } -} - -/// Delete event -pub async fn delete_event(ctx: &Context, event: &Event) -> CommandResult { - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - - let message_id = event.message_id.parse::()?; - let message = ctx - .http - .get_message(config.event_channel, message_id) - .await?; - let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); - - // Only send a cancel message if the even has not already happened - if event.event_time > Utc::now().naive_utc() { - if let Ok(reaction_users) = message - .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) - .await - { - for user in reaction_users { - send_dm_message(ctx, user, &cancel_msg).await; - } - } - } - - remove_event(config.db_url.clone(), event.id)?; - - message.delete(ctx).await?; - - if let Some(reminders) = ctx.data.write().await.get_mut::() { - reminders.remove_reminders(&event); - } - - Ok(()) -} - #[help] #[command_not_found_text = "Could not find: `{}`."] #[strikethrough_commands_tip_in_guild("")] @@ -381,67 +103,3 @@ async fn bot_help( help_commands::with_embeds(context, msg, args, help_options, groups, owners).await; Ok(()) } - -/// Handler for Discord events -pub struct Handler; - -#[async_trait] -impl EventHandler for Handler { - /// On reaction add - async fn reaction_add(&self, ctx: Context, reaction: Reaction) { - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - if reaction.channel_id.0 == config.event_channel - && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI - { - send_message_to_reaction_users( - &ctx, - &reaction, - "Hello, you are now receiving reminders for **{event}**", - ) - .await; - } - } - - /// On reaction remove - async fn reaction_remove(&self, ctx: Context, reaction: Reaction) { - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - - if reaction.channel_id.0 == config.event_channel - && reaction.emoji.as_data().chars().next().unwrap() == INTERESTED_EMOJI - { - send_message_to_reaction_users( - &ctx, - &reaction, - "Hello, you are no longer receiving reminders for **{event}**", - ) - .await; - } - } - - /// On bot ready - async fn ready(&self, ctx: Context, ready: Ready) { - info!("Connected to Discord as {}", ready.user.name); - - // Schedule current events - let config = get_config(&ctx.data.read().await) - .await - .expect("Unable to get config"); - for event in get_all_events(config.db_url.clone()).unwrap() { - schedule_event(&ctx, &event).await; - } - - let cleanup_ctx = ctx.clone(); - - tokio::spawn(async move { - send_reminders_task(&ctx).await; - }); - - tokio::spawn(async move { - cleanup_task(&cleanup_ctx).await; - }); - } -} diff --git a/src/discord/tasks.rs b/src/discord/tasks.rs new file mode 100644 index 0000000..1b35d91 --- /dev/null +++ b/src/discord/tasks.rs @@ -0,0 +1,71 @@ +use chrono::{Duration, Utc}; +use serenity::prelude::Context; + +use crate::discord::{get_db, utility}; +use crate::reminder::Reminders; +use crate::INTERESTED_EMOJI; + +/// Send reminders +pub async fn send_reminders_task(ctx: &Context) { + let duration = tokio::time::Duration::from_secs(1); + loop { + tokio::time::sleep(duration).await; + let config = utility::get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + let event_channel_id = config.event_channel; + + let reminder_msg: Vec<&String> = match &config.reminders { + None => return, + Some(reminder_msg) => reminder_msg.iter().map(|r| &r.msg).collect(), + }; + + let db = get_db(&ctx.data.read().await) + .await + .expect("Unable to get DB"); + + let mut data = ctx.data.write().await; + let reminders = data + .get_mut::() + .expect("Unable to get reminders"); + + let current_reminders = reminders.get_reminders(); + + for reminder in current_reminders { + if let Some(event) = db.get_event_by_msg_id(&reminder.event_id) { + let message_id = event.message_id.parse::().unwrap_or_default(); + // Get message id + if let Ok(message) = ctx.http.get_message(event_channel_id, message_id).await { + if let Ok(reaction_users) = message + .reaction_users(ctx, INTERESTED_EMOJI, None, None) + .await + { + // Build reminder message + let msg: String = reminder_msg[reminder.reminder_id] + .replace("{EVENT_NAME}", event.event_name.as_str()); + + // Send reminder to each reacted user + for user in reaction_users { + utility::send_dm_message(ctx, user, &msg).await; + } + } + } + } + } + } +} + +/// Delete old events +pub async fn cleanup_task(ctx: &Context) { + let duration = tokio::time::Duration::from_secs(60 * 60); + loop { + tokio::time::sleep(duration).await; + let db = get_db(&ctx.data.read().await).await.unwrap(); + let one_week_ago = Utc::now() + - Duration::from_std(std::time::Duration::from_secs(60 * 60 * 24 * 7)).unwrap(); + + for event in db.filter_events(|_, event| event.event_time < one_week_ago.naive_utc()) { + utility::delete_event(ctx, &event).await.ok(); + } + } +} diff --git a/src/discord/utility.rs b/src/discord/utility.rs new file mode 100644 index 0000000..00c9dd2 --- /dev/null +++ b/src/discord/utility.rs @@ -0,0 +1,247 @@ +use std::collections::HashMap; +use std::sync::Arc; + +use chrono::{DateTime, NaiveDateTime, Utc}; +use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS}; +use serenity::framework::standard::{CommandError, CommandResult}; +use serenity::model::channel::{Message, Reaction}; +use serenity::model::id::ChannelId; +use serenity::model::user::User; +use serenity::prelude::{Context, TypeMap}; +use serenity::utils::Colour; +use tokio::sync::RwLockReadGuard; + +use crate::database::models::Event; +use crate::discord::{get_db, DraftEvent}; +use crate::hypebot_config::HypeBotConfig; +use crate::reminder::Reminders; +use crate::{discord, INTERESTED_EMOJI, UNINTERESTED_EMOJI}; + +/// Send a message to a reaction user +pub async fn send_message_to_reaction_users(ctx: &Context, reaction: &Reaction, msg_text: &str) { + if let Ok(db) = get_db(&ctx.data.read().await).await { + let message_id = reaction.message_id.0.to_string(); + + let event = match db.get_event_by_msg_id(&message_id) { + Some(event) => event, + None => { + return; + } + }; + + let event_utc_time = DateTime::::from_utc(event.event_time, Utc); + let current_utc_time = chrono::offset::Utc::now(); + + let msg; + + if event_utc_time > current_utc_time { + // Format message + let mut fmt = HashMap::new(); + fmt.insert("event".to_string(), event.event_name); + msg = strfmt::strfmt(msg_text, &fmt).unwrap(); + + if let Ok(user) = reaction.user(&ctx).await { + send_dm_message(&ctx, user, &msg).await; + } + } + } +} + +/// Send a DM message to a user +pub async fn send_dm_message(ctx: &Context, user: User, message: &str) { + if let Ok(dm_channel) = user.create_dm_channel(ctx).await { + dm_channel + .send_message(ctx, |m| m.content(message)) + .await + .ok(); + } +} + +pub const FRAGMENT: &AsciiSet = &CONTROLS.add(b' ').add(b'"').add(b'<').add(b'>').add(b'`'); + +/// Sends the event message to the event channel +pub async fn send_event_msg( + ctx: &Context, + config: &HypeBotConfig, + channel_id: u64, + event: &Event, + react: bool, +) -> serenity::Result { + let channel = ctx.http.get_channel(channel_id).await?; + + let utc_time = DateTime::::from_utc(event.event_time, Utc); + + let native_time = utc_time.with_timezone(&config.event_timezone); + + let ping_roles = config + .ping_roles + .clone() + .into_iter() + .map(|role| format!("<@&{}>", role)) + .collect::>() + .join(" "); + + // Send message + let msg = channel.id().send_message(&ctx, |m| { + m.embed(|e| { + e.title(event.event_name.clone()) + .color(Colour::PURPLE) + .description(format!( + "**{}**\n{}\n\n[Click Here For A Countdown]({})\n\nReact with {} below to receive event reminders!", + native_time.format("%A, %B %d @ %I:%M %P %t %Z"), + event.event_desc, + get_countdown_link(&event.event_name, &utc_time), + INTERESTED_EMOJI + )) + .thumbnail(event.thumbnail_link.clone()) + .footer(|f| f.text("Local Event Time")) + .timestamp(utc_time.to_rfc3339()) + .field("Location", &event.event_loc, true) + .field("Organizer", &event.organizer, true) + }).content(ping_roles) + }).await?; + + if react { + // Add reacts + msg.react(ctx, INTERESTED_EMOJI).await?; + msg.react(ctx, UNINTERESTED_EMOJI).await?; + } + + Ok(msg) +} + +/// Updates the draft event stored in the context data +#[allow(clippy::too_many_arguments)] +pub async fn update_draft_event( + ctx: &Context, + event_name: String, + event_desc: String, + organizer: String, + location: String, + thumbnail: String, + event_time: NaiveDateTime, + creator_id: u64, +) -> CommandResult { + let mut data = ctx.data.write().await; + let draft_event = data + .get_mut::() + .ok_or_else(|| CommandError::from("Unable get draft event!".to_string()))?; + + let new_draft_event = DraftEvent { + event: Event { + event_name, + event_desc, + event_loc: location, + organizer, + event_time, + message_id: "".to_string(), + thumbnail_link: thumbnail, + }, + creator_id, + }; + + *draft_event = Arc::new(new_draft_event); + + Ok(()) +} + +/// Sends the draft event stored in the context data +pub async fn send_draft_event(ctx: &Context, channel: ChannelId) -> CommandResult { + let data = ctx.data.read().await; + let config = get_config(&data).await?; + let draft_event = discord::get_draft_event(&data).await?; + + channel + .send_message(&ctx, |m| { + m.content("Draft message, use the `confirm` command to post it.".to_string()) + }) + .await?; + send_event_msg(ctx, &config, channel.0, &draft_event.event, false).await?; + Ok(()) +} + +/// Gets the config from context data +pub async fn get_config( + data: &RwLockReadGuard<'_, TypeMap>, +) -> std::result::Result, CommandError> { + let config = data + .get::() + .ok_or_else(|| CommandError::from("Unable to get config".to_string()))?; + + Ok(config.clone()) +} + +/// Schedule event reminders +pub async fn schedule_event(ctx: &Context, event: &Event) { + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + + let mut data = ctx.data.write().await; + + let reminders = data.get_mut::().unwrap(); + + reminders.add_reminders(event, &*config); +} + +/// Schedule all events +pub async fn schedule_all_events(ctx: &Context) { + let db = get_db(&ctx.data.read().await) + .await + .expect("Could not get database"); + + for event in db.get_all_events() { + schedule_event(&ctx, &event).await; + } +} + +/// Delete event +pub async fn delete_event(ctx: &Context, event: &Event) -> CommandResult { + let config = get_config(&ctx.data.read().await) + .await + .expect("Unable to get config"); + + let db = get_db(&ctx.data.read().await) + .await + .expect("Unable to get db"); + + let message_id = event.message_id.parse::()?; + let message = ctx + .http + .get_message(config.event_channel, message_id) + .await?; + let cancel_msg = format!("**{}** has been canceled!", event.event_name.clone()); + + // Only send a cancel message if the even has not already happened + if event.event_time > Utc::now().naive_utc() { + if let Ok(reaction_users) = message + .reaction_users(&ctx.http, INTERESTED_EMOJI, None, None) + .await + { + for user in reaction_users { + send_dm_message(ctx, user, &cancel_msg).await; + } + } + } + + db.remove_event(event)?; + + message.delete(ctx).await?; + + if let Some(reminders) = ctx.data.write().await.get_mut::() { + reminders.remove_reminders(&event); + } + + Ok(()) +} + +/// Create a countdown link for the event +pub fn get_countdown_link(event_name: &str, utc: &DateTime) -> String { + let msg = utf8_percent_encode(event_name, FRAGMENT); + let time = utc.format("%G%m%dT%H%M").to_string(); + + format!( + "https://www.timeanddate.com/countdown/generic?iso={}&p0=&msg={}&font=sanserif&csz=1", + time, msg + ) +} diff --git a/src/hypebot_config.rs b/src/hypebot_config.rs index ab4f76f..0b7989d 100644 --- a/src/hypebot_config.rs +++ b/src/hypebot_config.rs @@ -4,6 +4,7 @@ use serde::de::{self, Error, Visitor}; use serde::{Deserialize, Deserializer}; use serenity::prelude::TypeMapKey; use std::fmt; +use std::path::PathBuf; use std::sync::Arc; #[derive(Debug, Deserialize, Clone)] @@ -14,7 +15,7 @@ pub struct EventReminder { #[derive(Debug, Deserialize, Clone)] pub struct HypeBotConfig { - pub db_url: String, + pub db_location: PathBuf, pub default_thumbnail_link: String, pub discord_key: String, pub prefix: String, diff --git a/src/main.rs b/src/main.rs index a03cf0f..6551570 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,17 +1,8 @@ #[macro_use] -extern crate diesel; -#[macro_use] -extern crate diesel_migrations; -#[macro_use] extern crate log; extern crate log4rs; extern crate serde; -mod database; -mod discord; -mod hypebot_config; -mod reminder; - use std::path::Path; use std::process::exit; use std::sync::Arc; @@ -33,11 +24,17 @@ use serenity::framework::standard::StandardFramework; use database::*; use discord::events::{CANCEL_COMMAND, CONFIRM_COMMAND, CREATE_COMMAND}; +use discord::handler::Handler; use discord::BOT_HELP; -use discord::{log_error, permission_check, DraftEvent, Handler}; +use discord::{log_error, permission_check, DraftEvent}; use hypebot_config::HypeBotConfig; use reminder::Reminders; +mod database; +mod discord; +mod hypebot_config; +mod reminder; + const INTERESTED_EMOJI: char = '\u{2705}'; const UNINTERESTED_EMOJI: char = '\u{274C}'; @@ -108,7 +105,6 @@ fn setup_logging(config: &HypeBotConfig) -> HypeBotResult<()> { Ok(()) } -embed_migrations!("migrations/"); #[tokio::main] async fn main() -> HypeBotResult<()> { // Initialize arg parser @@ -140,10 +136,6 @@ async fn main() -> HypeBotResult<()> { // Setup logging setup_logging(&cfg)?; - // Run migrations - let connection = establish_connection(cfg.db_url.clone()); - embedded_migrations::run(&connection)?; - // New client let mut client = Client::builder(cfg.discord_key.clone()) .event_handler(Handler) @@ -164,10 +156,12 @@ async fn main() -> HypeBotResult<()> { // Copy config data to client data and setup scheduler { + let db = database::Database::new(&cfg.db_location)?; let mut data = client.data.write().await; data.insert::(Arc::new(cfg)); data.insert::(Arc::new(DraftEvent::default())); data.insert::(Reminders::default()); + data.insert::(Arc::new(db)); } // Start bot diff --git a/src/reminder/mod.rs b/src/reminder/mod.rs index 4555bcd..0b81061 100644 --- a/src/reminder/mod.rs +++ b/src/reminder/mod.rs @@ -4,9 +4,9 @@ use chrono::{Duration, NaiveDateTime, Utc}; use serenity::prelude::TypeMapKey; /// Event Reminder -#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] +#[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct Reminder { - pub event_id: i32, + pub event_id: String, pub time: NaiveDateTime, pub reminder_id: usize, } @@ -31,7 +31,7 @@ impl Reminders { if reminder_time > Utc::now().naive_utc() { self.reminders.push(Reminder { - event_id: event.id, + event_id: event.message_id.clone(), time: reminder_time, reminder_id, }); @@ -49,7 +49,7 @@ impl Reminders { let time_diff = r.time - Utc::now().naive_utc(); time_diff > Duration::seconds(-5) && time_diff < Duration::seconds(5) }) - .copied() + .cloned() .collect(); self.reminders.retain(|r| !reminders.contains(r)); @@ -59,7 +59,7 @@ impl Reminders { /// Removes reminders for an event pub fn remove_reminders(&mut self, event: &Event) { - self.reminders.retain(|e| e.event_id != event.id) + self.reminders.retain(|e| e.event_id != event.message_id) } /// Update reminders for an event @@ -81,7 +81,7 @@ mod tests { let r = Reminders::default(); let c = HypeBotConfig { - db_url: "".to_string(), + db_location: "".to_string(), default_thumbnail_link: "".to_string(), discord_key: "".to_string(), prefix: "".to_string(), @@ -91,14 +91,16 @@ mod tests { event_timezone: chrono_tz::UTC, log_path: "".to_string(), reminders: Some( - [EventReminder { - msg: "".to_string(), - reminder_time: 5, - }, - EventReminder { - msg: "".to_string(), - reminder_time: 1, - }] + [ + EventReminder { + msg: "".to_string(), + reminder_time: 5, + }, + EventReminder { + msg: "".to_string(), + reminder_time: 1, + }, + ] .to_vec(), ), }; @@ -132,7 +134,7 @@ mod tests { r.add_reminders(&e, &c); assert_eq!(r.get_reminders().len(), 1); - assert_eq!(r.reminders.len(), c.reminders.unwrap().len()-1); + assert_eq!(r.reminders.len(), c.reminders.unwrap().len() - 1); } #[test] From ac2573e0362938c81fe2462971b241d2285e5e3b Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Thu, 4 Mar 2021 19:10:21 -0600 Subject: [PATCH 07/10] Updated README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4bd263f..f6af75d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # HypeBot A Discord bot for managing events. Uses [Serenity](https://github.com/serenity-rs/serenity) for the bot framework -and [Diesel](http://diesel.rs/) as an ORM. +and [sled](https://github.com/spacejam/sled) for the database ## Usage Creating an event can be done using the `create` command. @@ -24,7 +24,7 @@ Users who react with ✅ will then be sent reminders about the event as private ## Config ```toml # Database URL -db_url = "mysql://[user]:[password]@localhost/hypebot_db" +db_location = "path/to/db" # Default image to show on the thumbnail default_thumbnail_link = "https://i.imgur.com/wPdnvoE.png" # Discord bot key From 7a8cbba73c0b2be73ab0d83a559c0c20df09fe72 Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Thu, 4 Mar 2021 19:20:32 -0600 Subject: [PATCH 08/10] Using latest tokio and serenity versions --- Cargo.lock | 44 +++++++++++++++++++------------------------- Cargo.toml | 4 ++-- src/main.rs | 2 +- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c643a25..7740fa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -202,9 +202,9 @@ dependencies = [ [[package]] name = "command_attr" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef54b146e4ff8a036b9d632fd48c183c9757992535e5f557275f4a01dfd9c7c7" +checksum = "d3479c246caa6e2064839ed6bb165fae9a8894bcc79d893090a091b49529b475" dependencies = [ "proc-macro2", "quote", @@ -965,12 +965,6 @@ dependencies = [ "syn", ] -[[package]] -name = "pin-project-lite" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" - [[package]] name = "pin-project-lite" version = "0.2.3" @@ -1143,7 +1137,7 @@ dependencies = [ "mime", "mime_guess", "percent-encoding", - "pin-project-lite 0.2.3", + "pin-project-lite", "rustls", "serde 1.0.106", "serde_json", @@ -1309,9 +1303,9 @@ dependencies = [ [[package]] name = "serenity" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac8367ecfd3380c00dcedf5eb9a47888ae74ae391419b5b1f7735895ed8df4" +checksum = "f86e9dc74c89931fe12f3af64ae484268c0a4864a90fb2b7d2e867a301f173c4" dependencies = [ "async-trait", "async-tungstenite", @@ -1329,7 +1323,6 @@ dependencies = [ "static_assertions", "tokio", "tracing", - "tracing-futures", "typemap_rev", "url", "uwl", @@ -1472,9 +1465,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d258221f566b6c803c7b4714abadc080172b272090cdc5e244a6d4dd13c3a6bd" +checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" dependencies = [ "autocfg", "bytes 1.0.0", @@ -1482,15 +1475,15 @@ dependencies = [ "memchr", "mio", "num_cpus", - "pin-project-lite 0.2.3", + "pin-project-lite", "tokio-macros", ] [[package]] name = "tokio-macros" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" +checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" dependencies = [ "proc-macro2", "quote", @@ -1515,7 +1508,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4cdeb73537e63f98adcd73138af75e3f368ccaecffaa29d7eb61b9f5a440457" dependencies = [ "futures-core", - "pin-project-lite 0.2.3", + "pin-project-lite", "tokio", ] @@ -1529,7 +1522,7 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.3", + "pin-project-lite", "tokio", "tokio-stream", ] @@ -1551,21 +1544,22 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" -version = "0.1.21" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" +checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ - "cfg-if 0.1.10", - "pin-project-lite 0.1.4", + "cfg-if 1.0.0", + "log", + "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" +checksum = "a8a9bd1db7706f2373a190b0d067146caa39350c486f3d455b0e33b431f94c07" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 04615cf..bcdb84f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,10 +18,10 @@ log = "0.4.8" log4rs = "0.11.0" strfmt = "0.1.6" url = "2.1.1" -tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.2", features = ["macros", "rt-multi-thread"] } percent-encoding = "2.1.0" sled = "0.34.6" [dependencies.serenity] -version = "0.10.2" +version = "0.10.4" features = ["framework", "standard_framework", "utils", "builder"] diff --git a/src/main.rs b/src/main.rs index 6551570..7192ca3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,7 +71,7 @@ fn setup_logging(config: &HypeBotConfig) -> HypeBotResult<()> { let config = Config::builder() .appender( Appender::builder() - .filter(Box::new(ThresholdFilter::new(LevelFilter::Info))) + .filter(Box::new(ThresholdFilter::new(LevelFilter::Warn))) .build( "logfile", Box::new( From f069db1316122f67ee5557353a2f3d6ce10da95a Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Thu, 4 Mar 2021 20:24:39 -0600 Subject: [PATCH 09/10] Added .drone.yml --- .drone.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..b9834de --- /dev/null +++ b/.drone.yml @@ -0,0 +1,39 @@ +--- +kind: pipeline +name: compliance +type: docker +trigger: + event: + - pull_request +steps: + - name: build + pull: always + image: rust:1.52.0 + commands: + - rustup component add clippy + - cargo build --verbose + - cargo clippy +--- +kind: pipeline +name: release +type: docker +trigger: + branch: + - master + event: + - push +steps: + - name: build + pull: always + image: rust:1.52.0 + commands: + - cargo build --verbose --release + - name: gitea-release + pull: always + image: jolheiser/drone-gitea-main:latest + settings: + token: + from_secret: gitea_token + base: https://git.etztech.xyz + files: + - "target/release/hype_bot" \ No newline at end of file From 6866602bca96492b57c5658d0b66ff8c45edaded Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Thu, 4 Mar 2021 20:27:04 -0600 Subject: [PATCH 10/10] No Rust 1.52 on docker yet --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b9834de..bfda377 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,7 @@ trigger: steps: - name: build pull: always - image: rust:1.52.0 + image: rust:1.50 commands: - rustup component add clippy - cargo build --verbose @@ -25,7 +25,7 @@ trigger: steps: - name: build pull: always - image: rust:1.52.0 + image: rust:1.50 commands: - cargo build --verbose --release - name: gitea-release