Skip to content

Commit

Permalink
Fix CreateDirectChannelAsync dictionary access
Browse files Browse the repository at this point in the history
  • Loading branch information
Quahu committed Aug 7, 2024
1 parent 37eeab1 commit 7e1c067
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Disqord.Rest/Extensions/RestClientExtensions.User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ public static async Task<IDirectChannel> CreateDirectChannelAsync(this IRestClie
var channel = new TransientDirectChannel(client, model);

if (channels != null && !channels.IsReadOnly)
channels.Add(userId, channel);
{
channels[userId] = channel;
}

return channel;
}
Expand Down

0 comments on commit 7e1c067

Please sign in to comment.