mirror-nourybot/internal/commands/tweet.go
2023-01-04 15:32:17 +01:00

21 lines
407 B
Go

package commands
import (
"github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap"
)
func Tweet(target, username string, tc *twitch.Client) {
sugar := zap.NewExample().Sugar()
defer sugar.Sync()
resp, err := decapi.Tweet(username)
if err != nil {
sugar.Error(err)
}
common.Send(target, resp, tc)
}