feat: allow setting a corresponding text channel for a voice channel

This commit is contained in:
2026-04-17 01:19:09 -04:00
parent 612a696829
commit 62399c2046
4 changed files with 83 additions and 11 deletions

View File

@@ -1,3 +1,5 @@
use std::collections::BTreeMap;
use dashmap::DashMap;
use futures::{StreamExt, stream::FuturesUnordered};
use twilight_model::{
@@ -8,10 +10,11 @@ use twilight_model::{
},
};
use crate::{OneToManyUniqueBTreeMapWithData, UserInVCData, VoiceStatus};
use crate::{OneToManyUniqueBTreeMapWithData, OneToOneBTreeMap, UserInVCData, VoiceStatus};
pub type GuildVoiceChannelToTextChannel = BTreeMap<Id<GuildMarker>, OneToOneBTreeMap<Id<ChannelMarker>, Id<ChannelMarker>>>;
type VCsInGuild = OneToManyUniqueBTreeMapWithData<Id<ChannelMarker>, Id<UserMarker>, UserInVCData>;
pub type VCs = DashMap<Id<GuildMarker>, VCsInGuild>;
#[tracing::instrument(skip(discord_client), ret)]