mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
restrict echo
This commit is contained in:
parent
3a8cf5c97c
commit
eb674712e0
|
@ -62,14 +62,10 @@ func CheckMessage(text string) (bool, string) {
|
|||
var responseObject banphraseResponse
|
||||
json.Unmarshal(body, &responseObject)
|
||||
|
||||
// Bad Message
|
||||
//
|
||||
// {"phrase": "No gyazo allowed"}
|
||||
// reason := responseObject.BanphraseData.Name
|
||||
|
||||
// log.Info("Bancheck: ", responseObject.Banned)
|
||||
// log.Info("Reason: ", reason)
|
||||
// log.Info("Bancheck: ", responseObject.Banned)
|
||||
|
||||
// Bad message
|
||||
if responseObject.Banned {
|
||||
return true, "[Banphrased]"
|
||||
} else if !responseObject.Banned {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// Pingme pings a user.
|
||||
func Pingme(channel, user string, nb *bot.Bot) {
|
||||
response := fmt.Sprintf("@%s", user)
|
||||
response := fmt.Sprintf("🔔 @%s 🔔", user)
|
||||
|
||||
nb.Send(channel, response)
|
||||
}
|
||||
|
|
|
@ -128,8 +128,13 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
|
|||
return
|
||||
|
||||
case "echo":
|
||||
if message.User.ID != "31437432" {
|
||||
nb.Send(target, "You're not authorized to do this.")
|
||||
return
|
||||
} else {
|
||||
commands.Echo(target, message.Message[7:len(message.Message)], nb)
|
||||
return
|
||||
}
|
||||
|
||||
case "emote":
|
||||
commands.EmoteLookup(target, cmdParams[1], nb)
|
||||
|
@ -152,7 +157,10 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
|
|||
// return
|
||||
|
||||
case "fill":
|
||||
if msgLen == 1 {
|
||||
if message.User.ID != "31437432" {
|
||||
nb.Send(target, "You're not authorized to do this.")
|
||||
return
|
||||
} else if msgLen == 1 {
|
||||
nb.Send(target, "Usage: ()fill [emote]")
|
||||
return
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue