mirror-nourybot/pkg/commands/currency.go

22 lines
471 B
Go
Raw Normal View History

2022-08-07 17:24:47 +02:00
package commands
import (
"github.com/gempir/go-twitch-irc/v3"
2022-08-08 16:43:40 +02:00
"github.com/lyx0/nourybot/pkg/commands/decapi"
2022-08-07 17:24:47 +02:00
"github.com/lyx0/nourybot/pkg/common"
"go.uber.org/zap"
)
// ()currency 10 USD to EUR
func Currency(target, currAmount, currFrom, currTo string, tc *twitch.Client) {
sugar := zap.NewExample().Sugar()
defer sugar.Sync()
resp, err := decapi.Currency(currAmount, currFrom, currTo)
if err != nil {
sugar.Error(err)
}
common.Send(target, resp, tc)
}