This commit is contained in:
lyx0 2024-02-20 22:36:33 +01:00
parent 8e432a5ee0
commit 9377bcf897
23 changed files with 9 additions and 9 deletions

View file

@ -6,8 +6,8 @@ import (
"strings"
"github.com/gempir/go-twitch-irc/v4"
"github.com/lyx0/nourybot/internal/commands"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/pkg/commands"
"github.com/lyx0/nourybot/pkg/common"
"github.com/lyx0/nourybot/pkg/ivr"
"github.com/lyx0/nourybot/pkg/lastfm"
"github.com/lyx0/nourybot/pkg/owm"
@ -99,11 +99,11 @@ func (app *application) handleCommand(message twitch.PrivateMessage) {
case "cf":
reply = commands.Coinflip()
// ()currency <amount> <input currency> to <output currency>
case "currency":
if msgLen < 4 {
reply = "Not enough arguments provided. Usage: ()currency 10 USD to EUR"
} else {
// ()currency <amount> <input currency> to <output currency>
reply, _ = commands.Currency(cmdParams[1], cmdParams[2], cmdParams[4])
}

View file

@ -13,8 +13,8 @@ import (
"github.com/jakecoffman/cron"
"github.com/joho/godotenv"
_ "github.com/lib/pq"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/common"
"github.com/nicklaw5/helix/v2"
"go.uber.org/zap"

View file

@ -12,8 +12,8 @@ import (
"sort"
"github.com/julienschmidt/httprouter"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/common"
"github.com/lyx0/nourybot/pkg/ivr"
"github.com/nicklaw5/helix/v2"
)

View file

@ -1,7 +1,7 @@
package commands
import (
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/pkg/common"
)
func Coinflip() string {

View file

@ -3,7 +3,7 @@ package commands
import (
"fmt"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/pkg/common"
"github.com/lyx0/nourybot/pkg/humanize"
)

View file

@ -3,7 +3,7 @@ package commands
import (
"fmt"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/pkg/common"
)
func Preview(channel string) string {

View file

@ -6,7 +6,7 @@ import (
"io"
"net/http"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/pkg/common"
)
type xkcdResponse struct {