add ping command

This commit is contained in:
lyx0 2021-10-19 22:39:22 +02:00
parent cf4e4b64e4
commit 3f5e24f8a0

14
pkg/commands/ping.go Normal file
View file

@ -0,0 +1,14 @@
package commands
import (
"fmt"
"github.com/lyx0/nourybot/cmd/bot"
)
func Ping(target string, nb *bot.Bot) {
reply := fmt.Sprintf("Pong! :) Last restart: %v", nb.Uptime)
nb.Send(target, reply)
}