mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
add limitations for join and part command
This commit is contained in:
parent
10397e3adc
commit
bda8dde069
1 changed files with 9 additions and 0 deletions
|
@ -142,13 +142,22 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "join":
|
case "join":
|
||||||
|
if msgLen == 1 || message.User.ID != "31437432" {
|
||||||
|
nb.Send(target, "You are not allowed to do this")
|
||||||
|
return
|
||||||
|
}
|
||||||
db.AddChannel(cmdParams[1], nb.MongoClient)
|
db.AddChannel(cmdParams[1], nb.MongoClient)
|
||||||
nb.Send(message.Channel, "Joined")
|
nb.Send(message.Channel, "Joined")
|
||||||
return
|
return
|
||||||
|
|
||||||
case "part":
|
case "part":
|
||||||
|
if msgLen == 1 || message.User.ID != "31437432" {
|
||||||
|
nb.Send(target, "You are not allowed to do this")
|
||||||
|
return
|
||||||
|
}
|
||||||
db.PartChannel(cmdParams[1], nb.MongoClient)
|
db.PartChannel(cmdParams[1], nb.MongoClient)
|
||||||
nb.Send(message.Channel, "Parted")
|
nb.Send(message.Channel, "Parted")
|
||||||
|
return
|
||||||
|
|
||||||
case "firstline":
|
case "firstline":
|
||||||
if msgLen == 1 {
|
if msgLen == 1 {
|
||||||
|
|
Loading…
Reference in a new issue