mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Nuked nsfw from the public bot, it shouldn't show up anymore. Uncommented patron owner check
This commit is contained in:
@@ -4,6 +4,7 @@ using Newtonsoft.Json.Linq;
|
|||||||
|
|
||||||
namespace NadekoBot.Modules.Nsfw;
|
namespace NadekoBot.Modules.Nsfw;
|
||||||
|
|
||||||
|
#if !GLOBAL_NADEKO
|
||||||
[NoPublicBot]
|
[NoPublicBot]
|
||||||
public partial class NSFW : NadekoModule<ISearchImagesService>
|
public partial class NSFW : NadekoModule<ISearchImagesService>
|
||||||
{
|
{
|
||||||
@@ -437,3 +438,4 @@ public partial class NSFW : NadekoModule<ISearchImagesService>
|
|||||||
$"{data.Rating} ({data.Provider}) | {string.Join(" | ", data.Tags.Where(x => !string.IsNullOrWhiteSpace(x)).Take(5))}"));
|
$"{data.Rating} ({data.Provider}) | {string.Join(" | ", data.Tags.Where(x => !string.IsNullOrWhiteSpace(x)).Take(5))}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
@@ -35,6 +35,7 @@ public sealed class PatronageService
|
|||||||
= new($"quota:last_hourly_reset");
|
= new($"quota:last_hourly_reset");
|
||||||
|
|
||||||
private readonly IBotCache _cache;
|
private readonly IBotCache _cache;
|
||||||
|
private readonly IBotCredsProvider _creds;
|
||||||
|
|
||||||
public PatronageService(
|
public PatronageService(
|
||||||
PatronageConfig pConf,
|
PatronageConfig pConf,
|
||||||
@@ -42,7 +43,8 @@ public sealed class PatronageService
|
|||||||
DiscordSocketClient client,
|
DiscordSocketClient client,
|
||||||
ISubscriptionHandler subsHandler,
|
ISubscriptionHandler subsHandler,
|
||||||
IEmbedBuilderService eb,
|
IEmbedBuilderService eb,
|
||||||
IBotCache cache)
|
IBotCache cache,
|
||||||
|
IBotCredsProvider creds)
|
||||||
{
|
{
|
||||||
_pConf = pConf;
|
_pConf = pConf;
|
||||||
_db = db;
|
_db = db;
|
||||||
@@ -50,6 +52,7 @@ public sealed class PatronageService
|
|||||||
_subsHandler = subsHandler;
|
_subsHandler = subsHandler;
|
||||||
_eb = eb;
|
_eb = eb;
|
||||||
_cache = cache;
|
_cache = cache;
|
||||||
|
_creds = creds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task OnReadyAsync()
|
public Task OnReadyAsync()
|
||||||
@@ -495,8 +498,8 @@ public sealed class PatronageService
|
|||||||
if (!confData.IsEnabled)
|
if (!confData.IsEnabled)
|
||||||
return default;
|
return default;
|
||||||
|
|
||||||
// if (_creds.IsOwner(userId))
|
if (_creds.GetCreds().IsOwner(userId))
|
||||||
// return default;
|
return default;
|
||||||
|
|
||||||
// get user tier
|
// get user tier
|
||||||
var patron = await GetPatronAsync(userId);
|
var patron = await GetPatronAsync(userId);
|
||||||
|
Reference in New Issue
Block a user