chore: patch songbird to use 0.17 twilight dependencies

This commit is contained in:
2026-03-27 16:04:43 -04:00
parent 3439bf9699
commit 9dac20b9ef
3 changed files with 22 additions and 57 deletions

70
Cargo.lock generated
View File

@@ -1456,9 +1456,9 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
"twilight-gateway 0.17.1", "twilight-gateway",
"twilight-http", "twilight-http",
"twilight-model 0.17.1", "twilight-model",
"twilight-util", "twilight-util",
"typed-builder 0.23.2", "typed-builder 0.23.2",
] ]
@@ -5151,8 +5151,7 @@ dependencies = [
[[package]] [[package]]
name = "songbird" name = "songbird"
version = "0.5.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://gitea.katniss.top/jacob/songbird?branch=twilight-0.17#926ed38a6da68325851ae33b845985b945462609"
checksum = "dc0f2c269821881c25c6daa6863a611a10c9b40ed9f56e2955793bf06fb0fdfd"
dependencies = [ dependencies = [
"aead", "aead",
"aes-gcm", "aes-gcm",
@@ -5192,8 +5191,8 @@ dependencies = [
"tokio-websockets 0.11.4", "tokio-websockets 0.11.4",
"tracing", "tracing",
"tracing-futures", "tracing-futures",
"twilight-gateway 0.16.0", "twilight-gateway",
"twilight-model 0.16.0", "twilight-model",
"typenum", "typenum",
"url", "url",
"uuid", "uuid",
@@ -5909,9 +5908,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-websockets" name = "tokio-websockets"
version = "0.13.0" version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19d469594aed8da8afbb9dfd33a5548f057f74d6c8e3a50b142b04398f91029a" checksum = "dad543404f98bfc969aeb71994105c592acfc6c43323fddcd016bb208d1c65cb"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"bytes", "bytes",
@@ -5920,6 +5919,7 @@ dependencies = [
"futures-sink", "futures-sink",
"http", "http",
"httparse", "httparse",
"rustls-native-certs",
"rustls-pki-types", "rustls-pki-types",
"sha1_smol", "sha1_smol",
"simdutf8", "simdutf8",
@@ -6182,25 +6182,6 @@ dependencies = [
"utf-8", "utf-8",
] ]
[[package]]
name = "twilight-gateway"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "863ef55467bcf6a2958162766fd0b72f33112e36971b37f9ec09b86d4fd0f7d1"
dependencies = [
"bitflags 2.10.0",
"fastrand",
"futures-core",
"futures-sink",
"serde",
"serde_json",
"tokio",
"tokio-websockets 0.11.4",
"tracing",
"twilight-gateway-queue 0.16.0",
"twilight-model 0.16.0",
]
[[package]] [[package]]
name = "twilight-gateway" name = "twilight-gateway"
version = "0.17.1" version = "0.17.1"
@@ -6214,20 +6195,10 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"tokio", "tokio",
"tokio-websockets 0.13.0", "tokio-websockets 0.13.2",
"tracing",
"twilight-gateway-queue 0.17.0",
"twilight-model 0.17.1",
]
[[package]]
name = "twilight-gateway-queue"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27c962bd4693da0a215abe6b431fd73eb87111f49c431b87951780f9f7985002"
dependencies = [
"tokio",
"tracing", "tracing",
"twilight-gateway-queue",
"twilight-model",
] ]
[[package]] [[package]]
@@ -6261,7 +6232,7 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"twilight-http-ratelimiting", "twilight-http-ratelimiting",
"twilight-model 0.17.1", "twilight-model",
"twilight-validate", "twilight-validate",
] ]
@@ -6277,19 +6248,6 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "twilight-model"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "191e2efa051dfbd9bed4c9f6bd3f5e007bda909c687a1db2760371a3d566617d"
dependencies = [
"bitflags 2.10.0",
"serde",
"serde-value",
"serde_repr",
"time",
]
[[package]] [[package]]
name = "twilight-model" name = "twilight-model"
version = "0.17.1" version = "0.17.1"
@@ -6309,7 +6267,7 @@ version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e71de79d48ce27aba1f591b10c84677f1317489c2ea154d9b8ed01efa8bceb53" checksum = "e71de79d48ce27aba1f591b10c84677f1317489c2ea154d9b8ed01efa8bceb53"
dependencies = [ dependencies = [
"twilight-model 0.17.1", "twilight-model",
"twilight-validate", "twilight-validate",
] ]
@@ -6319,7 +6277,7 @@ version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6a27472e023e3841d1c4e4e20253ed796e8440aada8b5205b8544f1172e661d" checksum = "d6a27472e023e3841d1c4e4e20253ed796e8440aada8b5205b8544f1172e661d"
dependencies = [ dependencies = [
"twilight-model 0.17.1", "twilight-model",
] ]
[[package]] [[package]]

View File

@@ -74,3 +74,4 @@ typed-builder = "0.23.2"
[patch.crates-io] [patch.crates-io]
audiopus_sys = { git = "https://github.com/amsam0/audiopus_sys", rev = "3955ddb2b7b87e772e1c7bb93b8726a864f8c8f9" } audiopus_sys = { git = "https://github.com/amsam0/audiopus_sys", rev = "3955ddb2b7b87e772e1c7bb93b8726a864f8c8f9" }
songbird = { git = "https://gitea.katniss.top/jacob/songbird", branch = "twilight-0.17" }

View File

@@ -3,7 +3,8 @@ use fomo_reducer::{CommandRouter, State, VCs, all_commands, initialize_vcs, upda
use opendal::{IntoOperatorUri, Operator, OperatorUri}; use opendal::{IntoOperatorUri, Operator, OperatorUri};
use secrecy::{ExposeSecret, SecretString}; use secrecy::{ExposeSecret, SecretString};
use snafu::Snafu; use snafu::Snafu;
use std::{fmt::Debug, str::FromStr, sync::Arc}; use songbird::shards::TwilightMap;
use std::{collections::HashMap, fmt::Debug, str::FromStr, sync::Arc};
use tracing_subscriber::{EnvFilter, fmt::format::FmtSpan}; use tracing_subscriber::{EnvFilter, fmt::format::FmtSpan};
use twilight_gateway::{Event, EventTypeFlags, Intents, Shard, ShardId, StreamExt}; use twilight_gateway::{Event, EventTypeFlags, Intents, Shard, ShardId, StreamExt};
use twilight_model::{ use twilight_model::{
@@ -109,6 +110,11 @@ async fn main() -> Result<(), MainError> {
let intents = Intents::GUILD_VOICE_STATES; let intents = Intents::GUILD_VOICE_STATES;
let mut shard = Shard::new(shard_id, discord_token.expose_secret().to_owned(), intents); let mut shard = Shard::new(shard_id, discord_token.expose_secret().to_owned(), intents);
let senders = TwilightMap::new(FromIterator::from_iter([(
shard.id().number(),
shard.sender(),
)]));
let event_types = EventTypeFlags::GUILD_VOICE_STATES | EventTypeFlags::INTERACTION_CREATE; let event_types = EventTypeFlags::GUILD_VOICE_STATES | EventTypeFlags::INTERACTION_CREATE;
let mut next_event = shard.next_event(event_types); let mut next_event = shard.next_event(event_types);