check for admin/mod after checking for null, duh

This commit is contained in:
rootdarkarchon
2022-10-20 15:32:32 +02:00
parent 19e5dd615d
commit b0daf50725

View File

@@ -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");