diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..183a347 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1 @@ +fn_args_layout = "Compressed" \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index db6c590..58a6a37 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,27 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" +[[package]] +name = "async-stream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3670df70cbc01729f901f94c887814b3c68db038aad1329a418bae178bc5295c" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3548b8efc9f8e8a5a0a2808c5bd8451a9031b9e5b879a79590304ae928b0a70" +dependencies = [ + "proc-macro2", + "quote 1.0.3", + "syn 1.0.59", +] + [[package]] name = "async-trait" version = "0.1.41" @@ -29,23 +50,23 @@ checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] name = "async-tungstenite" -version = "0.9.3" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce503a5cb1e7450af7d211b86b84807791b251f335b2f43f1e26b85a416f315" +checksum = "f7cc5408453d37e2b1c6f01d8078af1da58b6cfa6a80fa2ede3bd2b9a6ada9c4" dependencies = [ "futures-io", "futures-util", "log 0.4.8", "pin-project 1.0.1", - "tokio", + "tokio 1.1.0", "tokio-rustls", "tungstenite", - "webpki-roots", + "webpki-roots 0.20.0", ] [[package]] @@ -56,7 +77,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -135,6 +156,12 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +[[package]] +name = "bytes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" + [[package]] name = "cc" version = "1.0.50" @@ -147,6 +174,12 @@ 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" @@ -155,7 +188,7 @@ checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" dependencies = [ "num-integer", "num-traits 0.2.11", - "serde 1.0.117", + "serde 1.0.120", "time", ] @@ -167,28 +200,18 @@ checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" dependencies = [ "atty", "lazy_static 1.4.0", - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] name = "command_attr" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc8da29004a4dd9b89d21b2e17ccd372c1ff085bdab9e22b989096db1289d01" +checksum = "ef54b146e4ff8a036b9d632fd48c183c9757992535e5f557275f4a01dfd9c7c7" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" -dependencies = [ - "cfg-if", - "wasm-bindgen", + "syn 1.0.59", ] [[package]] @@ -238,7 +261,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -268,7 +291,7 @@ version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -277,7 +300,7 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "crc32fast", "libc", "miniz_oxide", @@ -381,7 +404,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] @@ -435,9 +458,20 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.1+wasi-snapshot-preview1", ] [[package]] @@ -446,7 +480,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7938e6aa2a31df4e21f224dc84704bd31c089a6d1355c535b03667371cccc843" dependencies = [ - "bytes", + "bytes 0.5.4", "fnv", "futures-core", "futures-sink", @@ -455,8 +489,28 @@ dependencies = [ "indexmap", "log 0.4.8", "slab", - "tokio", - "tokio-util", + "tokio 0.2.23", + "tokio-util 0.2.0", +] + +[[package]] +name = "h2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" +dependencies = [ + "bytes 1.0.1", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 1.1.0", + "tokio-util 0.6.2", + "tracing", + "tracing-futures", ] [[package]] @@ -474,7 +528,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ - "bytes", + "bytes 0.5.4", "fnv", "itoa 0.4.5", ] @@ -485,7 +539,17 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ - "bytes", + "bytes 0.5.4", + "http", +] + +[[package]] +name = "http-body" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" +dependencies = [ + "bytes 1.0.1", "http", ] @@ -495,6 +559,12 @@ 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 = "hyper" version = "0.10.16" @@ -520,24 +590,48 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed6081100e960d9d74734659ffc9cc91daf1c0fc7aceb8eaa94ee1a3f5046f2e" dependencies = [ - "bytes", + "bytes 0.5.4", "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.2.3", "http", - "http-body", + "http-body 0.3.1", "httparse", "itoa 0.4.5", "log 0.4.8", "net2", "pin-project 0.4.8", "time", - "tokio", + "tokio 0.2.23", "tower-service", "want", ] +[[package]] +name = "hyper" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" +dependencies = [ + "bytes 1.0.1", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.0", + "http", + "http-body 0.4.0", + "httparse", + "httpdate", + "itoa 0.4.5", + "pin-project 1.0.1", + "socket2", + "tokio 1.1.0", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper-native-tls" version = "0.2.4" @@ -551,16 +645,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes", "futures-util", - "hyper 0.13.4", + "hyper 0.14.2", "log 0.4.8", "rustls", - "tokio", + "tokio 1.1.0", "tokio-rustls", "webpki", ] @@ -571,10 +664,10 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" dependencies = [ - "bytes", + "bytes 0.5.4", "hyper 0.13.4", "native-tls 0.2.4", - "tokio", + "tokio 0.2.23", "tokio-tls", ] @@ -615,7 +708,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" dependencies = [ - "bytes", + "bytes 0.5.4", ] [[package]] @@ -712,7 +805,7 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -767,19 +860,32 @@ version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "fuchsia-zircon", "fuchsia-zircon-sys", "iovec", "kernel32-sys", "libc", "log 0.4.8", - "miow", + "miow 0.2.1", "net2", "slab", "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" +dependencies = [ + "libc", + "log 0.4.8", + "miow 0.3.6", + "ntapi", + "winapi 0.3.9", +] + [[package]] name = "miow" version = "0.2.1" @@ -792,6 +898,16 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "miow" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +dependencies = [ + "socket2", + "winapi 0.3.9", +] + [[package]] name = "native-tls" version = "0.1.5" @@ -831,9 +947,18 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", - "winapi 0.3.8", + "winapi 0.3.9", +] + +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", ] [[package]] @@ -905,7 +1030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" dependencies = [ "bitflags 1.2.1", - "cfg-if", + "cfg-if 0.1.10", "foreign-types", "lazy_static 1.4.0", "libc", @@ -979,7 +1104,7 @@ checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] @@ -990,7 +1115,7 @@ checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] @@ -1019,9 +1144,9 @@ checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" [[package]] name = "ppv-lite86" -version = "0.2.6" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro-hack" @@ -1069,7 +1194,7 @@ dependencies = [ "libc", "rand_core 0.3.1", "rdrand", - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -1078,11 +1203,23 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.14", "libc", - "rand_chacha", + "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" +dependencies = [ + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.1", + "rand_hc 0.3.0", ] [[package]] @@ -1095,6 +1232,16 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.1", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -1116,7 +1263,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.14", +] + +[[package]] +name = "rand_core" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" +dependencies = [ + "getrandom 0.2.2", ] [[package]] @@ -1128,6 +1284,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core 0.6.1", +] + [[package]] name = "rdrand" version = "0.4.0" @@ -1145,9 +1310,9 @@ checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] name = "regex" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" +checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" dependencies = [ "aho-corasick", "memchr", @@ -1157,9 +1322,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] name = "remove_dir_all" @@ -1167,7 +1332,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -1187,19 +1352,18 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.9" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" +checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" dependencies = [ "base64 0.13.0", - "bytes", + "bytes 0.5.4", "encoding_rs", "futures-core", "futures-util", "http", - "http-body", + "http-body 0.3.1", "hyper 0.13.4", - "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -1210,19 +1374,52 @@ dependencies = [ "native-tls 0.2.4", "percent-encoding 2.1.0", "pin-project-lite 0.2.0", - "rustls", - "serde 1.0.117", + "serde 1.0.120", "serde_json 1.0.48", "serde_urlencoded 0.7.0", - "tokio", - "tokio-rustls", + "tokio 0.2.23", "tokio-tls", "url 2.2.0", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-bindgen-test", "web-sys", - "webpki-roots", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" +dependencies = [ + "base64 0.13.0", + "bytes 1.0.1", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body 0.4.0", + "hyper 0.14.2", + "hyper-rustls", + "ipnet", + "js-sys", + "lazy_static 1.4.0", + "log 0.4.8", + "mime 0.3.16", + "mime_guess", + "percent-encoding 2.1.0", + "pin-project-lite 0.2.0", + "rustls", + "serde 1.0.120", + "serde_json 1.0.48", + "serde_urlencoded 0.7.0", + "tokio 1.1.0", + "tokio-rustls", + "url 2.2.0", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.21.0", "winreg", ] @@ -1238,7 +1435,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -1250,24 +1447,24 @@ dependencies = [ "lazy_static 1.4.0", "owoify", "percent-encoding 2.1.0", - "rand 0.7.3", + "rand 0.8.2", "regex", - "reqwest 0.10.9", - "serde 1.0.117", + "reqwest 0.10.10", + "serde 1.0.120", "serenity", "sys-info", - "tokio", + "tokio 1.1.0", "toml", "urbandict", ] [[package]] name = "rustls" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" dependencies = [ - "base64 0.12.3", + "base64 0.13.0", "log 0.4.8", "ring", "sct", @@ -1293,15 +1490,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "039c25b130bd8c1321ee2d7de7fde2659fa9c2744e4bb29711cfc852ea53cd19" dependencies = [ "lazy_static 1.4.0", - "winapi 0.3.8", + "winapi 0.3.9", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "sct" version = "0.6.0" @@ -1364,11 +1555,11 @@ checksum = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af" [[package]] name = "serde" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab" dependencies = [ - "serde_derive 1.0.117", + "serde_derive 1.0.120", ] [[package]] @@ -1393,13 +1584,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] @@ -1422,7 +1613,7 @@ checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" dependencies = [ "itoa 0.4.5", "ryu", - "serde 1.0.117", + "serde 1.0.120", ] [[package]] @@ -1446,29 +1637,30 @@ dependencies = [ "form_urlencoded", "itoa 0.4.5", "ryu", - "serde 1.0.117", + "serde 1.0.120", ] [[package]] name = "serenity" -version = "0.9.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbd2938b8859261d418ba8325a795000e37e9cba1b19d4e978775c5e34dc997" +checksum = "4dac8367ecfd3380c00dcedf5eb9a47888ae74ae391419b5b1f7735895ed8df4" dependencies = [ "async-trait", "async-tungstenite", "base64 0.13.0", "bitflags 1.2.1", - "bytes", + "bytes 1.0.1", "chrono", "command_attr", "flate2", "futures", - "reqwest 0.10.9", - "serde 1.0.117", + "percent-encoding 2.1.0", + "reqwest 0.11.0", + "serde 1.0.120", "serde_json 1.0.48", "static_assertions", - "tokio", + "tokio 1.1.0", "tracing", "tracing-futures", "typemap_rev", @@ -1483,7 +1675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770" dependencies = [ "block-buffer", - "cfg-if", + "cfg-if 0.1.10", "cpuid-bool", "digest", "opaque-debug", @@ -1501,6 +1693,17 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" +[[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", + "libc", + "winapi 0.3.9", +] + [[package]] name = "spin" version = "0.5.2" @@ -1526,9 +1729,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.48" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" +checksum = "07cb8b1b4ebf86a89ee88cbd201b022b94138c623644d035185c84d3f41b7e66" dependencies = [ "proc-macro2", "quote 1.0.3", @@ -1570,12 +1773,12 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "rand 0.7.3", "redox_syscall", "remove_dir_all", - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -1595,7 +1798,7 @@ checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" dependencies = [ "libc", "redox_syscall", - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] @@ -1604,39 +1807,64 @@ version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" dependencies = [ - "bytes", + "bytes 0.5.4", "fnv", "iovec", "lazy_static 1.4.0", "memchr", - "mio", + "mio 0.6.21", "num_cpus", "pin-project-lite 0.1.4", "slab", +] + +[[package]] +name = "tokio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8efab2086f17abcddb8f756117665c958feee6b2e39974c2f1600592ab3a4195" +dependencies = [ + "autocfg", + "bytes 1.0.1", + "libc", + "memchr", + "mio 0.7.7", + "num_cpus", + "pin-project-lite 0.2.0", "tokio-macros", ] [[package]] name = "tokio-macros" -version = "0.2.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" +checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] name = "tokio-rustls" -version = "0.14.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio 1.1.0", + "webpki", +] + +[[package]] +name = "tokio-stream" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76066865172052eb8796c686f0b441a93df8b08d40a950b062ffb9a426f00edd" dependencies = [ "futures-core", - "rustls", - "tokio", - "webpki", + "pin-project-lite 0.2.0", + "tokio 1.1.0", ] [[package]] @@ -1646,7 +1874,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" dependencies = [ "native-tls 0.2.4", - "tokio", + "tokio 0.2.23", ] [[package]] @@ -1655,21 +1883,37 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" dependencies = [ - "bytes", + "bytes 0.5.4", "futures-core", "futures-sink", "log 0.4.8", "pin-project-lite 0.1.4", - "tokio", + "tokio 0.2.23", +] + +[[package]] +name = "tokio-util" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb971a26599ffd28066d387f109746df178eff14d5ea1e235015c5601967a4b" +dependencies = [ + "async-stream", + "bytes 1.0.1", + "futures-core", + "futures-sink", + "log 0.4.8", + "pin-project-lite 0.2.0", + "tokio 1.1.0", + "tokio-stream", ] [[package]] name = "toml" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "serde 1.0.117", + "serde 1.0.120", ] [[package]] @@ -1684,7 +1928,7 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "pin-project-lite 0.1.4", "tracing-attributes", "tracing-core", @@ -1698,7 +1942,7 @@ checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", ] [[package]] @@ -1740,7 +1984,7 @@ checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" dependencies = [ "base64 0.12.3", "byteorder", - "bytes", + "bytes 0.5.4", "http", "httparse", "input_buffer", @@ -1904,14 +2148,20 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.10.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9" + [[package]] name = "wasm-bindgen" version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" dependencies = [ - "cfg-if", - "serde 1.0.117", + "cfg-if 0.1.10", + "serde 1.0.120", "serde_json 1.0.48", "wasm-bindgen-macro", ] @@ -1927,7 +2177,7 @@ dependencies = [ "log 0.4.8", "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", "wasm-bindgen-shared", ] @@ -1937,7 +2187,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "js-sys", "wasm-bindgen", "web-sys", @@ -1961,7 +2211,7 @@ checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" dependencies = [ "proc-macro2", "quote 1.0.3", - "syn 1.0.48", + "syn 1.0.59", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1972,30 +2222,6 @@ version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" -[[package]] -name = "wasm-bindgen-test" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d1cdc8b98a557f24733d50a1199c4b0635e465eecba9c45b214544da197f64" -dependencies = [ - "console_error_panic_hook", - "js-sys", - "scoped-tls", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", -] - -[[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fb9c67be7439ee8ab1b7db502a49c05e51e2835b66796c705134d9b8e1a585" -dependencies = [ - "proc-macro2", - "quote 1.0.3", -] - [[package]] name = "web-sys" version = "0.3.37" @@ -2025,6 +2251,15 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" +dependencies = [ + "webpki", +] + [[package]] name = "winapi" version = "0.2.8" @@ -2033,9 +2268,9 @@ checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", @@ -2065,7 +2300,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.9", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d01eb68..be5d23d 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,9 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serenity = "0.9.1" -rand = "0.7.3" -toml = "0.5.7" +serenity = "0.10.2" +rand = "0.8.2" +toml = "0.5.8" sys-info = "0.7.0" urbandict = "0.2.0" owoify = "0.1.5" @@ -17,20 +17,20 @@ lazy_static = "1.4.0" colored = "2.0.0" brainfrick = "1.1.2" percent-encoding = "2.1.0" -regex = "1.4.2" +regex = "1.4.3" [patch.crates-io] openssl = { git = "https://github.com/ishitatsuyuki/rust-openssl", branch = "0.9.x" } [dependencies.serde] -version = "1.0.117" +version = "1.0.118" features = ["derive"] [dependencies.reqwest] -version = "0.10.9" +version = "0.10.10" features = ["blocking", "json"] [dependencies.tokio] -version = "0.2.23" -features = ["macros"] \ No newline at end of file +version = "1.1.0" +features = ["macros", "rt-multi-thread"] \ No newline at end of file diff --git a/src/commands/ship.rs b/src/commands/ship.rs index 6abdba9..1514bdf 100644 --- a/src/commands/ship.rs +++ b/src/commands/ship.rs @@ -13,7 +13,7 @@ async fn ship(ctx: &Context, message: &Message, args: Args) -> CommandResult { // Get input names let names: String = args.rest().trim().to_string(); // Calculate compatibility based on hash - let compat: u64 = StdRng::seed_from_u64(calculate_hash(&names)).gen_range(50, 100); + let compat: u64 = StdRng::seed_from_u64(calculate_hash(&names)).gen_range(50..100); // Initialize a bar to display compatibility percentage let mut compbar = String::from("----------"); diff --git a/src/main.rs b/src/main.rs index 3d34381..7f59693 100755 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,7 @@ use serenity::{ }, framework::standard::{ macros::{check, command, group, hook}, - Args, CheckResult, CommandOptions, CommandResult, DispatchError, Reason, StandardFramework, + Args, CommandOptions, CommandResult, DispatchError, Reason, StandardFramework, }, model::{ channel::{Message, ReactionType}, @@ -170,18 +170,25 @@ async fn main() { #[check] #[name = "Owner"] -async fn owner_check(_: &Context, msg: &Message, _: &mut Args, _: &CommandOptions) -> CheckResult { +async fn owner_check( + _: &Context, msg: &Message, _: &mut Args, _: &CommandOptions, +) -> Result<(), Reason> { if OWNERS.clone().contains(&msg.author.id) { - CheckResult::Success + Ok(()) } else { - CheckResult::Failure(Reason::Unknown) + Err(Reason::Unknown) } } #[check] #[name = "Server"] -async fn server_check(_: &Context, msg: &Message, _: &mut Args, _: &CommandOptions) -> CheckResult { - (msg.guild_id == Some(serenity::model::id::GuildId(687011389294116875))).into() +async fn server_check( + _: &Context, msg: &Message, _: &mut Args, _: &CommandOptions, +) -> Result<(), Reason> { + match msg.guild_id == Some(serenity::model::id::GuildId(687011389294116875)) { + true => Ok(()), + false => Err(Reason::Unknown), + } } #[command] @@ -191,7 +198,7 @@ async fn init(ctx: &Context, message: &Message) -> CommandResult { "Nyaa~!", "Hewwo uwu", ]; - let num = rand::thread_rng().gen_range(0, responses.len()); + let num = rand::thread_rng().gen_range(0..responses.len()); let _ = message.channel_id.say(&ctx.http, responses[num]).await; Ok(()) @@ -354,7 +361,7 @@ async fn bottom_rng(ctx: &Context, message: &Message, mut args: Args) -> Command for msg in messages { input += &format!("{} ", msg.content); } - let result: u64 = StdRng::seed_from_u64(calculate_hash(&input)).gen_range(0, 100); + let result: u64 = StdRng::seed_from_u64(calculate_hash(&input)).gen_range(0..100); let _ = message .channel_id .send_message(&ctx.http, |m| { @@ -419,7 +426,7 @@ async fn uwu(ctx: &Context, message: &Message) -> CommandResult { "https://preview.redd.it/fcfrmarhj9s41.jpg?width=640&crop=smart&auto=webp&s=5a4ff9a471dca7cad61b8e56bc65876ef083304a", "https://i.redd.it/ifwsmbme48q41.jpg" ]; - let num = rand::thread_rng().gen_range(0, images.len()); + let num = rand::thread_rng().gen_range(0..images.len()); let _ = message .channel_id .send_message(&ctx.http, |m| {