From 49dfac514d21b1c69bc9628b2e1c804991ca570d Mon Sep 17 00:00:00 2001 From: Violet Scheen Date: Tue, 3 Oct 2023 23:22:20 -0400 Subject: [PATCH] Update discord.go --- discord.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord.go b/discord.go index 9246e14..f6c5433 100644 --- a/discord.go +++ b/discord.go @@ -551,6 +551,10 @@ func (d *DiscordDaemon) cmdInvite(s *dg.Session, i *dg.InteractionCreate, lang s // expmin = mins //} // Need to check whether requestor is linked to the admin account *possibly add Admin bool to DiscordUser struct + requestoremail := GetEmailsKey(requestor.JfID) + if !requestoremail.admin { + d.app.err.Printf("User is not admin") + } // variation of app.GenerateInvite, some parts commented to potentially add back in later with the other options //d.app.debug.Println("Generating new invite with options: %s: %i: %s: %s", invuser, expmin, profile, label) currentTime := time.Now()