From 430d6b76c46873c0160400ed7dbaf23addef9010 Mon Sep 17 00:00:00 2001 From: Oliver Atkinson Date: Thu, 25 Jul 2024 13:56:54 -0600 Subject: [PATCH] use custom poise version There are errors in the poise dependency serenity, they aren't yet in the newest version of poise, so we are using a git version --- Cargo.lock | 15 +++++++++------ Cargo.toml | 2 +- README.md | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cd3ace..36fb0d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -933,25 +933,23 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "poise" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1819d5a45e3590ef33754abce46432570c54a120798bdbf893112b4211fa09a6" dependencies = [ "async-trait", "derivative", "futures-util", + "indexmap", "parking_lot", "poise_macros", "regex", "serenity", "tokio", "tracing", + "trim-in-place", ] [[package]] name = "poise_macros" version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fa2c123c961e78315cd3deac7663177f12be4460f5440dbf62a7ed37b1effea" dependencies = [ "darling", "proc-macro2", @@ -1328,8 +1326,7 @@ dependencies = [ [[package]] name = "serenity" version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880a04106592d0a8f5bdacb1d935889bfbccb4a14f7074984d9cd857235d34ac" +source = "git+https://github.com/serenity-rs/serenity.git?rev=e34f4491ee3a0b20ea8dc30cbc77b257f402f692#e34f4491ee3a0b20ea8dc30cbc77b257f402f692" dependencies = [ "arrayvec", "async-trait", @@ -1725,6 +1722,12 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "trim-in-place" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" + [[package]] name = "triomphe" version = "0.1.13" diff --git a/Cargo.toml b/Cargo.toml index 1c1f224..073d7ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" [dependencies] tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] } # songbird = { version = "0.3.2", features = ["yt-dlp"] } -poise = { version = "0.6", features = ["cache"] } +poise = { version = "0.6", features = ["cache"], path="../poise" } dotenv = "0.15.0" anyhow = "1.0.75" once_cell = "1.19.0" diff --git a/README.md b/README.md index 86f78ea..88308ce 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,26 @@ egress a discord server +### NOTE: +Using custom version of poise (the discord library) because I need to use a specific version of serenity (the discord library for poise). Here's how to set it up: + +1) Clone Poise next to this repo: + +```shell +git clone https://github.com/serenity-rs/poise.git +``` + +2) Change the version of serenity that poise uses: + +```diff +[dependencies.serenity] +- version = "x.xx.x" ++ git = "https://github.com/serenity-rs/serenity.git" ++ rev = "e34f4491ee3a0b20ea8dc30cbc77b257f402f692" +``` + +> Just make sure that the rev is a sha1 commit hash sometime after 7/25/24 + ## Getting started * goto: [Discord applicatoins](https://discord.com/developers/applications) and create an application.