Updated Permissions module

This commit is contained in:
Toastie (DCS Team) 2024-06-26 22:20:28 +12:00
parent a4adabb3ea
commit 888994dd67
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
10 changed files with 16 additions and 18 deletions

View file

@ -1,4 +1,4 @@
#nullable disable #nullable disable
using EllieBot.Modules.Permissions.Services; using EllieBot.Modules.Permissions.Services;
using EllieBot.Db.Models; using EllieBot.Db.Models;

View file

@ -1,4 +1,4 @@
#nullable disable #nullable disable
namespace EllieBot.Modules.Permissions.Services; namespace EllieBot.Modules.Permissions.Services;
public readonly struct ServerFilterSettings public readonly struct ServerFilterSettings

View file

@ -1,4 +1,4 @@
#nullable disable #nullable disable
using EllieBot.Common.ModuleBehaviors; using EllieBot.Common.ModuleBehaviors;
namespace EllieBot.Modules.Permissions.Services; namespace EllieBot.Modules.Permissions.Services;

View file

@ -1,4 +1,4 @@
#nullable disable #nullable disable
using EllieBot.Db.Models; using EllieBot.Db.Models;
namespace EllieBot.Modules.Permissions.Common; namespace EllieBot.Modules.Permissions.Common;

View file

@ -1,4 +1,4 @@
#nullable disable #nullable disable
using EllieBot.Db.Models; using EllieBot.Db.Models;
namespace EllieBot.Modules.Permissions.Common; namespace EllieBot.Modules.Permissions.Common;

View file

@ -1,4 +1,4 @@
#nullable disable #nullable disable
namespace EllieBot.Modules.Permissions.Common; namespace EllieBot.Modules.Permissions.Common;
public class PermissionsCollection<T> : IndexedCollection<T> public class PermissionsCollection<T> : IndexedCollection<T>

View file

@ -149,8 +149,7 @@ public class PermissionService : IExecPreCommand, IEService
returnMsg = "You need Admin permissions in order to use permission commands."; returnMsg = "You need Admin permissions in order to use permission commands.";
if (pc.Verbose) if (pc.Verbose)
{ {
try try { await _sender.Response(channel).Error(returnMsg).SendAsync(); }
{ await _sender.Response(channel).Error(returnMsg).SendAsync(); }
catch { } catch { }
} }
@ -162,8 +161,7 @@ public class PermissionService : IExecPreCommand, IEService
returnMsg = $"You need the {Format.Bold(role.Name)} role in order to use permission commands."; returnMsg = $"You need the {Format.Bold(role.Name)} role in order to use permission commands.";
if (pc.Verbose) if (pc.Verbose)
{ {
try try { await _sender.Response(channel).Error(returnMsg).SendAsync(); }
{ await _sender.Response(channel).Error(returnMsg).SendAsync(); }
catch { } catch { }
} }