add seventv command

This commit is contained in:
lyx0 2021-10-24 17:48:00 +02:00
parent 0f8ebc170c
commit 95bab02a0d
2 changed files with 20 additions and 0 deletions

13
pkg/commands/seventv.go Normal file
View file

@ -0,0 +1,13 @@
package commands
import (
"fmt"
"github.com/lyx0/nourybot/cmd/bot"
)
func SevenTV(target, emote string, nb *bot.Bot) {
reply := fmt.Sprintf("https://7tv.app/emotes?query=%s", emote)
nb.Send(target, reply)
}

View file

@ -37,6 +37,13 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
nb.Send(target, "xd")
return
}
case "7tv":
if msgLen == 1 {
nb.Send(target, "Usage: ()7tv [emote]")
return
}
commands.SevenTV(target, cmdParams[1], nb)
return
case "bot":
commands.Help(target, nb)