mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
Sort functions
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
5fc593e08b
commit
223d5f8fbf
1 changed files with 2 additions and 2 deletions
|
@ -38,6 +38,8 @@ func formatMessage(tplString string, m *irc.Message, fields map[string]interface
|
|||
}
|
||||
|
||||
func init() {
|
||||
messageFunctions["fixUsername"] = func(username string) string { return strings.TrimLeft(username, "@") }
|
||||
|
||||
messageFunctions["getArg"] = func(m *irc.Message, params ...int) (string, error) {
|
||||
msgParts := strings.Split(m.Trailing(), " ")
|
||||
if len(msgParts) < params[0]+1 {
|
||||
|
@ -64,6 +66,4 @@ func init() {
|
|||
|
||||
return game, err
|
||||
}
|
||||
|
||||
messageFunctions["fixUsername"] = func(username string) string { return strings.TrimLeft(username, "@") }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue