mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
23 lines
321 B
Go
23 lines
321 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/lyx0/nourybot/pkg/common"
|
|
)
|
|
|
|
// Coinflip returns either "Heads!" or "Tails!"
|
|
func Coinflip() string {
|
|
flip := common.GenerateRandomNumber(2)
|
|
var reply string
|
|
|
|
switch flip {
|
|
case 0:
|
|
reply = "Heads!"
|
|
case 1:
|
|
reply = "Tails!"
|
|
default:
|
|
reply = "Heads!"
|
|
}
|
|
|
|
return reply
|
|
}
|