From 870f05062a87444ee58436e8d12ba3702073eb8e Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:28:11 -0400 Subject: store stage instances on connect --- src/discord/discord.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/discord/discord.cpp') diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp index 40af498..b3f8ca6 100644 --- a/src/discord/discord.cpp +++ b/src/discord/discord.cpp @@ -1720,6 +1720,13 @@ void DiscordClient::ProcessNewGuild(GuildData &guild) { return; } + if (guild.StageInstances.has_value()) { + for (const auto &stage : *guild.StageInstances) { + m_stage_instances[stage.ID] = stage; + m_channel_to_stage_instance[stage.ChannelID] = stage.ID; + } + } + m_store.BeginTransaction(); m_store.SetGuild(guild.ID, guild); -- cgit v1.2.3