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:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user