add commands

This commit is contained in:
lyx0 2021-10-23 21:59:56 +02:00
parent f9c326cc96
commit 337d0f3fec
3 changed files with 40 additions and 0 deletions

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

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

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

@ -0,0 +1,13 @@
package commands
import (
"fmt"
"github.com/lyx0/nourybot/cmd/bot"
)
func Ffz(target string, emote string, nb *bot.Bot) {
reply := fmt.Sprintf("https://www.frankerfacez.com/emoticons/?q=%s", emote)
nb.Send(target, reply)
}

View file

@ -46,6 +46,13 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
return
}
case "bttv":
if msgLen == 1 {
nb.Send(target, "Usage: ()bttv [emote]")
return
}
commands.Bttv(target, cmdParams[1], nb)
return
case "bttvemotes":
commands.BttvEmotes(target, nb)
return
@ -92,6 +99,12 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
case "emotelookup":
commands.EmoteLookup(target, cmdParams[1], nb)
case "ffz":
if msgLen == 1 {
nb.Send(target, "Usage: ()ffz [emote]")
return
}
commands.Ffz(target, cmdParams[1], nb)
case "ffzemotes":
commands.FfzEmotes(target, nb)
return
@ -277,6 +290,7 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
commands.RandomQuote(target, cmdParams[1], cmdParams[2], nb)
return
}
case "randomxkcd":
commands.RandomXkcd(target, nb)
return