Add spoiler command, update dependencies

This commit is contained in:
Agatha Lovelace 2021-07-01 02:15:02 +03:00
parent 9563b32eb9
commit b53de9dbdb
6 changed files with 219 additions and 375 deletions

502
Cargo.lock generated
View File

@ -8,9 +8,9 @@ checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2"
[[package]]
name = "aho-corasick"
version = "0.7.10"
version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
dependencies = [
"memchr",
]
@ -39,7 +39,7 @@ checksum = "a3548b8efc9f8e8a5a0a2808c5bd8451a9031b9e5b879a79590304ae928b0a70"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
@ -50,7 +50,7 @@ checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
@ -63,7 +63,7 @@ dependencies = [
"futures-util",
"log 0.4.8",
"pin-project 1.0.1",
"tokio 1.1.0",
"tokio",
"tokio-rustls",
"tungstenite",
"webpki-roots 0.20.0",
@ -77,7 +77,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -188,7 +188,7 @@ checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2"
dependencies = [
"num-integer",
"num-traits 0.2.11",
"serde 1.0.120",
"serde 1.0.126",
"time",
]
@ -200,18 +200,18 @@ checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd"
dependencies = [
"atty",
"lazy_static 1.4.0",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "command_attr"
version = "0.3.3"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef54b146e4ff8a036b9d632fd48c183c9757992535e5f557275f4a01dfd9c7c7"
checksum = "8a6c3666f685cb1efc0628b8c984dbad9c372d080450736c7732089c385ed81d"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
@ -226,11 +226,11 @@ dependencies = [
[[package]]
name = "core-foundation"
version = "0.7.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
dependencies = [
"core-foundation-sys 0.7.0",
"core-foundation-sys 0.8.2",
"libc",
]
@ -245,9 +245,9 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
version = "0.7.0"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b"
[[package]]
name = "cpuid-bool"
@ -343,22 +343,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
dependencies = [
"bitflags 1.2.1",
"fuchsia-zircon-sys",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
name = "futures"
version = "0.3.5"
@ -404,7 +388,7 @@ dependencies = [
"proc-macro-hack",
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
@ -474,25 +458,6 @@ dependencies = [
"wasi 0.10.1+wasi-snapshot-preview1",
]
[[package]]
name = "h2"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7938e6aa2a31df4e21f224dc84704bd31c089a6d1355c535b03667371cccc843"
dependencies = [
"bytes 0.5.4",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"log 0.4.8",
"slab",
"tokio 0.2.23",
"tokio-util 0.2.0",
]
[[package]]
name = "h2"
version = "0.3.0"
@ -507,8 +472,8 @@ dependencies = [
"http",
"indexmap",
"slab",
"tokio 1.1.0",
"tokio-util 0.6.2",
"tokio",
"tokio-util",
"tracing",
"tracing-futures",
]
@ -533,16 +498,6 @@ dependencies = [
"itoa 0.4.5",
]
[[package]]
name = "http-body"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
"bytes 0.5.4",
"http",
]
[[package]]
name = "http-body"
version = "0.4.0"
@ -584,30 +539,6 @@ dependencies = [
"url 1.7.2",
]
[[package]]
name = "hyper"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed6081100e960d9d74734659ffc9cc91daf1c0fc7aceb8eaa94ee1a3f5046f2e"
dependencies = [
"bytes 0.5.4",
"futures-channel",
"futures-core",
"futures-util",
"h2 0.2.3",
"http",
"http-body 0.3.1",
"httparse",
"itoa 0.4.5",
"log 0.4.8",
"net2",
"pin-project 0.4.8",
"time",
"tokio 0.2.23",
"tower-service",
"want",
]
[[package]]
name = "hyper"
version = "0.14.2"
@ -618,15 +549,15 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2 0.3.0",
"h2",
"http",
"http-body 0.4.0",
"http-body",
"httparse",
"httpdate",
"itoa 0.4.5",
"pin-project 1.0.1",
"socket2",
"tokio 1.1.0",
"tokio",
"tower-service",
"tracing",
"want",
@ -653,22 +584,22 @@ dependencies = [
"hyper 0.14.2",
"log 0.4.8",
"rustls",
"tokio 1.1.0",
"tokio",
"tokio-rustls",
"webpki",
]
[[package]]
name = "hyper-tls"
version = "0.4.1"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
"bytes 0.5.4",
"hyper 0.13.4",
"native-tls 0.2.4",
"tokio 0.2.23",
"tokio-tls",
"bytes 1.0.1",
"hyper 0.14.2",
"native-tls 0.2.7",
"tokio",
"tokio-native-tls",
]
[[package]]
@ -711,15 +642,6 @@ dependencies = [
"bytes 0.5.4",
]
[[package]]
name = "iovec"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
dependencies = [
"libc",
]
[[package]]
name = "ipnet"
version = "2.3.0"
@ -756,16 +678,6 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
dependencies = [
"winapi 0.2.8",
"winapi-build",
]
[[package]]
name = "language-tags"
version = "0.2.2"
@ -786,9 +698,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.76"
version = "0.2.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3"
checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
[[package]]
name = "log"
@ -816,9 +728,9 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]]
name = "memchr"
version = "2.3.3"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
[[package]]
name = "mime"
@ -854,25 +766,6 @@ dependencies = [
"adler32",
]
[[package]]
name = "mio"
version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
dependencies = [
"cfg-if 0.1.10",
"fuchsia-zircon",
"fuchsia-zircon-sys",
"iovec",
"kernel32-sys",
"libc",
"log 0.4.8",
"miow 0.2.1",
"net2",
"slab",
"winapi 0.2.8",
]
[[package]]
name = "mio"
version = "0.7.7"
@ -881,21 +774,9 @@ checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7"
dependencies = [
"libc",
"log 0.4.8",
"miow 0.3.6",
"miow",
"ntapi",
"winapi 0.3.9",
]
[[package]]
name = "miow"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
dependencies = [
"kernel32-sys",
"net2",
"winapi 0.2.8",
"ws2_32-sys",
"winapi",
]
[[package]]
@ -905,7 +786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897"
dependencies = [
"socket2",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -925,9 +806,9 @@ dependencies = [
[[package]]
name = "native-tls"
version = "0.2.4"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d"
checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4"
dependencies = [
"lazy_static 1.4.0",
"libc",
@ -936,29 +817,18 @@ dependencies = [
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework 0.4.1",
"security-framework-sys 0.4.1",
"security-framework 2.3.1",
"security-framework-sys 2.3.0",
"tempfile",
]
[[package]]
name = "net2"
version = "0.2.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
dependencies = [
"cfg-if 0.1.10",
"libc",
"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",
"winapi",
]
[[package]]
@ -1104,7 +974,7 @@ checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
@ -1115,15 +985,9 @@ checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[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.0"
@ -1162,9 +1026,9 @@ checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694"
[[package]]
name = "proc-macro2"
version = "1.0.24"
version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
dependencies = [
"unicode-xid 0.2.0",
]
@ -1194,7 +1058,7 @@ dependencies = [
"libc",
"rand_core 0.3.1",
"rdrand",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1212,9 +1076,9 @@ dependencies = [
[[package]]
name = "rand"
version = "0.8.2"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e"
checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
dependencies = [
"libc",
"rand_chacha 0.3.0",
@ -1310,21 +1174,20 @@ checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
[[package]]
name = "regex"
version = "1.4.3"
version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a"
checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
"thread_local",
]
[[package]]
name = "regex-syntax"
version = "0.6.22"
version = "0.6.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
[[package]]
name = "remove_dir_all"
@ -1332,7 +1195,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1352,45 +1215,9 @@ dependencies = [
[[package]]
name = "reqwest"
version = "0.10.10"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c"
dependencies = [
"base64 0.13.0",
"bytes 0.5.4",
"encoding_rs",
"futures-core",
"futures-util",
"http",
"http-body 0.3.1",
"hyper 0.13.4",
"hyper-tls",
"ipnet",
"js-sys",
"lazy_static 1.4.0",
"log 0.4.8",
"mime 0.3.16",
"mime_guess",
"native-tls 0.2.4",
"percent-encoding 2.1.0",
"pin-project-lite 0.2.0",
"serde 1.0.120",
"serde_json 1.0.48",
"serde_urlencoded 0.7.0",
"tokio 0.2.23",
"tokio-tls",
"url 2.2.0",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"winreg",
]
[[package]]
name = "reqwest"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de"
checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22"
dependencies = [
"base64 0.13.0",
"bytes 1.0.1",
@ -1398,22 +1225,25 @@ dependencies = [
"futures-core",
"futures-util",
"http",
"http-body 0.4.0",
"http-body",
"hyper 0.14.2",
"hyper-rustls",
"hyper-tls",
"ipnet",
"js-sys",
"lazy_static 1.4.0",
"log 0.4.8",
"mime 0.3.16",
"mime_guess",
"native-tls 0.2.7",
"percent-encoding 2.1.0",
"pin-project-lite 0.2.0",
"pin-project-lite",
"rustls",
"serde 1.0.120",
"serde 1.0.126",
"serde_json 1.0.48",
"serde_urlencoded 0.7.0",
"tokio 1.1.0",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"url 2.2.0",
"wasm-bindgen",
@ -1435,7 +1265,7 @@ dependencies = [
"spin",
"untrusted",
"web-sys",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1447,13 +1277,13 @@ dependencies = [
"lazy_static 1.4.0",
"owoify",
"percent-encoding 2.1.0",
"rand 0.8.2",
"rand 0.8.4",
"regex",
"reqwest 0.10.10",
"serde 1.0.120",
"reqwest 0.11.4",
"serde 1.0.126",
"serenity",
"sys-info",
"tokio 1.1.0",
"tokio",
"toml",
"urbandict",
]
@ -1490,7 +1320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "039c25b130bd8c1321ee2d7de7fde2659fa9c2744e4bb29711cfc852ea53cd19"
dependencies = [
"lazy_static 1.4.0",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1517,14 +1347,15 @@ dependencies = [
[[package]]
name = "security-framework"
version = "0.4.1"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97bbedbe81904398b6ebb054b3e912f99d55807125790f3198ac990d98def5b0"
checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467"
dependencies = [
"bitflags 1.2.1",
"core-foundation 0.7.0",
"core-foundation-sys 0.7.0",
"security-framework-sys 0.4.1",
"core-foundation 0.9.1",
"core-foundation-sys 0.8.2",
"libc",
"security-framework-sys 2.3.0",
]
[[package]]
@ -1539,11 +1370,11 @@ dependencies = [
[[package]]
name = "security-framework-sys"
version = "0.4.1"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06fd2f23e31ef68dd2328cc383bd493142e46107a3a0e24f7d734e3f3b80fe4c"
checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284"
dependencies = [
"core-foundation-sys 0.7.0",
"core-foundation-sys 0.8.2",
"libc",
]
@ -1555,11 +1386,11 @@ checksum = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af"
[[package]]
name = "serde"
version = "1.0.120"
version = "1.0.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab"
checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
dependencies = [
"serde_derive 1.0.120",
"serde_derive 1.0.126",
]
[[package]]
@ -1584,13 +1415,13 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.120"
version = "1.0.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775"
checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
@ -1613,7 +1444,7 @@ checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
dependencies = [
"itoa 0.4.5",
"ryu",
"serde 1.0.120",
"serde 1.0.126",
]
[[package]]
@ -1637,14 +1468,14 @@ dependencies = [
"form_urlencoded",
"itoa 0.4.5",
"ryu",
"serde 1.0.120",
"serde 1.0.126",
]
[[package]]
name = "serenity"
version = "0.10.2"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dac8367ecfd3380c00dcedf5eb9a47888ae74ae391419b5b1f7735895ed8df4"
checksum = "b68c1f5dbe25b32516f3f104726a9e8e3a96cf5960a106213241738ffe108f81"
dependencies = [
"async-trait",
"async-tungstenite",
@ -1656,13 +1487,12 @@ dependencies = [
"flate2",
"futures",
"percent-encoding 2.1.0",
"reqwest 0.11.0",
"serde 1.0.120",
"reqwest 0.11.4",
"serde 1.0.126",
"serde_json 1.0.48",
"static_assertions",
"tokio 1.1.0",
"tokio",
"tracing",
"tracing-futures",
"typemap_rev",
"url 2.2.0",
"uwl",
@ -1701,7 +1531,7 @@ checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
"cfg-if 1.0.0",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1729,9 +1559,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.59"
version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07cb8b1b4ebf86a89ee88cbd201b022b94138c623644d035185c84d3f41b7e66"
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
dependencies = [
"proc-macro2",
"quote 1.0.3",
@ -1749,9 +1579,9 @@ dependencies = [
[[package]]
name = "sys-info"
version = "0.7.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5cfbd84f86389198ade41b439f72a5b1b3a8ba728e61cd589e1720d0df44c39"
checksum = "33fcecee49339531cf6bd84ecf3ed94f9c8ef4a7e700f2a1cac9cc1ca485383a"
dependencies = [
"cc",
"libc",
@ -1778,16 +1608,7 @@ dependencies = [
"rand 0.7.3",
"redox_syscall",
"remove_dir_all",
"winapi 0.3.9",
]
[[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",
"winapi",
]
[[package]]
@ -1798,51 +1619,45 @@ checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
dependencies = [
"libc",
"redox_syscall",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "tokio"
version = "0.2.23"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff"
dependencies = [
"bytes 0.5.4",
"fnv",
"iovec",
"lazy_static 1.4.0",
"memchr",
"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"
checksum = "5fb2ed024293bb19f7a5dc54fe83bf86532a44c12a2bb8ba40d64a4509395ca2"
dependencies = [
"autocfg",
"bytes 1.0.1",
"libc",
"memchr",
"mio 0.7.7",
"mio",
"num_cpus",
"pin-project-lite 0.2.0",
"pin-project-lite",
"tokio-macros",
"winapi",
]
[[package]]
name = "tokio-macros"
version = "1.0.0"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494"
checksum = "c49e3df43841dafb86046472506755d8501c5615673955f6aa17181125d13c37"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
name = "tokio-native-tls"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
"native-tls 0.2.7",
"tokio",
]
[[package]]
@ -1852,7 +1667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
"tokio 1.1.0",
"tokio",
"webpki",
]
@ -1863,32 +1678,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76066865172052eb8796c686f0b441a93df8b08d40a950b062ffb9a426f00edd"
dependencies = [
"futures-core",
"pin-project-lite 0.2.0",
"tokio 1.1.0",
]
[[package]]
name = "tokio-tls"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343"
dependencies = [
"native-tls 0.2.4",
"tokio 0.2.23",
]
[[package]]
name = "tokio-util"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"
dependencies = [
"bytes 0.5.4",
"futures-core",
"futures-sink",
"log 0.4.8",
"pin-project-lite 0.1.4",
"tokio 0.2.23",
"pin-project-lite",
"tokio",
]
[[package]]
@ -1902,8 +1693,8 @@ dependencies = [
"futures-core",
"futures-sink",
"log 0.4.8",
"pin-project-lite 0.2.0",
"tokio 1.1.0",
"pin-project-lite",
"tokio",
"tokio-stream",
]
@ -1913,7 +1704,7 @@ version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
dependencies = [
"serde 1.0.120",
"serde 1.0.126",
]
[[package]]
@ -1924,32 +1715,33 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
[[package]]
name = "tracing"
version = "0.1.21"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27"
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
dependencies = [
"cfg-if 0.1.10",
"pin-project-lite 0.1.4",
"cfg-if 1.0.0",
"log 0.4.8",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
]
[[package]]
name = "tracing-attributes"
version = "0.1.11"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada"
checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
]
[[package]]
name = "tracing-core"
version = "0.1.17"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052"
dependencies = [
"lazy_static 1.4.0",
]
@ -2161,7 +1953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42"
dependencies = [
"cfg-if 0.1.10",
"serde 1.0.120",
"serde 1.0.126",
"serde_json 1.0.48",
"wasm-bindgen-macro",
]
@ -2177,7 +1969,7 @@ dependencies = [
"log 0.4.8",
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
"wasm-bindgen-shared",
]
@ -2211,7 +2003,7 @@ checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe"
dependencies = [
"proc-macro2",
"quote 1.0.3",
"syn 1.0.59",
"syn 1.0.73",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -2260,12 +2052,6 @@ dependencies = [
"webpki",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
[[package]]
name = "winapi"
version = "0.3.9"
@ -2276,12 +2062,6 @@ dependencies = [
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
@ -2300,15 +2080,5 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "ws2_32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
dependencies = [
"winapi 0.2.8",
"winapi-build",
"winapi",
]

View File

@ -7,30 +7,30 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serenity = "0.10.2"
rand = "0.8.2"
serenity = "0.10.8"
rand = "0.8.4"
toml = "0.5.8"
sys-info = "0.7.0"
sys-info = "0.9.0"
urbandict = "0.2.0"
owoify = "0.1.5"
lazy_static = "1.4.0"
colored = "2.0.0"
brainfrick = "1.1.2"
percent-encoding = "2.1.0"
regex = "1.4.3"
regex = "1.5.4"
[patch.crates-io]
openssl = { git = "https://github.com/ishitatsuyuki/rust-openssl", branch = "0.9.x" }
[dependencies.serde]
version = "1.0.118"
version = "1.0.126"
features = ["derive"]
[dependencies.reqwest]
version = "0.10.10"
version = "0.11.4"
features = ["blocking", "json"]
[dependencies.tokio]
version = "1.1.0"
version = "1.7.1"
features = ["macros", "rt-multi-thread"]

View File

@ -23,6 +23,11 @@ async fn help(ctx: &Context, message: &Message) -> CommandResult {
"Find a definition of word",
true,
),
(
"owo!spoiler ``<text>`` ``[image(s)]``",
"Re-sends a message with attachments spoilered. Text is optional",
true,
),
(
"owo!embed ``[args]`` *OR* help",
"Create an embed from a Toml object",

View File

@ -6,3 +6,4 @@ pub mod help;
pub mod lyrics;
pub mod pinned;
pub mod ship;
pub mod spoile;

68
src/commands/spoile.rs Normal file
View File

@ -0,0 +1,68 @@
use serenity::{
builder::CreateMessage,
framework::standard::{macros::command, Args, CommandResult},
http::AttachmentType,
model::channel::Message,
prelude::*,
utils::MessageBuilder,
};
#[command]
async fn spoiler(ctx: &Context, message: &Message, args: Args) -> CommandResult {
// check if the message has any attachments
let attachments = match message.attachments.is_empty() {
true => {
return Err("No images were attached!".into());
}
false => &message.attachments,
};
// get the author's nick in the server, otherwise default to global username later
let username = message
.author
.nick_in(&ctx.http, &message.guild_id.ok_or("No guild id found")?)
.await;
let mut output = MessageBuilder::new();
&output
.push("Sent by ")
.push_bold_line_safe(username.unwrap_or(message.author.name.clone()));
// if message contains text, add it
match args.rest().trim() {
"" => {}
v => {
&output.push(v);
}
}
let output_message = &mut CreateMessage::default();
output_message.content(output.build());
for a in attachments {
// download each attachment
let content = match a.download().await {
Ok(content) => content,
Err(_) => return Err("Error downloading attachment".into()),
};
let content: &[u8] = content.as_slice();
// attach them back to the new message with an edited filename
output_message.add_file(AttachmentType::Bytes {
data: content.to_owned().into(),
filename: format!("SPOILER_{}", a.filename),
});
}
// delete the original message
let _ = message.delete(&ctx.http).await;
let _ = message
.channel_id
.send_message(&ctx.http, |_| output_message)
.await;
Ok(())
}

View File

@ -32,7 +32,7 @@ use utils::*;
mod commands;
use commands::{
brainfuck::*, define::*, embed::*, emote::*, help::*, lyrics::*, pinned::*, ship::*,
brainfuck::*, define::*, embed::*, emote::*, help::*, lyrics::*, pinned::*, ship::*, spoile::*,
};
struct Handler;
@ -121,7 +121,7 @@ async fn after(ctx: &Context, msg: &Message, command_name: &str, command_result:
#[group]
#[commands(
init, ping, halt, servers, host, status, ship, bottom_rng, headpat, uwu, gayculator, sausage,
help, embed, define, owo, info, echo, desc, pinned, brainfuck, pfp, lyrics, emote
help, embed, define, owo, info, echo, desc, pinned, brainfuck, pfp, lyrics, emote, spoiler
)]
struct General;