From 60068b71759d66b2f009188b5679db1e07420339 Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Sat, 6 Nov 2021 21:03:03 +0100 Subject: [PATCH] add xset command --- pkg/commands/xset.go | 9 +++++++++ pkg/handlers/command.go | 20 ++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 pkg/commands/xset.go diff --git a/pkg/commands/xset.go b/pkg/commands/xset.go new file mode 100644 index 0000000..b1f9d58 --- /dev/null +++ b/pkg/commands/xset.go @@ -0,0 +1,9 @@ +package commands + +import "github.com/lyx0/nourybot/cmd/bot" + +func Xset(target string, nb *bot.Bot) { + reply := "xset r rate 175 50" + + nb.Send(target, reply) +} diff --git a/pkg/handlers/command.go b/pkg/handlers/command.go index 14d4d56..bc4bf50 100644 --- a/pkg/handlers/command.go +++ b/pkg/handlers/command.go @@ -408,7 +408,7 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) { } case "streamlink": - if message.Channel == "nouryqt" || message.Channel == "nourybot" { + if target == "nouryqt" || target == "nourybot" { commands.Streamlink(target, nb) return } else { @@ -416,7 +416,7 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) { } case "streamlinkconfig": - if message.Channel == "nouryqt" || message.Channel == "nourybot" { + if target == "nouryqt" || target == "nourybot" { commands.Streamlink(target, nb) return } else { @@ -502,5 +502,21 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) { case "xkcd": commands.Xkcd(target, nb) return + + case "rave": + if target == "nouryqt" || target == "nourybot" { + commands.Rave(target, nb) + return + } else { + return + } + + case "xset": + if target == "nouryqt" || target == "nourybot" { + commands.Xset(target, nb) + return + } else { + return + } } }