mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
refactor from pkg to internal
This commit is contained in:
parent
ee893cbea3
commit
76c78dfbb1
36 changed files with 31 additions and 31 deletions
|
@ -4,9 +4,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddChannel takes in a channel name, then calls GetIdByLogin for the
|
// AddChannel takes in a channel name, then calls GetIdByLogin for the
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddCommand takes in a name parameter and a twitch.PrivateMessage. It slices the
|
// AddCommand takes in a name parameter and a twitch.PrivateMessage. It slices the
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands"
|
"github.com/lyx0/nourybot/internal/commands"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleCommand takes in a twitch.PrivateMessage and then routes the message to
|
// handleCommand takes in a twitch.PrivateMessage and then routes the message to
|
||||||
|
|
|
@ -11,8 +11,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"
|
"github.com/nicklaw5/helix"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddTimer slices the message into relevant parts, adding the values onto a
|
// AddTimer slices the message into relevant parts, adding the values onto a
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/internal/data"
|
"github.com/lyx0/nourybot/internal/data"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddUser calls GetIdByLogin to get the twitch id of the login name and then adds
|
// AddUser calls GetIdByLogin to get the twitch id of the login name and then adds
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Bttv(target, query string, tc *twitch.Client) {
|
func Bttv(target, query string, tc *twitch.Client) {
|
|
@ -2,8 +2,8 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Coinflip(target string, tc *twitch.Client) {
|
func Coinflip(target string, tc *twitch.Client) {
|
|
@ -2,8 +2,8 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Echo(target, message string, tc *twitch.Client) {
|
func Echo(target, message string, tc *twitch.Client) {
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Ffz(target, query string, tc *twitch.Client) {
|
func Ffz(target, query string, tc *twitch.Client) {
|
|
@ -2,8 +2,8 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/ivr"
|
"github.com/lyx0/nourybot/internal/commands/ivr"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func FirstLine(target, channel, username string, tc *twitch.Client) {
|
func FirstLine(target, channel, username string, tc *twitch.Client) {
|
|
@ -2,8 +2,8 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"github.com/lyx0/nourybot/pkg/humanize"
|
"github.com/lyx0/nourybot/internal/humanize"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Ping(target string, tc *twitch.Client) {
|
func Ping(target string, tc *twitch.Client) {
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Preview(target, channel string, tc *twitch.Client) {
|
func Preview(target, channel string, tc *twitch.Client) {
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Seventv(target, emote string, tc *twitch.Client) {
|
func Seventv(target, emote string, tc *twitch.Client) {
|
|
@ -2,8 +2,8 @@ package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/commands/decapi"
|
"github.com/lyx0/nourybot/internal/commands/decapi"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
owm "github.com/briandowns/openweathermap"
|
owm "github.com/briandowns/openweathermap"
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v3"
|
"github.com/gempir/go-twitch-irc/v3"
|
||||||
"github.com/lyx0/nourybot/pkg/common"
|
"github.com/lyx0/nourybot/internal/common"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue