Update probability of replying to a message from 1/10 to 1/100
This commit is contained in:
4
main.go
4
main.go
@ -215,8 +215,8 @@ func onMessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
"kao172",
|
"kao172",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Have a 1/10 chance of replying to a message if written by a user in allowedUsers
|
// Have a 1/100 chance of replying to a message if written by a user in allowedUsers
|
||||||
randInt := rand.Intn(10)
|
randInt := rand.Intn(100)
|
||||||
log.Println("Random number:", randInt)
|
log.Println("Random number:", randInt)
|
||||||
log.Println("Mentions:", m.Mentions)
|
log.Println("Mentions:", m.Mentions)
|
||||||
if len(m.Mentions) == 0 && randInt == 4 {
|
if len(m.Mentions) == 0 && randInt == 4 {
|
||||||
|
Reference in New Issue
Block a user