mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 14:57:54 +00:00
feat: async cache
this breaks logging bot permissions to Sentry. we haven't had a need to check those recently (permissions issues were because of broken cache), so this is fine for now this should be re-added in the future though
This commit is contained in:
parent
45258d519e
commit
e7f36eb31f
24 changed files with 134 additions and 126 deletions
|
|
@ -196,10 +196,10 @@ namespace PluralKit.Bot
|
|||
public static string EventType(this IGatewayEvent evt) =>
|
||||
evt.GetType().Name.Replace("Event", "");
|
||||
|
||||
public static bool HasReactionPermissions(Context ctx)
|
||||
public static async Task<bool> HasReactionPermissions(Context ctx)
|
||||
{
|
||||
var neededPermissions = PermissionSet.AddReactions | PermissionSet.ReadMessageHistory;
|
||||
return ((ctx.BotPermissions & neededPermissions) == neededPermissions);
|
||||
return ((await ctx.BotPermissions & neededPermissions) == neededPermissions);
|
||||
}
|
||||
|
||||
public static bool IsValidGuildChannel(Channel channel) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue