mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
add debug command for commands
This commit is contained in:
parent
3d488ee373
commit
10bd7c0342
|
@ -169,7 +169,7 @@ func (app *application) DebugCommand(name string, message twitch.PrivateMessage)
|
|||
} else if cmd.Category == "ascii" {
|
||||
// If the command is in the ascii category don't post the Text field
|
||||
// otherwise it becomes too spammy and won't fit in the max message length.
|
||||
reply := fmt.Sprintf("ID %v: Name %v, Level: %v, Category: %v Help: %v",
|
||||
reply := fmt.Sprintf("id=%v\nname=%v\nlevel=%v\ncategory=%v\nhelp=%v\n",
|
||||
cmd.ID,
|
||||
cmd.Name,
|
||||
cmd.Level,
|
||||
|
@ -177,10 +177,11 @@ func (app *application) DebugCommand(name string, message twitch.PrivateMessage)
|
|||
cmd.Help,
|
||||
)
|
||||
|
||||
app.Send(message.Channel, reply)
|
||||
//app.Send(message.Channel, reply)
|
||||
app.SendEmail(fmt.Sprintf("DEBUG for command %s", name), reply)
|
||||
return
|
||||
} else {
|
||||
reply := fmt.Sprintf("ID %v: Name %v, Level: %v, Category: %v, Text: %v, Help: %v",
|
||||
reply := fmt.Sprintf("id=%v\nname=%v\nlevel=%v\ncategory=%v\ntext=%v\nhelp=%v\n",
|
||||
cmd.ID,
|
||||
cmd.Name,
|
||||
cmd.Level,
|
||||
|
@ -189,7 +190,8 @@ func (app *application) DebugCommand(name string, message twitch.PrivateMessage)
|
|||
cmd.Help,
|
||||
)
|
||||
|
||||
app.Send(message.Channel, reply)
|
||||
//app.Send(message.Channel, reply)
|
||||
app.SendEmail(fmt.Sprintf("DEBUG for command %s", name), reply)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,6 +140,8 @@ func (app *application) handleCommand(message twitch.PrivateMessage) {
|
|||
switch cmdParams[1] {
|
||||
case "user":
|
||||
app.DebugUser(cmdParams[2], message)
|
||||
case "command":
|
||||
app.DebugCommand(cmdParams[2], message)
|
||||
}
|
||||
|
||||
case "command":
|
||||
|
|
Loading…
Reference in a new issue