mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
refactor
This commit is contained in:
parent
8e432a5ee0
commit
9377bcf897
|
@ -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])
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"github.com/lyx0/nourybot/internal/common"
|
||||
"github.com/lyx0/nourybot/pkg/common"
|
||||
)
|
||||
|
||||
func Coinflip() string {
|
|
@ -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"
|
||||
)
|
||||
|
|
@ -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 {
|
|
@ -6,7 +6,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/lyx0/nourybot/internal/common"
|
||||
"github.com/lyx0/nourybot/pkg/common"
|
||||
)
|
||||
|
||||
type xkcdResponse struct {
|
Loading…
Reference in a new issue