Documentation ¶
Index ¶
- Constants
- Variables
- type APIIntString
- type APITimeRFC3339
- type Bot
- func (b *Bot) CheckDBVersion(c *config.Config) (uint, error)
- func (b *Bot) GuildCreate(s *discordgo.Session, ev *discordgo.GuildCreate)
- func (b *Bot) GuildDelete(_ *discordgo.Session, ev *discordgo.GuildDelete)
- func (b *Bot) NewRequester(i *discordgo.Interaction) (*Requester, error)
- func (b *Bot) OpenDB(c *config.Config) (*sql.DB, error)
- func (b *Bot) RTGetTradeRoutes() (RTTraderoute, error)
- func (b *Bot) ReadyHandler(s *discordgo.Session, ev *discordgo.Ready)
- func (b *Bot) RegisterSlashCommands() error
- func (b *Bot) RemoveSlashCommands() error
- func (b *Bot) Run() error
- func (b *Bot) SQLDowngrade(c *config.Config) error
- func (b *Bot) SQLMigrate(c *config.Config) error
- func (b *Bot) ScheduledEventCheckRATCookies() error
- func (b *Bot) ScheduledEventSoTFlameheart() error
- func (b *Bot) ScheduledEventUpdateDailyDeeds() error
- func (b *Bot) ScheduledEventUpdateTradeRoutes() error
- func (b *Bot) ScheduledEventUpdateUserReputation() error
- func (b *Bot) ScheduledEventUpdateUserStats() error
- func (b *Bot) SlashCmdConfig(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdRegister(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSetRAT(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTAchievement(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTAllegiance(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTBalance(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTCompare(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTDailyDeeds(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTFlameheart(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTLedger(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTOverview(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTReputation(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTSeasonProgress(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdSoTTradeRoutes(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdTime(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdUptime(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCmdVersion(s *discordgo.Session, i *discordgo.InteractionCreate) error
- func (b *Bot) SlashCommandHandler(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (b *Bot) SoTGetAchievements(rq *Requester) (SoTAchievementList, error)
- func (b *Bot) SoTGetAllegiance(rq *Requester, at string) (SoTAllegiance, error)
- func (b *Bot) SoTGetDailyDeeds() ([]SoTDeed, error)
- func (b *Bot) SoTGetLedger(rq *Requester, em string) (SoTEmissaryLedger, error)
- func (b *Bot) SoTGetReputation(rq *Requester) (SoTReputation, error)
- func (b *Bot) SoTGetSeasonProgress(rq *Requester) (SoTSeasonList, error)
- func (b *Bot) SoTGetUserBalance(rq *Requester) (SoTUserBalance, error)
- func (b *Bot) SoTGetUserOverview(rq *Requester) (SoTUserStats, error)
- func (b *Bot) StartTimeString() string
- func (b *Bot) StartTimeUnix() int64
- func (b *Bot) StoreSoTUserReputation(u *model.User) error
- func (b *Bot) StoreSoTUserStats(rq *Requester) error
- func (b *Bot) UserPlaySoT(_ *discordgo.Session, ev *discordgo.PresenceUpdate)
- type HTTPClient
- type HTTPReqMethod
- type HTTPRequest
- type RTRoute
- type RTTraderoute
- type Requester
- type SoTAchievement
- type SoTAchievementList
- type SoTAllegiance
- type SoTAllegianceJSON
- type SoTCurrentLedger
- type SoTDeed
- type SoTEmissaryLedger
- type SoTEventHubJSON
- type SoTFactionNextLevel
- type SoTFactionReputation
- type SoTFriendsLedger
- type SoTLedger
- type SoTRATCookie
- type SoTReputation
- type SoTSeasonLevel
- type SoTSeasonList
- type SoTSeasonProgress
- type SoTSeasonReward
- type SoTSeasonRewards
- type SoTSeasonTier
- type SoTSortedAchievement
- type SoTUserBalance
- type SoTUserOverview
- type SoTUserStats
Constants ¶
const ( APIURLSoTAchievements = "https://www.seaofthieves.com/api/profilev2/achievements" APIURLSoTAllegiance = "https://www.seaofthieves.com/api/profilev2" APIURLSoTSeasons = "https://www.seaofthieves.com/api/profilev2/seasons-progress" APIURLSoTUserBalance = "https://www.seaofthieves.com/api/profilev2/balance" APIURLSoTReputation = "https://www.seaofthieves.com/api/profilev2/reputation" APIURLSoTUserOverview = "https://www.seaofthieves.com/api/profilev2/overview" APIURLSoTEventHub = "https://www.seaofthieves.com/event-hub" APIURLRTTradeRoutes = "https://maps.seaofthieves.rarethief.com/js/trade_routes.js" APIURLSoTLedger = "https://www.seaofthieves.com/api/ledger/friends" AssetsBaseURL = "https://github.com/wneessen/arrgo/raw/main/assets" )
List of Sea of Thieves API endpoints
const ( ErrFailedHTTPClient = "failed to generate new HTTP client: %s" ErrFailedRetrieveUserStatsDB = "failed retrieve user status from DB: %s" ErrFailedGuildLookupDB = "failed to look up guild in database: %s" ErrFailedStringConvert = "failed to convert string to int: %s" )
const ( // ErrMigrateCloseSourceConnection should be used when a SQL migration was not able to close the source ErrMigrateCloseSourceConnection = "failed to close sources connection for migrate: %s" // ErrMigrateCloseDBConnection should be used when migrate is unable to close the DB connection ErrMigrateCloseDBConnection = "failed to close DB connection for migrate: %s" )
const ( IconGold = "\U0001F7E1" IconDoubloon = "🔵" IconAncientCoin = "💰" IconIncrease = "📈 " IconDecrease = "📉 " IconArrowUp = "⬆️ " IconArrowDown = "⬇️ " IconKraken = "🐙" IconMegalodon = "🦈" IconChest = "🗝️" IconShip = "⛵" IconVomit = "🤮" IconDistance = "📐" IconGauge = "🌡️" IconDuration = "⏱️" )
List of icons/emojis
const MigrationsPath = "file://sql_migrations"
MigrationsPath defines the path where to find the sql_migrations
const SOTReferer = "https://www.seaofthieves.com/profile/achievements"
SOTReferer is the referer that apparently is needed for the SoT API to accept requests
const (
TitleConfigUpdated = "Bot configuration updated"
)
const Version = "0.3.2"
Variables ¶
var ( ErrUserNotRegistered = errors.New("your user is not registered with the bot. Please use the " + "**/register** command to activate the full feature set first") ErrUserHasNoRATCookie = errors.New("you have not provided a Sea of Thieves authentication token. " + "Please store your cookie with the **/setrat** command first") ErrRATCookieExpired = errors.New("your Sea of Thieves authentication token is expired. " + "Please use the **/setrat** command to update your token") ErrMemberNil = errors.New("provided Member pointer must not be nil") ErrUserNil = errors.New("provided User pointer must not be nil") )
List of Requester specific errors
var ( // ErrSOTUnauth should be used when requrests to the SoT API were not successful due to expired // tokens ErrSOTUnauth = errors.New("failed to fetch Sea of Thieves content, due to being unauthorized") )
HTTP client related errors
Functions ¶
This section is empty.
Types ¶
type APIIntString ¶
type APIIntString int64
APIIntString represents a API response string that is actually a Integer
func (*APIIntString) UnmarshalJSON ¶
func (s *APIIntString) UnmarshalJSON(ib []byte) error
UnmarshalJSON converts the APIIntString string into an int64
type APITimeRFC3339 ¶ added in v0.1.6
APITimeRFC3339 is a wrapper type for time.Time
func (*APITimeRFC3339) UnmarshalJSON ¶ added in v0.1.6
func (t *APITimeRFC3339) UnmarshalJSON(s []byte) error
UnmarshalJSON converts a API RFC3339 formated date strings into a time.Time object
type Bot ¶
type Bot struct { Log zerolog.Logger Config *config.Config Session *discordgo.Session Model model.Model // contains filtered or unexported fields }
Bot represents the bot instance
func (*Bot) CheckDBVersion ¶
CheckDBVersion compares the DB version with the SQL migrations
func (*Bot) GuildCreate ¶
func (b *Bot) GuildCreate(s *discordgo.Session, ev *discordgo.GuildCreate)
GuildCreate receives GUILD_CREATE updates from each server the bot is connected to
func (*Bot) GuildDelete ¶
func (b *Bot) GuildDelete(_ *discordgo.Session, ev *discordgo.GuildDelete)
GuildDelete receives GUILD_DELETE updates from each server the bot is connected to
func (*Bot) NewRequester ¶
func (b *Bot) NewRequester(i *discordgo.Interaction) (*Requester, error)
NewRequester returns a Requester based on if it's a channel interaction or DM
func (*Bot) RTGetTradeRoutes ¶
func (b *Bot) RTGetTradeRoutes() (RTTraderoute, error)
RTGetTradeRoutes returns the parsed API response from the rarethief.com traderoutes API
func (*Bot) ReadyHandler ¶
ReadyHandler updates the Bot's session data
func (*Bot) RegisterSlashCommands ¶
RegisterSlashCommands will fetch the list of available slash commands and register them with the Guild if not present yet
func (*Bot) RemoveSlashCommands ¶
RemoveSlashCommands will fetch the list of registered slash commands and remove them
func (*Bot) SQLDowngrade ¶
SQLDowngrade migrates the database to the latest SQL set
func (*Bot) SQLMigrate ¶
SQLMigrate migrates the database to the latest SQL set
func (*Bot) ScheduledEventCheckRATCookies ¶
ScheduledEventCheckRATCookies performs scheuled checks if the provided RAT cookies are still valid
func (*Bot) ScheduledEventSoTFlameheart ¶
ScheduledEventSoTFlameheart performs scheuled FH spam message to the guilds system channel
func (*Bot) ScheduledEventUpdateDailyDeeds ¶ added in v0.1.6
ScheduledEventUpdateDailyDeeds performs scheuled updates of the SoT daily deeds
func (*Bot) ScheduledEventUpdateTradeRoutes ¶
ScheduledEventUpdateTradeRoutes performs scheuled updates of the TR data from rarethief.com
func (*Bot) ScheduledEventUpdateUserReputation ¶ added in v0.2.8
ScheduledEventUpdateUserReputation performs scheuled updates of the SoT user reputation for each user
func (*Bot) ScheduledEventUpdateUserStats ¶
ScheduledEventUpdateUserStats performs scheuled updates of the SoT user stats for each user
func (*Bot) SlashCmdConfig ¶
SlashCmdConfig handles the /config slash command All /config commands require admin or moderate-members permissions on the guild
func (*Bot) SlashCmdRegister ¶
SlashCmdRegister handles the /register slash command
func (*Bot) SlashCmdSetRAT ¶
SlashCmdSetRAT handles the /setrat slash command
func (*Bot) SlashCmdSoTAchievement ¶
SlashCmdSoTAchievement handles the /achievement slash command
func (*Bot) SlashCmdSoTAllegiance ¶ added in v0.2.5
SlashCmdSoTAllegiance handles the /allegiance slash command
func (*Bot) SlashCmdSoTBalance ¶
SlashCmdSoTBalance handles the /balance slash command
func (*Bot) SlashCmdSoTCompare ¶ added in v0.1.5
SlashCmdSoTCompare handles the /compare slash command
func (*Bot) SlashCmdSoTDailyDeeds ¶ added in v0.1.6
SlashCmdSoTDailyDeeds handles the /dailydeed slash command
func (*Bot) SlashCmdSoTFlameheart ¶
SlashCmdSoTFlameheart handles the /flameheart slash command
func (*Bot) SlashCmdSoTLedger ¶ added in v0.1.7
SlashCmdSoTLedger handles the /ledger slash command
func (*Bot) SlashCmdSoTOverview ¶
SlashCmdSoTOverview handles the /balance slash command
func (*Bot) SlashCmdSoTReputation ¶ added in v0.2.8
SlashCmdSoTReputation handles the /reputation slash command
func (*Bot) SlashCmdSoTSeasonProgress ¶
SlashCmdSoTSeasonProgress handles the /season slash command
func (*Bot) SlashCmdSoTTradeRoutes ¶
SlashCmdSoTTradeRoutes handles the /balance slash command
func (*Bot) SlashCmdTime ¶
SlashCmdTime handles the /time slash command
func (*Bot) SlashCmdUptime ¶
SlashCmdUptime handles the /uptime slash command
func (*Bot) SlashCmdVersion ¶
SlashCmdVersion handles the /version slash command
func (*Bot) SlashCommandHandler ¶
func (b *Bot) SlashCommandHandler(s *discordgo.Session, i *discordgo.InteractionCreate)
SlashCommandHandler is the central handler method for all slash commands. It will look up the name of the received SC-handler event in a map and when found execute the corresponding method
func (*Bot) SoTGetAchievements ¶
func (b *Bot) SoTGetAchievements(rq *Requester) (SoTAchievementList, error)
SoTGetAchievements returns the parsed API response from the Sea of Thieves achievements API
func (*Bot) SoTGetAllegiance ¶ added in v0.2.5
func (b *Bot) SoTGetAllegiance(rq *Requester, at string) (SoTAllegiance, error)
SoTGetAllegiance returns the parsed API response from the Sea of Thieves allegiance API
func (*Bot) SoTGetDailyDeeds ¶ added in v0.1.6
SoTGetDailyDeeds returns the parsed API response from the Sea of Thieves event-hub API
func (*Bot) SoTGetLedger ¶ added in v0.1.7
func (b *Bot) SoTGetLedger(rq *Requester, em string) (SoTEmissaryLedger, error)
SoTGetLedger returns the parsed API response from the Sea of Thieves leaderboard ledger API
func (*Bot) SoTGetReputation ¶ added in v0.2.8
func (b *Bot) SoTGetReputation(rq *Requester) (SoTReputation, error)
SoTGetReputation returns the parsed API response from the Sea of Thieves reputation API
func (*Bot) SoTGetSeasonProgress ¶
func (b *Bot) SoTGetSeasonProgress(rq *Requester) (SoTSeasonList, error)
SoTGetSeasonProgress returns the parsed API response from the Sea of Thieves season progress API
func (*Bot) SoTGetUserBalance ¶
func (b *Bot) SoTGetUserBalance(rq *Requester) (SoTUserBalance, error)
SoTGetUserBalance returns the parsed API response from the Sea of Thieves gold/coins balance API
func (*Bot) SoTGetUserOverview ¶
func (b *Bot) SoTGetUserOverview(rq *Requester) (SoTUserStats, error)
SoTGetUserOverview returns the parsed API response from the Sea of Thieves gold/coins balance API
func (*Bot) StartTimeString ¶
StartTimeString returns the time when the bot was last initialized
func (*Bot) StartTimeUnix ¶
StartTimeUnix returns the time when the bot was last initialized
func (*Bot) StoreSoTUserReputation ¶ added in v0.2.8
StoreSoTUserReputation will retrieve the latest user reputation from the API and store them in the DB
func (*Bot) StoreSoTUserStats ¶
StoreSoTUserStats will retrieve the latest user stats from the API and store them in the DB
func (*Bot) UserPlaySoT ¶
func (b *Bot) UserPlaySoT(_ *discordgo.Session, ev *discordgo.PresenceUpdate)
UserPlaySoT receives PRESENCE_UPDATE from each server and handles if the user starts playing SoT
type HTTPClient ¶
HTTPClient is an object wrapper for the Go http.Client
func NewHTTPClient ¶
func NewHTTPClient() (*HTTPClient, error)
NewHTTPClient returns a HTTPClient object
func (*HTTPClient) Fetch ¶
func (h *HTTPClient) Fetch(r *HTTPRequest) ([]byte, *http.Response, error)
Fetch performs the actual HTTP request
func (*HTTPClient) HTTPReq ¶ added in v0.1.9
func (h *HTTPClient) HTTPReq(p string, m HTTPReqMethod, q map[string]string) (*HTTPRequest, error)
HTTPReq generates a HTTPRequest based on the Request method and request URI
type HTTPReqMethod ¶
type HTTPReqMethod string
HTTPReqMethod is a wrapper around a string
const ( // ReqMethodGet is the GET request method ReqMethodGet HTTPReqMethod = "GET" // ReqMethodPost is the POST request method ReqMethodPost HTTPReqMethod = "POST" )
List of HTTPReqMethods
type HTTPRequest ¶
HTTPRequest is an object wrapper for the Go http.Request
func (*HTTPRequest) SetReferer ¶
func (r *HTTPRequest) SetReferer(rf string)
SetReferer sets a custom referer to the request
func (*HTTPRequest) SetSOTRequest ¶
func (r *HTTPRequest) SetSOTRequest(c string)
SetSOTRequest sets the required additional headers for Sea of Thieves API requests
type RTRoute ¶
type RTRoute struct { Outpost string `json:"outpost"` SoughtAfter string `json:"sought_after"` Surplus string `json:"surplus"` }
RTRoute represents the JSON structure of a specific route within the rarethief.com traderoutes API response
type RTTraderoute ¶
type RTTraderoute struct { Dates string `json:"trade_route_dates"` Routes map[string]RTRoute `json:"routes"` ValidFrom time.Time ValidThru time.Time }
RTTraderoute represents the JSON structure of the rarethief.com traderoute API response
type Requester ¶
Requester wraps the discordgo.Member object to extend its functionality
func NewRequesterFromMember ¶ added in v0.2.3
NewRequesterFromMember returns a new *Requester pointer from a given *discordgo.Member
func NewRequesterFromUser ¶ added in v0.2.3
NewRequesterFromUser returns a new *Requester pointer from a given *model.User
func (*Requester) CanModerateMembers ¶
CanModerateMembers returns true if the Requester has moderator permissions on the guild
func (*Requester) GetSoTRATCookie ¶
GetSoTRATCookie checks if the Requester has a SoT RAT cookie and reads it from the DB
type SoTAchievement ¶
type SoTAchievement struct { Sort int `json:"Sort"` Name string `json:"Name"` Description string `json:"Description"` MediaURL string `json:"MediaUrl"` }
SoTAchievement is a single achievement in the Sea of Thieves achievements API response
type SoTAchievementList ¶
type SoTAchievementList struct {
Sorted []SoTSortedAchievement `json:"sorted"`
}
SoTAchievementList represents the JSON structure of the Sea of Thieves achievements API response
type SoTAllegiance ¶ added in v0.2.5
type SoTAllegiance struct { Allegiance string ShipsSunk int64 MaxStreak int64 TotalGold int64 Icon string }
SoTAllegiance is the struct that represents the parsed data from the API endpoint
type SoTAllegianceJSON ¶ added in v0.2.5
type SoTAllegianceJSON struct { Stats []struct { Name string `json:"name"` Value string `json:"value"` } `json:"stats"` }
SoTAllegianceJSON is the nested struct from the Sea of Thieves event hub response
type SoTCurrentLedger ¶ added in v0.1.7
type SoTCurrentLedger struct {
Friends SoTFriendsLedger `json:"friends"`
}
SoTCurrentLedger represents the JSON structure of the Sea of Thieves current leder within the overall ledger response
type SoTDeed ¶ added in v0.1.6
type SoTDeed struct { Type string `json:"#Type"` Title string `json:"Title"` BodyText string `json:"BodyText"` StartDateAPI *APITimeRFC3339 `json:"StartDate,omitempty"` EndDateAPI *APITimeRFC3339 `json:"EndDate,omitempty"` Image struct { Desktop string `json:"desktop"` } `json:"Image"` RewardDetails struct { Gold int `json:"Gold"` Doubloons int `json:"Doubloons"` XPGain string `json:"XPGain"` } `json:"RewardDetails"` }
SoTDeed is a deed as returned by the events-hub in Sea of Thieves
type SoTEmissaryLedger ¶ added in v0.1.7
type SoTEmissaryLedger struct { Name string Band int `json:"band"` BandTitle string Rank int `json:"rank"` Score int `json:"score"` ToNextRank int `json:"toNextRank"` }
SoTEmissaryLedger represents the JSON structure of the Sea of Thieves ledger data
type SoTEventHubJSON ¶ added in v0.1.6
type SoTEventHubJSON struct { Data struct { Components []struct { Data struct { BountyList []SoTDeed `json:"BountyList"` } `json:"data"` } `json:"components"` } `json:"data"` }
SoTEventHubJSON is the nested struct from the Sea of Thieves event hub response
type SoTFactionNextLevel ¶ added in v0.2.8
type SoTFactionNextLevel struct { Level int64 `json:"Level"` XPRequired int64 `json:"XpRequiredToAttain"` }
SoTFactionNextLevel represents XP level information of the JSON structure of the Sea of Thieves reputation within a season API response
type SoTFactionReputation ¶ added in v0.2.8
type SoTFactionReputation struct { Name string Motto string `json:"Motto"` Rank string `json:"Rank"` Level int64 `json:"Level"` Experience int64 `json:"XP"` NextCompanyLevel SoTFactionNextLevel `json:"NextCompanyLevel"` TitlesTotal int64 `json:"TitlesTotal"` TitlesUnlocked int64 `json:"TitlesUnlocked"` EmblemsTotal int64 `json:"EmblemsTotal"` EmblemsUnlocked int64 `json:"EmblemsUnlocked"` ItemsTotal int64 `json:"ItemsTotal"` ItemsUnlocked int64 `json:"ItemsUnlocked"` }
SoTFactionReputation represents second level of the JSON structure of the Sea of Thieves reputation within a season API response
type SoTFriendsLedger ¶ added in v0.1.7
type SoTFriendsLedger struct {
User SoTEmissaryLedger `json:"user"`
}
SoTFriendsLedger represents the JSON structure of the Sea of Thieves friends positioning withing the current leder
type SoTLedger ¶ added in v0.1.7
type SoTLedger struct {
Current SoTCurrentLedger `json:"current"`
}
SoTLedger represents the JSON structure of the Sea of Thieves leder positions within a season API response
type SoTRATCookie ¶
SoTRATCookie represents the JSON formated Sea of Thieves authentication cookie
type SoTReputation ¶ added in v0.2.8
type SoTReputation map[string]SoTFactionReputation
SoTReputation represents first level of the JSON structure of the Sea of Thieves reputation within a season API response
type SoTSeasonLevel ¶
type SoTSeasonLevel struct { Number int `json:"Number"` Rewards SoTSeasonRewards `json:"RewardsV2"` }
SoTSeasonLevel represents the JSON structure of the Sea of Thieves seasons levels within the season progress API response
type SoTSeasonList ¶
type SoTSeasonList []SoTSeasonProgress
SoTSeasonList represents the JSON structure of the Sea of Thieves seasons API response
type SoTSeasonProgress ¶
type SoTSeasonProgress struct { LevelProgress float64 `json:"LevelProgress"` Tier int `json:"Tier"` SeasonTitle string `json:"Title"` TotalChallenges int `json:"TotalChallenges"` CompletedChallenges int `json:"CompleteChallenges"` Tiers []SoTSeasonTier `json:"Tiers"` CDNPath string `json:"CdnPath"` }
SoTSeasonProgress represents the JSON structure of the Sea of Thieves seasons progress within a season API response
type SoTSeasonReward ¶
type SoTSeasonReward struct { CurrencyType string `json:"CurrencyType"` Locked bool `json:"Locked"` Owned bool `json:"Owned"` EntitlementURL string `json:"EntitlementUrl"` EntitlementText string `json:"EntitlementText"` EntitlementDescription string `json:"EntitlementDescription"` }
SoTSeasonReward represents the JSON structure of the Sea of Thieves seasons reward in the level within the season progress API response
type SoTSeasonRewards ¶
type SoTSeasonRewards struct { Base []SoTSeasonReward `json:"Base"` Legendary []SoTSeasonReward `json:"Legendary"` SeasonPass []SoTSeasonReward `json:"SeasonPass"` }
SoTSeasonRewards represents the JSON structure of the Sea of Thieves seasons rewards collection within the season progress API response
type SoTSeasonTier ¶
type SoTSeasonTier struct { Number int `json:"Number"` Title string `json:"Title"` Levels []SoTSeasonLevel `json:"Levels"` }
SoTSeasonTier represents the JSON structure of the Sea of Thieves seasons tier within the season progress API response
type SoTSortedAchievement ¶
type SoTSortedAchievement struct {
Achievement SoTAchievement `json:"achievement"`
}
SoTSortedAchievement is a subpart of the Sea of Thieves achievements API response
type SoTUserBalance ¶
type SoTUserBalance struct { GamerTag string `json:"gamertag"` Title string `json:"title"` Doubloons int64 `json:"doubloons"` Gold int64 `json:"gold"` AncientCoins int64 `json:"ancientCoins"` }
SoTUserBalance represents the JSON structure of the Sea of Thieves user balance API response
type SoTUserOverview ¶
type SoTUserOverview struct {
Stats SoTUserStats `json:"stats"`
}
SoTUserOverview represents the JSON structure of the Sea of Thieves user overview API response
type SoTUserStats ¶
type SoTUserStats struct { KrakenDefeated APIIntString `json:"Combat_Kraken_Defeated"` MegalodonEncounters APIIntString `json:"Player_TinyShark_Spawned"` ChestsHandedIn APIIntString `json:"Chests_HandedIn_Total"` ShipsSunk APIIntString `json:"Combat_Ships_Sunk"` VomitedTotal APIIntString `json:"Vomited_Total"` MetresSailed APIIntString `json:"Voyages_MetresSailed_Total"` }
SoTUserStats represents a subpart of the JSON structure of the Sea of Thieves user overview API response
Source Files ¶
- bot.go
- db.go
- format.go
- handler_guildcreate.go
- handler_guilddelete.go
- handler_presenceupdate_playsot.go
- handler_ready.go
- httpclient.go
- requester.go
- sc_handler_compare.go
- sc_handler_config.go
- sc_handler_rarethief_traderoutes.go
- sc_handler_register.go
- sc_handler_sot_achievement.go
- sc_handler_sot_allegiance.go
- sc_handler_sot_dailydeeds.go
- sc_handler_sot_flameheart.go
- sc_handler_sot_ledger.go
- sc_handler_sot_reputation.go
- sc_handler_sot_season.go
- sc_handler_sot_setrat.go
- sc_handler_sot_userstats.go
- sc_handler_time.go
- sc_handler_uptime.go
- sc_handler_version.go
- se_handler_checkratcookie.go
- slashcmd.go
- version.go