don't try to send message before we connect to mumble

This commit is contained in:
stryan 2021-01-03 20:25:51 -05:00
parent a86586ba57
commit f1f59116b5
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ func voiceUpdate(s *discordgo.Session, event *discordgo.VoiceStateUpdate) {
u, err := s.User(event.UserID)
if err != nil {
log.Printf("error looking up user for uid %v", event.UserID)
} else {
} else if Bridge.Connected {
Bridge.CurrentChannel.Send(fmt.Sprintf("%v has joined Discord channel\n", u.Username), false)
}
Bridge.DiscordUserCount = Bridge.DiscordUserCount + 1