mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
add ping command
This commit is contained in:
parent
cf4e4b64e4
commit
3f5e24f8a0
1 changed files with 14 additions and 0 deletions
14
pkg/commands/ping.go
Normal file
14
pkg/commands/ping.go
Normal 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)
|
||||
}
|
Loading…
Reference in a new issue