mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Fix messages in DMs
This commit is contained in:
parent
13e3289c26
commit
1c548e9d7b
4 changed files with 19 additions and 3 deletions
|
|
@ -81,6 +81,18 @@ namespace Myriad.Cache
|
|||
return default;
|
||||
}
|
||||
|
||||
public ValueTask SaveDmChannelStub(ulong channelId)
|
||||
{
|
||||
// Use existing channel object if present, otherwise add a stub
|
||||
// We may get a message create before channel create and we want to have it saved
|
||||
_channels.GetOrAdd(channelId, id => new Channel
|
||||
{
|
||||
Id = id,
|
||||
Type = Channel.ChannelType.Dm
|
||||
});
|
||||
return default;
|
||||
}
|
||||
|
||||
public ValueTask RemoveGuild(ulong guildId)
|
||||
{
|
||||
_guilds.TryRemove(guildId, out _);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue