mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
add pingme command
This commit is contained in:
parent
3cf9fd1df9
commit
3efcfd31cc
2 changed files with 17 additions and 0 deletions
14
pkg/commands/pingme.go
Normal file
14
pkg/commands/pingme.go
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
package commands
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/gempir/go-twitch-irc/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Pingme(channel string, user string, client *twitch.Client) {
|
||||||
|
response := fmt.Sprintf("@%s", user)
|
||||||
|
|
||||||
|
client.Say(channel, response)
|
||||||
|
|
||||||
|
}
|
|
@ -118,5 +118,8 @@ func HandleCommand(message twitch.PrivateMessage, twitchClient *twitch.Client, u
|
||||||
twitchClient.Say(message.Channel, "Pleb's can't pyramid FeelsBadMan")
|
twitchClient.Say(message.Channel, "Pleb's can't pyramid FeelsBadMan")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "pingme":
|
||||||
|
commands.Pingme(message.Channel, message.User.DisplayName, twitchClient)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue