Updated Permissions module
This commit is contained in:
parent
a4adabb3ea
commit
888994dd67
10 changed files with 16 additions and 18 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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 { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue