diff --git a/main.go b/main.go index 03277bd..3e10a43 100644 --- a/main.go +++ b/main.go @@ -14,8 +14,6 @@ import ( "github.com/javif89/dotenv" ) -// var commandPrefix string = "!" - var commandHandlers = map[string]func(s *dg.Session, i *dg.InteractionCreate){ "play": playCommand, } @@ -36,7 +34,6 @@ func main() { } discord.AddHandler(ready) - // discord.AddHandler(handleCommand) // This will receive an event when a message is sent discord.Identify.Intents = dg.IntentsGuilds | dg.IntentsGuildMessages | dg.IntentsGuildVoiceStates @@ -158,7 +155,6 @@ func playOnVoiceChannel(voiceChannel *dg.VoiceConnection) { log.Fatal(err) } - // log.Printf("Read packet: %d bytes", n) packets = append(packets, p[:n]) } @@ -166,7 +162,6 @@ func playOnVoiceChannel(voiceChannel *dg.VoiceConnection) { log.Printf("bytes sent = %d", bytes_sent) log.Printf("Took %s seconds to run", elapsedTime) - // log.Printf("Bytes/Sec = %s", elapsedTime) voiceChannel.Speaking(true) time.Sleep(time.Second * 2) @@ -177,7 +172,7 @@ func playOnVoiceChannel(voiceChannel *dg.VoiceConnection) { for _, p := range packets { log.Printf("Sending packet: %d bytes", len(p)) bytes_sent += len(p) - // packets_sent := packets_sent + p + voiceChannel.OpusSend <- p }