comment out spammy commands

This commit is contained in:
lyx0 2021-10-25 18:01:27 +02:00
parent bc931a185a
commit fca2f93e20
6 changed files with 34 additions and 35 deletions

View file

@ -3,7 +3,6 @@ package bot
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
@ -64,7 +63,7 @@ func CheckMessage(text string) (bool, string) {
json.Unmarshal(body, &responseObject)
// {"phrase": "No gyazo allowed"}
reason := responseObject.BanphraseData.Name
// reason := responseObject.BanphraseData.Name
// log.Info("Bancheck: ", responseObject.Banned)
// log.Info("Reason: ", reason)
@ -72,7 +71,7 @@ func CheckMessage(text string) (bool, string) {
// Bad message
if responseObject.Banned {
return true, fmt.Sprintf("Banphrased, reason: %s", reason)
return true, "[Banphrased]"
} else if !responseObject.Banned {
// Good message
return false, "okay"

View file

@ -38,7 +38,7 @@ func main() {
handlers.PrivateMessage(message, nb)
})
nb.TwitchClient.Join("nouryqt", "nourybot")
nb.TwitchClient.Join("nouryqt", "nourybot", "pajlada")
nb.Send("nourybot", "HeyGuys")
nb.TwitchClient.Connect()
}

View file

@ -1,20 +1,20 @@
package commands
import (
"fmt"
// import (
// "fmt"
"github.com/lyx0/nourybot/cmd/bot"
"github.com/lyx0/nourybot/pkg/api/aiden"
log "github.com/sirupsen/logrus"
)
// "github.com/lyx0/nourybot/cmd/bot"
// "github.com/lyx0/nourybot/pkg/api/aiden"
// log "github.com/sirupsen/logrus"
// )
func BttvEmotes(channel string, nb *bot.Bot) {
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/emotes/%s/bttv", channel))
// func BttvEmotes(channel string, nb *bot.Bot) {
// resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/emotes/%s/bttv", channel))
if err != nil {
log.Error(err)
nb.Send(channel, "Something went wrong FeelsBadMan")
}
// if err != nil {
// log.Error(err)
// nb.Send(channel, "Something went wrong FeelsBadMan")
// }
nb.Send(channel, string(resp))
}
// nb.Send(channel, string(resp))
// }

View file

@ -1,20 +1,20 @@
package commands
import (
"fmt"
// import (
// "fmt"
"github.com/lyx0/nourybot/cmd/bot"
"github.com/lyx0/nourybot/pkg/api/aiden"
log "github.com/sirupsen/logrus"
)
// "github.com/lyx0/nourybot/cmd/bot"
// "github.com/lyx0/nourybot/pkg/api/aiden"
// log "github.com/sirupsen/logrus"
// )
func FfzEmotes(channel string, nb *bot.Bot) {
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/emotes/%s/ffz", channel))
// func FfzEmotes(channel string, nb *bot.Bot) {
// resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/emotes/%s/ffz", channel))
if err != nil {
log.Error(err)
nb.Send(channel, "Something went wrong FeelsBadMan")
}
// if err != nil {
// log.Error(err)
// nb.Send(channel, "Something went wrong FeelsBadMan")
// }
nb.Send(channel, string(resp))
}
// nb.Send(channel, string(resp))
// }

View file

@ -3,7 +3,7 @@ package commands
import "github.com/lyx0/nourybot/cmd/bot"
func Help(target string, nb *bot.Bot) {
reply := "Bot made in Go by @Nouryt, Prefix: (), Commands: https://gist.github.com/lyx0/6e326451ed9602157fcf6b5e40fb1dfd"
reply := "Bot made in Go by @Nouryqt, Prefix: (), Commands: https://gist.github.com/lyx0/6e326451ed9602157fcf6b5e40fb1dfd"
nb.Send(target, reply)
}

View file

@ -10,7 +10,7 @@ import (
// commands to the command handler.
func PrivateMessage(message twitch.PrivateMessage, nb *bot.Bot) {
// log.Info("fn PrivateMessage")
log.Info(message.Raw)
// log.Info(message.Raw)
// roomId is the Twitch UserID of the channel the message
// was sent in.
@ -42,6 +42,6 @@ func PrivateMessage(message twitch.PrivateMessage, nb *bot.Bot) {
}
// Message was no command
// log.Info(message)
log.Infof("[#%s]:%s: %s", message.Channel, message.User.DisplayName, message.Message)
}