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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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