From aff903c9dc1b1eed3c77991e896c72527342c8fd Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Mon, 17 Apr 2023 09:53:00 +0200 Subject: [PATCH] v0.3.1: Maintenance release - Update dependencies - Fix wrongly formatted imports - Don't provide a play summary if no value changed --- bot/bot.go | 1 + bot/db.go | 1 + bot/handler_guildcreate.go | 1 + bot/handler_guilddelete.go | 1 + bot/handler_presenceupdate_playsot.go | 5 +++-- bot/requester.go | 1 + bot/sc_handler_config.go | 1 + bot/sc_handler_rarethief_traderoutes.go | 3 ++- bot/sc_handler_register.go | 1 + bot/sc_handler_sot_dailydeeds.go | 3 ++- bot/sc_handler_sot_flameheart.go | 1 + bot/sc_handler_sot_setrat.go | 1 + bot/sc_handler_sot_userstats.go | 5 +++-- bot/slashcmd.go | 1 + bot/version.go | 2 +- cmd/arrgo/arrgo.go | 1 + model/deed.go | 2 +- 17 files changed, 23 insertions(+), 8 deletions(-) diff --git a/bot/bot.go b/bot/bot.go index 78e374f..5c261f6 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -10,6 +10,7 @@ import ( "github.com/bwmarrin/discordgo" "github.com/rs/zerolog" + "github.com/wneessen/arrgo/config" "github.com/wneessen/arrgo/crypto" "github.com/wneessen/arrgo/model" diff --git a/bot/db.go b/bot/db.go index 82cf3b5..48a8a36 100644 --- a/bot/db.go +++ b/bot/db.go @@ -13,6 +13,7 @@ import ( _ "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang-migrate/migrate/v4/source/file" _ "github.com/lib/pq" + "github.com/wneessen/arrgo/config" "github.com/wneessen/arrgo/model" ) diff --git a/bot/handler_guildcreate.go b/bot/handler_guildcreate.go index ee7bbe4..ea4e5a0 100644 --- a/bot/handler_guildcreate.go +++ b/bot/handler_guildcreate.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/config" "github.com/wneessen/arrgo/crypto" "github.com/wneessen/arrgo/model" diff --git a/bot/handler_guilddelete.go b/bot/handler_guilddelete.go index 6a0dd77..71bc0b6 100644 --- a/bot/handler_guilddelete.go +++ b/bot/handler_guilddelete.go @@ -4,6 +4,7 @@ import ( "errors" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/model" ) diff --git a/bot/handler_presenceupdate_playsot.go b/bot/handler_presenceupdate_playsot.go index 8855ba0..4f4ea94 100644 --- a/bot/handler_presenceupdate_playsot.go +++ b/bot/handler_presenceupdate_playsot.go @@ -6,9 +6,10 @@ import ( "time" "github.com/bwmarrin/discordgo" - "github.com/wneessen/arrgo/model" "golang.org/x/text/language" "golang.org/x/text/message" + + "github.com/wneessen/arrgo/model" ) // UserPlaySoT receives PRESENCE_UPDATE from each server and handles if the user starts playing SoT @@ -230,7 +231,7 @@ func (b *Bot) UserPlaySoT(_ *discordgo.Session, ev *discordgo.PresenceUpdate) { }) } - if len(ef) > 0 { + if len(ef) > 1 { du, err := b.Session.User(u.UserID) if err != nil { ll.Warn().Msgf("failed to retrieve user information from Discord: %s", err) diff --git a/bot/requester.go b/bot/requester.go index 222b6a7..717337a 100644 --- a/bot/requester.go +++ b/bot/requester.go @@ -5,6 +5,7 @@ import ( "time" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/model" ) diff --git a/bot/sc_handler_config.go b/bot/sc_handler_config.go index b514f6c..d5a59a6 100644 --- a/bot/sc_handler_config.go +++ b/bot/sc_handler_config.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/model" ) diff --git a/bot/sc_handler_rarethief_traderoutes.go b/bot/sc_handler_rarethief_traderoutes.go index bae88ef..e589813 100644 --- a/bot/sc_handler_rarethief_traderoutes.go +++ b/bot/sc_handler_rarethief_traderoutes.go @@ -9,9 +9,10 @@ import ( "time" "github.com/bwmarrin/discordgo" - "github.com/wneessen/arrgo/model" "golang.org/x/text/cases" "golang.org/x/text/language" + + "github.com/wneessen/arrgo/model" ) // RTTraderoute represents the JSON structure of the rarethief.com traderoute API response diff --git a/bot/sc_handler_register.go b/bot/sc_handler_register.go index a34e736..615923e 100644 --- a/bot/sc_handler_register.go +++ b/bot/sc_handler_register.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/config" "github.com/wneessen/arrgo/crypto" "github.com/wneessen/arrgo/model" diff --git a/bot/sc_handler_sot_dailydeeds.go b/bot/sc_handler_sot_dailydeeds.go index ff54143..0d148ba 100644 --- a/bot/sc_handler_sot_dailydeeds.go +++ b/bot/sc_handler_sot_dailydeeds.go @@ -8,9 +8,10 @@ import ( "time" "github.com/bwmarrin/discordgo" - "github.com/wneessen/arrgo/model" "golang.org/x/text/cases" "golang.org/x/text/language" + + "github.com/wneessen/arrgo/model" ) // SoTEventHubJSON is the nested struct from the Sea of Thieves event hub response diff --git a/bot/sc_handler_sot_flameheart.go b/bot/sc_handler_sot_flameheart.go index d56e47b..75e9314 100644 --- a/bot/sc_handler_sot_flameheart.go +++ b/bot/sc_handler_sot_flameheart.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/crypto" "github.com/wneessen/arrgo/model" ) diff --git a/bot/sc_handler_sot_setrat.go b/bot/sc_handler_sot_setrat.go index 7bbb9b5..3638bde 100644 --- a/bot/sc_handler_sot_setrat.go +++ b/bot/sc_handler_sot_setrat.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/model" ) diff --git a/bot/sc_handler_sot_userstats.go b/bot/sc_handler_sot_userstats.go index cbbc639..dcae252 100644 --- a/bot/sc_handler_sot_userstats.go +++ b/bot/sc_handler_sot_userstats.go @@ -8,10 +8,11 @@ import ( "time" "github.com/bwmarrin/discordgo" - "github.com/wneessen/arrgo/crypto" - "github.com/wneessen/arrgo/model" "golang.org/x/text/language" "golang.org/x/text/message" + + "github.com/wneessen/arrgo/crypto" + "github.com/wneessen/arrgo/model" ) // SoTUserOverview represents the JSON structure of the Sea of Thieves user overview API response diff --git a/bot/slashcmd.go b/bot/slashcmd.go index d4c2b51..8b9122c 100644 --- a/bot/slashcmd.go +++ b/bot/slashcmd.go @@ -5,6 +5,7 @@ import ( "time" "github.com/bwmarrin/discordgo" + "github.com/wneessen/arrgo/crypto" ) diff --git a/bot/version.go b/bot/version.go index a30bf66..cdce94a 100644 --- a/bot/version.go +++ b/bot/version.go @@ -1,3 +1,3 @@ package bot -const Version = "0.3.0" +const Version = "0.3.1" diff --git a/cmd/arrgo/arrgo.go b/cmd/arrgo/arrgo.go index 523d49b..81dbfb5 100644 --- a/cmd/arrgo/arrgo.go +++ b/cmd/arrgo/arrgo.go @@ -8,6 +8,7 @@ import ( "time" "github.com/rs/zerolog" + "github.com/wneessen/arrgo/bot" "github.com/wneessen/arrgo/config" ) diff --git a/model/deed.go b/model/deed.go index c3213fb..a49c177 100644 --- a/model/deed.go +++ b/model/deed.go @@ -19,7 +19,7 @@ const ( const ( RewardGold RewardType = "gold" RewardDoubloons RewardType = "doubloons" - RewardUnknown RewardType = "unknown" + // RewardUnknown RewardType = "unknown" ) // DeedModel wraps the connection pool.