// TODO DUPLICATE REMOVE private bool AllowedToRun(BotPermissionType type) { var channelSettings = DatabaseManager.Instance().GetChannelSetting(Context.Message.Channel.Id); if (Context.Message.Author.Id != Program.Owner && !((BotPermissionType)channelSettings?.ChannelPermissionFlags).HasFlag(type)) { #if DEBUG Context.Channel.SendMessageAsync("blocked by perms", false); #endif return(true); } return(false); }
public static bool AllowedToRun(BotPermissionType type, ulong channelId, ulong authorId) { var channelSettings = DatabaseManager.Instance().GetChannelSetting(channelId); return(authorId == Program.ApplicationSetting.Owner || ((BotPermissionType)channelSettings?.ChannelPermissionFlags).HasFlag(type)); }