make echo return more than one word

This commit is contained in:
lyx0 2021-10-15 18:41:02 +02:00
parent 3efcfd31cc
commit 4034999fac
3 changed files with 9 additions and 1 deletions

7
pkg/commands/echo.go Normal file
View file

@ -0,0 +1,7 @@
package commands
import "github.com/gempir/go-twitch-irc/v2"
func Echo(channel string, message string, client *twitch.Client) {
client.Say(channel, message)
}

1
pkg/commands/xd.go Normal file
View file

@ -0,0 +1 @@
package commands

View file

@ -44,7 +44,7 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u
twitchClient.Say(message.Channel, "xd")
return
case "echo":
twitchClient.Say(message.Channel, cmdParams[1])
commands.Echo(message.Channel, message.Message[7:len(message.Message)], twitchClient)
return
case "ping":
commands.Ping(message.Channel, twitchClient, uptime)