From f1f59116b5af9b97bb7a85c60e98612e75f13995 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 3 Jan 2021 20:25:51 -0500 Subject: [PATCH] don't try to send message before we connect to mumble --- handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers.go b/handlers.go index 482ec08..376fc06 100644 --- a/handlers.go +++ b/handlers.go @@ -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