mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 19:57:23 +01:00
check for admin/mod after checking for null, duh
This commit is contained in:
parent
19e5dd615d
commit
b0daf50725
1 changed files with 2 additions and 1 deletions
|
|
@ -136,7 +136,6 @@ public class MareModule : InteractionModuleBase
|
|||
|
||||
var self = await db.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(u => u.DiscordId == id).ConfigureAwait(false);
|
||||
ulong userToCheckForDiscordId = id;
|
||||
bool isAdminCall = self.User.IsModerator || self.User.IsAdmin;
|
||||
|
||||
if (self == null)
|
||||
{
|
||||
|
|
@ -145,6 +144,8 @@ public class MareModule : InteractionModuleBase
|
|||
return eb;
|
||||
}
|
||||
|
||||
bool isAdminCall = self.User.IsModerator || self.User.IsAdmin;
|
||||
|
||||
if ((optionalUser != null || uid != null) && !isAdminCall)
|
||||
{
|
||||
eb.WithTitle("Unauthorized");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue