add a robohash command

This commit is contained in:
lyx0 2021-10-23 19:05:42 +02:00
parent 8901038416
commit ac5f3af45a
2 changed files with 21 additions and 0 deletions

14
pkg/commands/robohash.go Normal file
View file

@ -0,0 +1,14 @@
package commands
import (
"fmt"
"github.com/gempir/go-twitch-irc/v2"
"github.com/lyx0/nourybot/cmd/bot"
)
func RoboHash(target string, message twitch.PrivateMessage, nb *bot.Bot) {
reply := fmt.Sprintf("https://robohash.org/%s", message.ID)
nb.Send(target, reply)
}

View file

@ -273,6 +273,13 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
commands.RandomXkcd(target, nb)
return
case "robohash":
commands.RoboHash(target, message, nb)
return
case "hash":
commands.RoboHash(target, message, nb)
return
case "subage":
if msgLen < 3 {
nb.Send(target, "Usage: ()subage [user] [streamer]")