vol not over 100 pls
Jes Olson j3s@c3f.net
Mon, 07 Mar 2022 21:44:37 -0500
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
main.go
→
main.go
@@ -8,8 +8,8 @@ "os"
"path/filepath" "regexp" "sort" - "strings" "strconv" + "strings" "github.com/kkdai/youtube/v2" "layeh.com/gumble/gumble"@@ -68,6 +68,9 @@ vol := r.FindString(e.Message)
vol64, _ := strconv.ParseFloat(vol, 32) vol32 := float32(vol64) truevol := vol32 / 100.0 + if truevol > 100 { + return + } stream.Volume = truevol return }