mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 22:07:55 +00:00
fix cache error on system messages
This commit is contained in:
parent
e144571904
commit
28bcb35bb2
3 changed files with 13 additions and 16 deletions
|
|
@ -83,7 +83,7 @@ namespace PluralKit.Bot
|
|||
if (channel.GuildId != null)
|
||||
{
|
||||
var member = _guildMembers.GetValueOrDefault(channel.GuildId.Value);
|
||||
return _cache.PermissionsFor(channelId, _cluster.User?.Id ?? default, member?.Roles);
|
||||
return _cache.PermissionsFor(channelId, _cluster.User?.Id ?? default, member);
|
||||
}
|
||||
|
||||
return PermissionSet.Dm;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ namespace PluralKit.Bot {
|
|||
foreach (var channel in await _rest.GetGuildChannels(guild.Id))
|
||||
{
|
||||
var botPermissions = _bot.PermissionsIn(channel.Id);
|
||||
var userPermissions = PermissionExtensions.PermissionsFor(guild, channel, ctx.Author.Id, senderGuildUser.Roles);
|
||||
var userPermissions = PermissionExtensions.PermissionsFor(guild, channel, ctx.Author.Id, senderGuildUser);
|
||||
|
||||
if ((userPermissions & PermissionSet.ViewChannel) == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue