mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
20 lines
472 B
Go
20 lines
472 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/lyx0/nourybot/cmd/bot"
|
|
"github.com/lyx0/nourybot/pkg/humanize"
|
|
"github.com/lyx0/nourybot/pkg/utils"
|
|
)
|
|
|
|
// Ping responds with Pong and basic information about the bot.
|
|
func Ping(target string, nb *bot.Bot) {
|
|
commandCount := fmt.Sprint(utils.GetCommandsUsed())
|
|
botUptime := humanize.Time(nb.Uptime)
|
|
|
|
reply := fmt.Sprintf("Pong! :) Commands used: %v, Last restart: %v", commandCount, botUptime)
|
|
|
|
nb.Send(target, reply)
|
|
}
|