diff --git a/Cargo.lock b/Cargo.lock index 6bde2c8..b7c5b9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -277,12 +277,6 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" -[[package]] -name = "bytecount" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" - [[package]] name = "byteorder" version = "1.5.0" @@ -295,37 +289,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.20", - "serde", - "serde_json", -] - [[package]] name = "cc" version = "1.0.83" @@ -396,25 +359,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -435,6 +379,16 @@ dependencies = [ "darling_macro 0.13.4", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.3" @@ -459,6 +413,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + [[package]] name = "darling_core" version = "0.20.3" @@ -484,6 +452,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" @@ -629,15 +608,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "error-chain" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" -dependencies = [ - "version_check", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -821,12 +791,6 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "h2" version = "0.3.21" @@ -1209,21 +1173,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "mini-moka" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e0b72e7c9042467008b10279fc732326bd605459ae03bda88825909dd19b56" -dependencies = [ - "crossbeam-channel", - "crossbeam-utils", - "dashmap", - "skeptic", - "smallvec", - "tagptr", - "triomphe", -] - [[package]] name = "minidom" version = "0.15.2" @@ -1541,29 +1490,31 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "poise" -version = "0.6.0" -source = "git+https://github.com/GnomedDev/poise.git?branch=fix-arg-parsing#cb26610fd662cc9ef501c3d0fa8f521739f94821" +version = "0.5.5" +source = "git+https://github.com/serenity-rs/poise?rev=b1d6bf643e877b5d689207d275a3b75363b0784#b1d6bf643e877b5d689207d275a3b75363b0784b" dependencies = [ "async-trait", "derivative", + "futures-core", "futures-util", + "log", + "once_cell", "parking_lot", "poise_macros", "regex", "serenity", "tokio", - "tracing", ] [[package]] name = "poise_macros" -version = "0.6.0" -source = "git+https://github.com/GnomedDev/poise.git?branch=fix-arg-parsing#cb26610fd662cc9ef501c3d0fa8f521739f94821" +version = "0.5.5" +source = "git+https://github.com/serenity-rs/poise?rev=b1d6bf643e877b5d689207d275a3b75363b0784#b1d6bf643e877b5d689207d275a3b75363b0784b" dependencies = [ - "darling 0.20.3", + "darling 0.14.4", "proc-macro2", "quote", - "syn 2.0.39", + "syn 1.0.109", ] [[package]] @@ -1611,17 +1562,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "pulldown-cmark" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" -dependencies = [ - "bitflags 1.3.2", - "memchr", - "unicase", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -1961,15 +1901,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "schannel" version = "0.1.22" @@ -2042,9 +1973,6 @@ name = "semver" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] [[package]] name = "semver-parser" @@ -2139,9 +2067,8 @@ dependencies = [ [[package]] name = "serenity" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385647faa24a889929028973650a4f158fb1b4272b2fcf94feb9fcc3c009e813" +version = "0.11.6" +source = "git+https://github.com/serenity-rs/serenity?rev=a0c102f9acfd8d7184650815e06e0301954cb9e7#a0c102f9acfd8d7184650815e06e0301954cb9e7" dependencies = [ "arrayvec", "async-trait", @@ -2165,7 +2092,6 @@ dependencies = [ "tokio-tungstenite", "tracing", "typemap_rev", - "typesize", "url", ] @@ -2220,21 +2146,6 @@ dependencies = [ "libc", ] -[[package]] -name = "skeptic" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" -dependencies = [ - "bytecount", - "cargo_metadata", - "error-chain", - "glob", - "pulldown-cmark", - "tempfile", - "walkdir", -] - [[package]] name = "slab" version = "0.4.9" @@ -2365,12 +2276,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tagptr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" - [[package]] name = "take_mut" version = "0.2.2" @@ -2647,12 +2552,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "triomphe" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" - [[package]] name = "trust-dns-proto" version = "0.21.2" @@ -2747,35 +2646,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "typesize" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46638a7bcd4104adbb21b558651f24bdc6a26366a0476099076d0771b864561b" -dependencies = [ - "chrono", - "dashmap", - "hashbrown 0.14.2", - "mini-moka", - "parking_lot", - "secrecy", - "serde_json", - "time", - "typesize-derive", - "url", -] - -[[package]] -name = "typesize-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b122284365ba8497be951b9a21491f70c9688eb6fddc582931a0703f6a00ece" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - [[package]] name = "unicase" version = "2.7.0" @@ -2870,16 +2740,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -3012,15 +2872,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index 4e9dea3..a7cbb49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ mime2ext = "0.1.52" mongodb = { version = "2.4.0", features = ["bson-chrono-0_4"] } once_cell = "1.17.1" orderless = "0.1.5" -poise = { git = "https://github.com/GnomedDev/poise.git", branch = "fix-arg-parsing" } +poise = { git = "https://github.com/serenity-rs/poise", rev = "b1d6bf643e877b5d689207d275a3b75363b0784" } proc-macro2 = "1.0.67" rand = "0.8.5" rust-s3 = "0.33.0" diff --git a/src/main.rs b/src/main.rs index 295b81d..b705c78 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,15 +73,16 @@ async fn main() { commands::admin::admin(), commands::switch_logs::switch_logs(), ], - event_handler: |ctx, event, _framework, data| { + event_handler: |event, _framework, data| { Box::pin(async move { match event { FullEvent::Ready { + ctx: _, data_about_bot: _, } => { tracing::info!("Bot is ready!") } - FullEvent::Message { new_message } => { + FullEvent::Message { ctx, new_message } => { if new_message.content.starts_with(&envvar("PREFIX")) { events::on_text_command::run(ctx, data, new_message).await? } else { @@ -89,11 +90,12 @@ async fn main() { } } FullEvent::MessageUpdate { + ctx, old_if_available: _, new: _, event, } => events::on_edit::run(ctx, data, event).await?, - FullEvent::ReactionAdd { add_reaction } => { + FullEvent::ReactionAdd { ctx, add_reaction } => { events::on_reaction::run(ctx, data, add_reaction).await? } _ => {}