Web Interface improvements and bug fixes

- Added button for random sounds to each category
- Visual improvements on category separation and a lot more (thanks, Pixeljockey)
- Crash bug fix on playing random sounds with commands without soundnames
This commit is contained in:
da
2017-02-02 17:29:11 +01:00
parent 56c0949507
commit 8b2a052422
37 changed files with 32523 additions and 9 deletions
+10 -4
View File
@@ -281,10 +281,15 @@ func enqueuePlay(user *discordgo.User, guild *discordgo.Guild, coll *SoundCollec
if play == nil {
return
}
log.WithFields(log.Fields{
"user": user,
}).Info(user.Username + " triggered sound playback of \"!" + coll.Prefix + " " + sound.Name + "\" for server " + guild.Name + " in channel " + play.ChannelID)
if sound != nil {
log.WithFields(log.Fields{
"user": user,
}).Info(user.Username + " triggered sound playback of !" + coll.Prefix + " " + sound.Name + " for server " + guild.Name + " in channel " + play.ChannelID)
} else {
log.WithFields(log.Fields{
"user": user,
}).Info(user.Username + " triggered sound playback of !" + coll.Prefix + " for server " + guild.Name + " in channel " + play.ChannelID)
}
// Check if we already have a connection to this guild
// this should be threadsafe
mutex.Lock()
@@ -548,6 +553,7 @@ func findSoundAndCollection(command string, soundname string) (*Sound, *SoundCol
return s, c
}
}
return nil, c
}
}
return nil, nil