add random number generator over range

This commit is contained in:
lyx0 2021-10-16 18:24:15 +02:00
parent c0634115c1
commit 33e95eed13

View file

@ -49,6 +49,10 @@ func GenerateRandomNumber(max int) int {
return rand.Intn(max) return rand.Intn(max)
} }
func GenerateRandomNumberRange(min int, max int) int {
return (rand.Intn(max-min) + min)
}
// ElevatedPrivsMessage is checking a given message twitch.PrivateMessage // ElevatedPrivsMessage is checking a given message twitch.PrivateMessage
// if it came from a moderator/vip/or broadcaster and returns a bool // if it came from a moderator/vip/or broadcaster and returns a bool
func ElevatedPrivsMessage(message twitch.PrivateMessage) bool { func ElevatedPrivsMessage(message twitch.PrivateMessage) bool {