Update discord.go

This commit is contained in:
Violet Scheen 2023-10-03 23:59:42 -04:00 committed by GitHub
parent b595d3ea03
commit dd93758b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -551,8 +551,11 @@ 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 := d.app.storage.GetEmailsKey(requestor.JellyfinID)
if !requestoremail.admin {
requestoremail, ok := d.app.storage.GetEmailsKey(requestor.JellyfinID)
if !ok {
d.app.err.Printf("Failed to verify admin")
}
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