Moved PrettyPrint to stringutils
This commit is contained in:
parent
617e36bc52
commit
5173ba2a83
@ -3,8 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/animenotifier/arn"
|
"github.com/animenotifier/arn/search"
|
||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -58,7 +57,7 @@ func OnMessageCreate(s *discordgo.Session, msg *discordgo.MessageCreate) {
|
|||||||
|
|
||||||
if strings.HasPrefix(msg.Content, "!a ") {
|
if strings.HasPrefix(msg.Content, "!a ") {
|
||||||
term := msg.Content[len("!a "):]
|
term := msg.Content[len("!a "):]
|
||||||
animes := arn.SearchAnime(term, 3)
|
animes := search.Anime(term, 3)
|
||||||
message := ""
|
message := ""
|
||||||
|
|
||||||
for _, anime := range animes {
|
for _, anime := range animes {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"flag"
|
"flag"
|
||||||
|
|
||||||
"github.com/animenotifier/arn"
|
"github.com/animenotifier/arn/stringutils"
|
||||||
"github.com/animenotifier/kitsu"
|
"github.com/animenotifier/kitsu"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ func InvokeShellArgs() bool {
|
|||||||
sync(kitsuAnime)
|
sync(kitsuAnime)
|
||||||
|
|
||||||
if verbose {
|
if verbose {
|
||||||
arn.PrettyPrint(kitsuAnime)
|
stringutils.PrettyPrint(kitsuAnime)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/animenotifier/arn"
|
"github.com/animenotifier/arn"
|
||||||
|
"github.com/animenotifier/arn/stringutils"
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Log it
|
// Log it
|
||||||
arn.PrettyPrint(user.Accounts.Osu)
|
stringutils.PrettyPrint(user.Accounts.Osu)
|
||||||
|
|
||||||
// Save in database
|
// Save in database
|
||||||
user.Save()
|
user.Save()
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
"github.com/animenotifier/arn"
|
"github.com/animenotifier/arn"
|
||||||
|
"github.com/animenotifier/arn/stringutils"
|
||||||
"github.com/animenotifier/notify.moe/components"
|
"github.com/animenotifier/notify.moe/components"
|
||||||
"github.com/animenotifier/notify.moe/utils"
|
"github.com/animenotifier/notify.moe/utils"
|
||||||
)
|
)
|
||||||
@ -60,7 +61,7 @@ func Success(ctx *aero.Context) string {
|
|||||||
return ctx.Error(http.StatusInternalServerError, "Could not retrieve payment information", err)
|
return ctx.Error(http.StatusInternalServerError, "Could not retrieve payment information", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
arn.PrettyPrint(sdkPayment)
|
stringutils.PrettyPrint(sdkPayment)
|
||||||
|
|
||||||
transaction := sdkPayment.Transactions[0]
|
transaction := sdkPayment.Transactions[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user