From 9f445c0866993f1d8c6c465c34a010502342a8b0 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 18 Jun 2022 10:29:33 +0200 Subject: [PATCH] Fixed a patron bug which didn't let patrons execute patron commands in non-patron servers --- .../Modules/Utility/Patronage/PatronageService.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs b/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs index f1684730f..32035ebe1 100644 --- a/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs +++ b/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs @@ -3,6 +3,7 @@ using LinqToDB.EntityFrameworkCore; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Db.Models; using OneOf; +using OneOf.Types; using StackExchange.Redis; using CommandInfo = Discord.Commands.CommandInfo; @@ -500,8 +501,8 @@ public sealed class PatronageService if (!confData.IsEnabled) return default; - if (_creds.IsOwner(userId)) - return default; + // if (_creds.IsOwner(userId)) + // return default; // get user tier var patron = await GetPatronAsync(userId); @@ -558,7 +559,9 @@ public sealed class PatronageService data.TryGetValue(QuotaPer.PerMonth, out var monthly) ? monthly : null ); - return quotaCheckResult.Match(_ => default, x => x); + return quotaCheckResult.Match>( + _ => new Success(), + x => x); } private bool TryGetTierDataOrLower(