check for admin/mod after checking for null, duh
This commit is contained in:
@@ -136,7 +136,6 @@ public class MareModule : InteractionModuleBase
|
|||||||
|
|
||||||
var self = await db.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(u => u.DiscordId == id).ConfigureAwait(false);
|
var self = await db.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(u => u.DiscordId == id).ConfigureAwait(false);
|
||||||
ulong userToCheckForDiscordId = id;
|
ulong userToCheckForDiscordId = id;
|
||||||
bool isAdminCall = self.User.IsModerator || self.User.IsAdmin;
|
|
||||||
|
|
||||||
if (self == null)
|
if (self == null)
|
||||||
{
|
{
|
||||||
@@ -145,6 +144,8 @@ public class MareModule : InteractionModuleBase
|
|||||||
return eb;
|
return eb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isAdminCall = self.User.IsModerator || self.User.IsAdmin;
|
||||||
|
|
||||||
if ((optionalUser != null || uid != null) && !isAdminCall)
|
if ((optionalUser != null || uid != null) && !isAdminCall)
|
||||||
{
|
{
|
||||||
eb.WithTitle("Unauthorized");
|
eb.WithTitle("Unauthorized");
|
||||||
|
|||||||
Reference in New Issue
Block a user