mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Disable Discord member caching entirely
This commit is contained in:
parent
82dfe43d5a
commit
6863da9462
5 changed files with 18 additions and 19 deletions
|
|
@ -230,6 +230,8 @@ namespace PluralKit.Bot.CommandSystem
|
|||
|
||||
public GuildPermissions GetGuildPermissions(IUser user)
|
||||
{
|
||||
if (user is IGuildUser gu)
|
||||
return gu.GuildPermissions;
|
||||
if (Channel is SocketGuildChannel gc)
|
||||
return gc.GetUser(user.Id).GuildPermissions;
|
||||
return GuildPermissions.None;
|
||||
|
|
@ -237,6 +239,8 @@ namespace PluralKit.Bot.CommandSystem
|
|||
|
||||
public ChannelPermissions GetChannelPermissions(IUser user)
|
||||
{
|
||||
if (user is IGuildUser gu && Channel is IGuildChannel igc)
|
||||
return gu.GetPermissions(igc);
|
||||
if (Channel is SocketGuildChannel gc)
|
||||
return gc.GetUser(user.Id).GetPermissions(gc);
|
||||
return ChannelPermissions.DM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue