Skip to content

Commit

Permalink
Add connection when it's created
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Feb 29, 2024
1 parent e7fbae1 commit c952106
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/DSharpPlus.VoiceLink/VoiceLinkExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public async Task<VoiceLinkConnection> ConnectAsync(DiscordChannel channel, Voic
_logger.LogDebug("Received voice state and voice server update events for guild {GuildId}.", channel.Guild.Id);

VoiceLinkConnection connection = new(this, channel, voiceState);
_connections[channel.Guild.Id] = connection;
await connection.InitializeAsync(pendingConnection.VoiceStateUpdateEventArgs!, pendingConnection.VoiceServerUpdateEventArgs!, cancellationToken);
return connection;
}
Expand Down

0 comments on commit c952106

Please sign in to comment.