1
0
mirror of https://github.com/stryan/mumble-discord-bridge.git synced 2024-11-23 05:45:41 -05:00

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

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