mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
add a robohash command
This commit is contained in:
parent
8901038416
commit
ac5f3af45a
2 changed files with 21 additions and 0 deletions
14
pkg/commands/robohash.go
Normal file
14
pkg/commands/robohash.go
Normal 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)
|
||||
|
||||
}
|
|
@ -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]")
|
||||
|
|
Loading…
Reference in a new issue