From b9d7dcbeeac513345ffbbd4752acd2dfa953d8e7 Mon Sep 17 00:00:00 2001 From: lyx0 Date: Thu, 14 Oct 2021 18:55:07 +0200 Subject: [PATCH] rename Ping command --- pkg/commands/ping.go | 3 +-- pkg/handlers/command.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/commands/ping.go b/pkg/commands/ping.go index d86dad3..e8b84c5 100644 --- a/pkg/commands/ping.go +++ b/pkg/commands/ping.go @@ -7,9 +7,8 @@ import ( "github.com/lyx0/nourybot/pkg/utils" ) -func PingCommand(channel string, client *twitch.Client) { +func Ping(channel string, client *twitch.Client) { commandCount := fmt.Sprint(utils.GetCommandsUsed()) - s := fmt.Sprintf("Pong! :) Commands used: %v", commandCount) client.Say(channel, s) } diff --git a/pkg/handlers/command.go b/pkg/handlers/command.go index 41e4bac..036878a 100644 --- a/pkg/handlers/command.go +++ b/pkg/handlers/command.go @@ -46,6 +46,6 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client) { twitchClient.Say(message.Channel, cmdParams[1]) return case "ping": - commands.PingCommand(message.Channel, twitchClient) + commands.Ping(message.Channel, twitchClient) } }