From 8598419c5f63cc26840346d20ca40329998172d3 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Fri, 13 Dec 2024 08:22:13 +0000 Subject: [PATCH] fix: .dmcmd will now correctly block commands in dms, not globally change: timely will no longer require guild context, as dmcmd .timely will do the same thing --- src/NadekoBot/Modules/Gambling/Gambling.cs | 1 - .../Permissions/GlobalPermissions/GlobalPermissionService.cs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 09cefdbcb..5a9c52b0b 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -135,7 +135,6 @@ public partial class Gambling : GamblingModule }); [Cmd] - [RequireContext(ContextType.Guild)] public async Task Timely() { var val = Config.Timely.Amount; diff --git a/src/NadekoBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs b/src/NadekoBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs index 43cafc176..1afa801ff 100644 --- a/src/NadekoBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs +++ b/src/NadekoBot/Modules/Permissions/GlobalPermissions/GlobalPermissionService.cs @@ -92,13 +92,13 @@ public class GlobalPermissionService : IExecPreCommand, INService { if (priv) { - if (bs.Blocked.Commands.Add(commandName)) + if (bs.DmBlocked.Commands.Add(commandName)) { added = true; } else { - bs.Blocked.Commands.Remove(commandName); + bs.DmBlocked.Commands.Remove(commandName); added = false; }