Prechádzať zdrojové kódy

Set bot to deaf when connecting

This prevents a udp listener from starting which
is entirely unneeded for this type of bot.
Bruce Marriner 8 rokov pred
rodič
commit
77d4767481
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      examples/airhorn/main.go

+ 1 - 1
examples/airhorn/main.go

@@ -157,7 +157,7 @@ func loadSound() error {
 // playSound plays the current buffer to the provided channel.
 func playSound(s *discordgo.Session, guildID, channelID string) (err error) {
 	// Join the provided voice channel.
-	vc, err := s.ChannelVoiceJoin(guildID, channelID, false, false)
+	vc, err := s.ChannelVoiceJoin(guildID, channelID, false, true)
 	if err != nil {
 		return err
 	}