diff --git a/pkg/commands/robohash.go b/pkg/commands/robohash.go new file mode 100644 index 0000000..d672011 --- /dev/null +++ b/pkg/commands/robohash.go @@ -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) + +} diff --git a/pkg/handlers/command.go b/pkg/handlers/command.go index c8a40bf..1aa2b1d 100644 --- a/pkg/handlers/command.go +++ b/pkg/handlers/command.go @@ -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]")