disconnect command

This commit is contained in:
jellywx 2021-06-05 15:09:14 +01:00
parent a6b98cd450
commit e3f30ab085
4 changed files with 140 additions and 250 deletions

359
Cargo.lock generated
View File

@ -17,15 +17,9 @@ dependencies = [
[[package]]
name = "ahash"
version = "0.4.7"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
[[package]]
name = "ahash"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f200cbb1e856866d9eade941cf3aa0c5d7dd36f74311c4273b494f4ef036957"
checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98"
dependencies = [
"getrandom",
"once_cell",
@ -75,7 +69,7 @@ checksum = "07b30ef0ea5c20caaa54baea49514a206308989c68be7ecd86c7f956e4da6378"
dependencies = [
"futures-io",
"futures-util",
"log 0.4.14",
"log",
"pin-project-lite",
"tokio",
"tokio-rustls",
@ -100,7 +94,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -118,7 +112,7 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927791de46f70facea982dbfaf19719a41ce6064443403be631a85de6a58fff9"
dependencies = [
"log 0.4.14",
"log",
"pkg-config",
]
@ -151,12 +145,6 @@ dependencies = [
"num-traits 0.2.14",
]
[[package]]
name = "bitflags"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
[[package]]
name = "bitflags"
version = "1.2.1"
@ -186,9 +174,9 @@ dependencies = [
[[package]]
name = "bumpalo"
version = "3.6.1"
version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"
[[package]]
name = "byteorder"
@ -204,9 +192,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
[[package]]
name = "cc"
version = "1.0.67"
version = "1.0.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
[[package]]
name = "cfg-if"
@ -231,7 +219,7 @@ dependencies = [
"num-traits 0.2.14",
"serde",
"time",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -246,7 +234,7 @@ dependencies = [
[[package]]
name = "command_attr"
version = "0.3.6"
source = "git+https://github.com/serenity-rs/serenity?branch=next#080eebeed0991266e405cdb14ee796ec30808a9f"
source = "git+https://github.com/serenity-rs/serenity?branch=next#a24132fc66bea5fe7772d9f694ab3517d24d286b"
dependencies = [
"proc-macro2",
"quote",
@ -294,17 +282,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.4",
"crossbeam-utils 0.8.5",
]
[[package]]
name = "crossbeam-queue"
version = "0.3.1"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f6cb3c7f5b8e51bc3ebb73a2327ad4abdbd119dc13223f14f961d2f38486756"
checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.4",
"crossbeam-utils 0.8.5",
]
[[package]]
@ -319,11 +307,10 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
version = "0.8.4"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278"
checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
dependencies = [
"autocfg 1.0.1",
"cfg-if 1.0.0",
"lazy_static",
]
@ -349,14 +336,12 @@ dependencies = [
[[package]]
name = "discortp"
version = "0.3.0"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8a712fe4034500af7e5063aa55a272354a36472120c8511c358fbd4f0230bec"
checksum = "fb66017646a48220b5ea30d63ac18bb5952f647f1a41ed755880895125d26972"
dependencies = [
"glob",
"pnet_macros",
"pnet_macros_support",
"syntex",
]
[[package]]
@ -397,7 +382,7 @@ checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f"
dependencies = [
"atty",
"humantime",
"log 0.4.14",
"log",
"regex",
"termcolor",
]
@ -566,9 +551,9 @@ checksum = "061d3be1afec479d56fa3bd182bf966c7999ec175fcfdb87ac14d417241366c6"
dependencies = [
"cc",
"libc",
"log 0.4.14",
"log",
"rustversion",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -583,9 +568,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.2.2"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if 1.0.0",
"js-sys",
@ -594,12 +579,6 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "glob"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "h2"
version = "0.3.3"
@ -624,24 +603,30 @@ name = "hashbrown"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
[[package]]
name = "hashbrown"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
dependencies = [
"ahash 0.4.7",
"ahash",
]
[[package]]
name = "hashlink"
version = "0.6.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d99cf782f0dc4372d26846bec3de7804ceb5df083c2d4462c0b8d2330e894fa8"
checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf"
dependencies = [
"hashbrown",
"hashbrown 0.11.2",
]
[[package]]
name = "heck"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
dependencies = [
"unicode-segmentation",
]
@ -691,9 +676,9 @@ checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68"
[[package]]
name = "httpdate"
version = "1.0.0"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9"
checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440"
[[package]]
name = "humantime"
@ -703,9 +688,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
version = "0.14.7"
version = "0.14.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e5f105c494081baa3bf9e200b279e27ec1623895cd504c7dbef8d0b080fcf54"
checksum = "d3f71a7eea53a3f8257a7b4795373ff886397178cd634430ea94e12d7fe4fe34"
dependencies = [
"bytes",
"futures-channel",
@ -733,7 +718,7 @@ checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64"
dependencies = [
"futures-util",
"hyper",
"log 0.4.14",
"log",
"rustls",
"tokio",
"tokio-rustls",
@ -771,7 +756,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
dependencies = [
"autocfg 1.0.1",
"hashbrown",
"hashbrown 0.9.1",
]
[[package]]
@ -813,16 +798,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 = "lazy_static"
version = "1.4.0"
@ -839,7 +814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
dependencies = [
"arrayvec 0.5.2",
"bitflags 1.2.1",
"bitflags",
"cfg-if 1.0.0",
"ryu",
"static_assertions",
@ -847,9 +822,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.94"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36"
[[package]]
name = "libm"
@ -866,15 +841,6 @@ dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.14",
]
[[package]]
name = "log"
version = "0.4.14"
@ -948,10 +914,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956"
dependencies = [
"libc",
"log 0.4.14",
"log",
"miow",
"ntapi",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -960,7 +926,7 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -980,7 +946,7 @@ checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4"
dependencies = [
"lazy_static",
"libc",
"log 0.4.14",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
@ -1015,7 +981,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1126,7 +1092,7 @@ version = "0.10.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8"
dependencies = [
"bitflags 1.2.1",
"bitflags",
"cfg-if 1.0.0",
"foreign-types",
"libc",
@ -1175,7 +1141,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1235,26 +1201,27 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
[[package]]
name = "pnet_base"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e4688aa497ef62129f302a5800ebde67825f8ff129f43690ca84099f6620bed"
checksum = "25488cd551a753dcaaa6fffc9f69a7610a412dd8954425bf7ffad5f7d1156fb8"
[[package]]
name = "pnet_macros"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d894a90dbdbe976e624453fc31b1912f658083778329442dda1cca94f76a3e76"
checksum = "30490e0852e58402b8fae0d39897b08a24f493023a4d6cf56b2e30f31ed57548"
dependencies = [
"proc-macro2",
"quote",
"regex",
"syntex",
"syntex_syntax",
"syn",
]
[[package]]
name = "pnet_macros_support"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b99269a458570bc06a9132254349f6543d9abc92e88b68d8de934aac9481f6c"
checksum = "d4714e10f30cab023005adce048f2d30dd4ac4f093662abf2220855655ef8f90"
dependencies = [
"pnet_base",
]
@ -1290,11 +1257,11 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
[[package]]
name = "proc-macro2"
version = "1.0.26"
version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
dependencies = [
"unicode-xid 0.2.2",
"unicode-xid",
]
[[package]]
@ -1358,7 +1325,7 @@ version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc"
dependencies = [
"bitflags 1.2.1",
"bitflags",
]
[[package]]
@ -1393,7 +1360,7 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1415,7 +1382,7 @@ dependencies = [
"ipnet",
"js-sys",
"lazy_static",
"log 0.4.14",
"log",
"mime",
"mime_guess",
"native-tls",
@ -1448,7 +1415,7 @@ dependencies = [
"spin",
"untrusted",
"web-sys",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1471,12 +1438,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "rustc-serialize"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
[[package]]
name = "rustls"
version = "0.19.1"
@ -1484,7 +1445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
dependencies = [
"base64",
"log 0.4.14",
"log",
"ring",
"sct",
"webpki",
@ -1519,7 +1480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
dependencies = [
"lazy_static",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1550,7 +1511,7 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84"
dependencies = [
"bitflags 1.2.1",
"bitflags",
"core-foundation",
"core-foundation-sys",
"libc",
@ -1624,12 +1585,12 @@ dependencies = [
[[package]]
name = "serenity"
version = "0.10.7"
source = "git+https://github.com/serenity-rs/serenity?branch=next#080eebeed0991266e405cdb14ee796ec30808a9f"
source = "git+https://github.com/serenity-rs/serenity?branch=next#a24132fc66bea5fe7772d9f694ab3517d24d286b"
dependencies = [
"async-trait",
"async-tungstenite",
"base64",
"bitflags 1.2.1",
"bitflags",
"bytes",
"chrono",
"command_attr",
@ -1650,9 +1611,9 @@ dependencies = [
[[package]]
name = "serenity-voice-model"
version = "0.1.0"
source = "git+https://github.com/serenity-rs/serenity?branch=next#080eebeed0991266e405cdb14ee796ec30808a9f"
source = "git+https://github.com/serenity-rs/serenity?branch=next#a24132fc66bea5fe7772d9f694ab3517d24d286b"
dependencies = [
"bitflags 1.2.1",
"bitflags",
"enum_primitive",
"serde",
"serde_json",
@ -1687,18 +1648,18 @@ dependencies = [
[[package]]
name = "signal-hook-registry"
version = "1.3.0"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6"
checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
dependencies = [
"libc",
]
[[package]]
name = "simple_asn1"
version = "0.5.2"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e0e9076e5242ff5a58e854cb478ea9caebce01088f86d3d9c6ad336b7655263"
checksum = "dc31e6cf34ad4321d3a2b8f934949b429e314519f753a77962f16c664dca8e13"
dependencies = [
"chrono",
"num-bigint 0.4.0",
@ -1725,13 +1686,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2"
dependencies = [
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "songbird"
version = "0.2.0-beta.0"
source = "git+https://github.com/serenity-rs/songbird?branch=next#d565763740a64729aa14aa91c6f225291c648aae"
version = "0.2.0-beta.2"
source = "git+https://github.com/FelixMcFelix/songbird?branch=ws-fix#a9ae0528405ed783153175f8d4d52dd51532aef3"
dependencies = [
"async-trait",
"async-tungstenite",
@ -1762,13 +1723,13 @@ dependencies = [
[[package]]
name = "soundfx-rs"
version = "1.2.4"
version = "1.2.5"
dependencies = [
"dashmap",
"dotenv",
"env_logger",
"lazy_static",
"log 0.4.14",
"log",
"regex",
"regex_command_attr",
"reqwest",
@ -1792,7 +1753,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a98101bdc3833e192713c2af0b0dd2614f50d1cf1f7a97c5221b7aac052acc7"
dependencies = [
"once_cell",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1819,9 +1780,9 @@ dependencies = [
[[package]]
name = "sqlx"
version = "0.5.2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d582b9bc04ec6c03084196efc42c2226b018e9941f03ee62bd88921d500917c0"
checksum = "ba82f79b31f30acebf19905bcd8b978f46891b9d0723f578447361a8910b6584"
dependencies = [
"sqlx-core",
"sqlx-macros",
@ -1829,20 +1790,20 @@ dependencies = [
[[package]]
name = "sqlx-core"
version = "0.5.2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de52d1d473cebb2abb79c886ef6a8023e965e34c0676a99cfeac2cc7f0fde4c1"
checksum = "7f23af36748ec8ea8d49ef8499839907be41b0b1178a4e82b8cb45d29f531dc9"
dependencies = [
"ahash 0.7.2",
"ahash",
"atoi",
"base64",
"bigdecimal",
"bitflags 1.2.1",
"bitflags",
"byteorder",
"bytes",
"crossbeam-channel",
"crossbeam-queue",
"crossbeam-utils 0.8.4",
"crossbeam-utils 0.8.5",
"digest",
"either",
"futures-channel",
@ -1853,7 +1814,7 @@ dependencies = [
"hex",
"itoa",
"libc",
"log 0.4.14",
"log",
"memchr",
"num-bigint 0.3.2",
"once_cell",
@ -1878,14 +1839,15 @@ dependencies = [
[[package]]
name = "sqlx-macros"
version = "0.5.2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a40f0be97e704d3fbf059e7e3333c3735639146a72d586c5534c70e79da88a4"
checksum = "47e4a2349d1ffd60a03ca0de3f116ba55d7f406e55a0d84c64a5590866d94c06"
dependencies = [
"dotenv",
"either",
"futures",
"heck",
"once_cell",
"proc-macro2",
"quote",
"sqlx-core",
@ -1896,9 +1858,9 @@ dependencies = [
[[package]]
name = "sqlx-rt"
version = "0.5.2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6ae97ab05063ed515cdc23d90253213aa24dda0a288c5ec079af3d10f9771bc"
checksum = "8199b421ecf3493ee9ef3e7bc90c904844cfb2ea7ea2f57347a93f52bfd3e057"
dependencies = [
"once_cell",
"tokio",
@ -1945,10 +1907,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e32b956473d98c601dac257fab8a7700d42e49fdd7a33432dd5dc7fdd2448dd"
dependencies = [
"arrayvec 0.4.12",
"bitflags 1.2.1",
"bitflags",
"byteorder",
"lazy_static",
"log 0.4.14",
"log",
]
[[package]]
@ -1959,7 +1921,7 @@ checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
dependencies = [
"proc-macro2",
"quote",
"unicode-xid 0.2.2",
"unicode-xid",
]
[[package]]
@ -1971,56 +1933,7 @@ dependencies = [
"proc-macro2",
"quote",
"syn",
"unicode-xid 0.2.2",
]
[[package]]
name = "syntex"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a30b08a6b383a22e5f6edc127d169670d48f905bb00ca79a00ea3e442ebe317"
dependencies = [
"syntex_errors",
"syntex_syntax",
]
[[package]]
name = "syntex_errors"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04c48f32867b6114449155b2a82114b86d4b09e1bddb21c47ff104ab9172b646"
dependencies = [
"libc",
"log 0.3.9",
"rustc-serialize",
"syntex_pos",
"term",
"unicode-xid 0.0.3",
]
[[package]]
name = "syntex_pos"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fd49988e52451813c61fecbe9abb5cfd4e1b7bb6cdbb980a6fbcbab859171a6"
dependencies = [
"rustc-serialize",
]
[[package]]
name = "syntex_syntax"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7628a0506e8f9666fdabb5f265d0059b059edac9a3f810bda077abb5d826bd8d"
dependencies = [
"bitflags 0.5.0",
"libc",
"log 0.3.9",
"rustc-serialize",
"syntex_errors",
"syntex_pos",
"term",
"unicode-xid 0.0.3",
"unicode-xid",
]
[[package]]
@ -2040,17 +1953,7 @@ dependencies = [
"rand",
"redox_syscall",
"remove_dir_all",
"winapi 0.3.9",
]
[[package]]
name = "term"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
dependencies = [
"kernel32-sys",
"winapi 0.2.8",
"winapi",
]
[[package]]
@ -2064,18 +1967,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.24"
version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.24"
version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d"
dependencies = [
"proc-macro2",
"quote",
@ -2089,7 +1992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
dependencies = [
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2109,9 +2012,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.6.0"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd3076b5c8cc18138b8f8814895c11eb4de37114a5d127bafdc5e55798ceef37"
checksum = "0a38d31d7831c6ed7aad00aa4c12d9375fd225a6dd77da1d25b707346319a975"
dependencies = [
"autocfg 1.0.1",
"bytes",
@ -2123,7 +2026,7 @@ dependencies = [
"pin-project-lite",
"signal-hook-registry",
"tokio-macros",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2178,7 +2081,7 @@ dependencies = [
"bytes",
"futures-core",
"futures-sink",
"log 0.4.14",
"log",
"pin-project-lite",
"tokio",
]
@ -2196,7 +2099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
dependencies = [
"cfg-if 1.0.0",
"log 0.4.14",
"log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@ -2250,7 +2153,7 @@ dependencies = [
"http",
"httparse",
"input_buffer",
"log 0.4.14",
"log",
"rand",
"rustls",
"sha-1",
@ -2293,9 +2196,9 @@ dependencies = [
[[package]]
name = "unicode-normalization"
version = "0.1.17"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
dependencies = [
"tinyvec",
]
@ -2306,12 +2209,6 @@ version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
[[package]]
name = "unicode-xid"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36dff09cafb4ec7c8cf0023eb0b686cb6ce65499116a12201c9e11840ca01beb"
[[package]]
name = "unicode-xid"
version = "0.2.2"
@ -2375,9 +2272,9 @@ checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0"
[[package]]
name = "vcpkg"
version = "0.2.12"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d"
checksum = "025ce40a007e1907e58d5bc1a594def78e5573bb0b1160bc389634e8f12e4faa"
[[package]]
name = "version_check"
@ -2391,7 +2288,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.14",
"log",
"try-lock",
]
@ -2421,7 +2318,7 @@ checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900"
dependencies = [
"bumpalo",
"lazy_static",
"log 0.4.14",
"log",
"proc-macro2",
"quote",
"syn",
@ -2508,12 +2405,6 @@ dependencies = [
"web-sys",
]
[[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"
@ -2524,12 +2415,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"
@ -2542,7 +2427,7 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2557,7 +2442,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]

View File

@ -1,11 +1,11 @@
[package]
name = "soundfx-rs"
version = "1.2.4"
version = "1.2.5"
authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018"
[dependencies]
songbird = { git = "https://github.com/serenity-rs/songbird", branch = "next" }
songbird = { git = "https://github.com/FelixMcFelix/songbird", branch = "ws-fix" }
serenity = { git = "https://github.com/serenity-rs/serenity", branch = "next", features = ["voice", "collector"] }
sqlx = { version = "0.5", default-features = false, features = ["runtime-tokio-rustls", "macros", "mysql", "bigdecimal"] }
dotenv = "0.15"

View File

@ -287,14 +287,7 @@ impl Framework for RegexFramework {
let member = guild.member(&ctx, &msg.author).await.unwrap();
info!(
"Starting permission check for {} ({})",
command.name, msg.content
);
if command.check_permissions(&ctx, &guild, &member).await {
info!("Check on {} ({}) passed", command.name, msg.content);
(command.func)(
&ctx,
&msg,
@ -310,8 +303,6 @@ impl Framework for RegexFramework {
.say(&ctx, "You must be an Admin to do this command")
.await;
}
info!("Finished executing {} ({})", command.name, msg.content);
}
PermissionCheck::None => {

View File

@ -324,6 +324,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.add_command("play", &PLAY_COMMAND)
.add_command("p", &PLAY_COMMAND)
.add_command("stop", &STOP_PLAYING_COMMAND)
.add_command("disconnect", &DISCONNECT_COMMAND)
.add_command("dc", &DISCONNECT_COMMAND)
// sound management commands
.add_command("upload", &UPLOAD_NEW_SOUND_COMMAND)
.add_command("delete", &DELETE_SOUND_COMMAND)
@ -444,7 +446,7 @@ async fn help(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
.color(THEME_COLOR)
.description(description)
.field("Info", "`help` `info` `invite` `donate`", false)
.field("Play", "`play` `p` `stop` `loop`", false)
.field("Play", "`play` `p` `stop` `dc` `loop`", false)
.field("Manage", "`upload` `delete` `list` `public`", false)
.field("Settings", "`prefix` `roles` `volume` `allow_greet`", false)
.field("Search", "`search` `random` `popular`", false)
@ -474,6 +476,7 @@ async fn help(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
`p` - an alias for `play`
`stop` - stop the bot from playing
`dc` - disconnect the bot from the current channel
`loop [sound]` - play a sound matching the name \"sound\" on loop
`loop [id]` - play a sound matching the numerical ID `id` on loop
@ -742,6 +745,17 @@ async fn stop_playing(ctx: &Context, msg: &Message, _args: Args) -> CommandResul
Ok(())
}
#[command]
#[permission_level(Managed)]
async fn disconnect(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
let guild_id = msg.guild_id.unwrap();
let songbird = songbird::get(ctx).await.unwrap();
let _ = songbird.leave(guild_id).await;
Ok(())
}
#[command]
async fn info(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
let current_user = ctx.cache.current_user().await;
@ -770,7 +784,7 @@ Find me on https://discord.jellywx.com/ and on https://github.com/JellyWX :)
\"Small River 1 - Fast - Close\" https://freesound.org/people/Pfannkuchn/
**An online dashboard is available!** Visit https://soundfx.jellywx.com/dashboard
There is a maximum sound limit per user. This can be removed by donating at https://patreon.com/jellywx", current_user.name, current_user.id.as_u64())))).await?;
There is a maximum sound limit per user. This can be removed by subscribing at **https://patreon.com/jellywx**", current_user.name, current_user.id.as_u64())))).await?;
Ok(())
}