Clean up comments
This commit is contained in:
parent
cf2ddc4741
commit
a5ad0095f2
7
main.go
7
main.go
@ -14,8 +14,6 @@ import (
|
|||||||
"github.com/javif89/dotenv"
|
"github.com/javif89/dotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
// var commandPrefix string = "!"
|
|
||||||
|
|
||||||
var commandHandlers = map[string]func(s *dg.Session, i *dg.InteractionCreate){
|
var commandHandlers = map[string]func(s *dg.Session, i *dg.InteractionCreate){
|
||||||
"play": playCommand,
|
"play": playCommand,
|
||||||
}
|
}
|
||||||
@ -36,7 +34,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
discord.AddHandler(ready)
|
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
|
discord.Identify.Intents = dg.IntentsGuilds | dg.IntentsGuildMessages | dg.IntentsGuildVoiceStates
|
||||||
|
|
||||||
@ -158,7 +155,6 @@ func playOnVoiceChannel(voiceChannel *dg.VoiceConnection) {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// log.Printf("Read packet: %d bytes", n)
|
|
||||||
packets = append(packets, p[:n])
|
packets = append(packets, p[:n])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +162,6 @@ func playOnVoiceChannel(voiceChannel *dg.VoiceConnection) {
|
|||||||
|
|
||||||
log.Printf("bytes sent = %d", bytes_sent)
|
log.Printf("bytes sent = %d", bytes_sent)
|
||||||
log.Printf("Took %s seconds to run", elapsedTime)
|
log.Printf("Took %s seconds to run", elapsedTime)
|
||||||
// log.Printf("Bytes/Sec = %s", elapsedTime)
|
|
||||||
|
|
||||||
voiceChannel.Speaking(true)
|
voiceChannel.Speaking(true)
|
||||||
time.Sleep(time.Second * 2)
|
time.Sleep(time.Second * 2)
|
||||||
@ -177,7 +172,7 @@ func playOnVoiceChannel(voiceChannel *dg.VoiceConnection) {
|
|||||||
for _, p := range packets {
|
for _, p := range packets {
|
||||||
log.Printf("Sending packet: %d bytes", len(p))
|
log.Printf("Sending packet: %d bytes", len(p))
|
||||||
bytes_sent += len(p)
|
bytes_sent += len(p)
|
||||||
// packets_sent := packets_sent + p
|
|
||||||
voiceChannel.OpusSend <- p
|
voiceChannel.OpusSend <- p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user