mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
add commands
This commit is contained in:
parent
1919c3eb3c
commit
2ded1bc9ed
|
@ -37,6 +37,8 @@ func (l *logCommand) insert(nb *bot.Bot, commandName, name, channel, id, text st
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InsertCommand is called on every message that invokes a command
|
||||||
|
// and inserts the message and command details into the database.
|
||||||
func InsertCommand(nb *bot.Bot, commandName, name, channel, id, text string) {
|
func InsertCommand(nb *bot.Bot, commandName, name, channel, id, text string) {
|
||||||
err := (&logCommand{}).insert(nb, commandName, name, channel, id, text)
|
err := (&logCommand{}).insert(nb, commandName, name, channel, id, text)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -35,6 +35,8 @@ func (l *logMessage) insert(nb *bot.Bot, name, channel, id, text string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InsertMessage is called on every message and logs message details
|
||||||
|
// into the database.
|
||||||
func InsertMessage(nb *bot.Bot, name, channel, id, text string) {
|
func InsertMessage(nb *bot.Bot, name, channel, id, text string) {
|
||||||
err := (&logMessage{}).insert(nb, name, channel, id, text)
|
err := (&logMessage{}).insert(nb, name, channel, id, text)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue