mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
comment out spammy commands
This commit is contained in:
parent
bc931a185a
commit
fca2f93e20
|
@ -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"
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
// }
|
||||
|
|
|
@ -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))
|
||||
// }
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue