From ecbf931aac1f19aa398fb33e5da605daea25756f Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Sat, 6 Nov 2021 20:58:36 +0100 Subject: [PATCH] add streamlink command --- pkg/commands/streamlink.go | 9 +++++++++ pkg/handlers/command.go | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 pkg/commands/streamlink.go diff --git a/pkg/commands/streamlink.go b/pkg/commands/streamlink.go new file mode 100644 index 0000000..2c2ffd0 --- /dev/null +++ b/pkg/commands/streamlink.go @@ -0,0 +1,9 @@ +package commands + +import "github.com/lyx0/nourybot/cmd/bot" + +func Streamlink(target string, nb *bot.Bot) { + reply := `https://haste.zneix.eu/udajirixep put this in ~/.config/streamlink/config on Linux (or %appdata%\streamlink\streamlinkrc on Windows)` + + nb.Send(target, reply) +} diff --git a/pkg/handlers/command.go b/pkg/handlers/command.go index 4361760..14d4d56 100644 --- a/pkg/handlers/command.go +++ b/pkg/handlers/command.go @@ -152,6 +152,14 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) { return } + case "farming": + if target != "nouryqt" { + return + } else { + commands.Farm(target, nb) + return + } + case "ffz": if msgLen == 1 { nb.Send(target, "Usage: ()ffz [emote]") @@ -399,6 +407,22 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) { return } + case "streamlink": + if message.Channel == "nouryqt" || message.Channel == "nourybot" { + commands.Streamlink(target, nb) + return + } else { + return + } + + case "streamlinkconfig": + if message.Channel == "nouryqt" || message.Channel == "nourybot" { + commands.Streamlink(target, nb) + return + } else { + return + } + case "thumb": if msgLen == 1 { nb.Send(target, "Usage: ()thumb [channel]")