Skip to content

Commit

Permalink
Simplified if
Browse files Browse the repository at this point in the history
Sometime I look back at my code and wonder, why did I write this abomination
  • Loading branch information
TheTipo01 committed Jan 17, 2021
1 parent 401713e commit 85b56c8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ func playSound(s *discordgo.Session, guildID, channelID, fileName, txtChannel st

for {
if server[guildID].queue[0].segments[server[guildID].queue[0].frame] {
if skip {
skip = false
} else {
skip = true
}
skip = !skip
}

// Read opus frame length from dca file.
Expand Down

0 comments on commit 85b56c8

Please sign in to comment.