Documentation
¶
Index ¶
- Variables
- func FindCommandByName(commands []discord.ApplicationCommand, name string) discord.ApplicationCommand
- func GenerateNewCookieId() string
- func GetRedirectForW(w string) (redirectUri string, err error)
- func GetSessionFromContext(c echo.Context) *models.AuthCookie
- func Joinln(s ...string) string
- func Optional[K any](e K) *K
- type A
- func (A) DispatchNewAuction(app interfaces.App, auction *models.Auction)
- func (A) DispatchNewBid(app interfaces.App, bid *models.AuctionsBid)
- func (A) DispatchNewListing(app interfaces.App, listing *models.Listing)
- func (A) DispatchRemoveAuction(app interfaces.App, auction *models.Auction)
- func (A) DispatchRemoveListing(app interfaces.App, listing *models.Listing)
- func (A) DispatchRescheduleAuction(app interfaces.App, auction *models.Auction)
- func (A) DispatchUpdateAuction(app interfaces.App, auction *models.Auction)
- func (A) SendDM(app interfaces.App, to string, msg discord.MessageCreate)
- type Card
- func (card Card) FullString(c *models.Card) string
- func (card Card) GenerateStats(c *models.Card) *models.CardsStat
- func (card Card) GetMeta(c *models.Card) *CardMetadata
- func (card Card) IconURI(c *models.Card) string
- func (card Card) Message(c *models.Card) (*discord.File, discord.Embed, *discord.ContainerComponent)
- func (Card) Primitive(c *models.Card) *cards.Card
- func (card Card) RarityString(c *models.Card) (x string)
- func (card Card) RarityToColor(c *models.Card) int
- func (card Card) SaveMeta(c *models.Card, meta *CardMetadata)
- func (card Card) SetLocation(c *models.Card, location string)
- type CardMetadata
- type Event
- type Listener
- type Listeners
- type Player
- func (Player) AvailableBalance(p *models.Player) int64
- func (Player) AvailableCards(p *models.Player) []*models.Card
- func (Player) CalculateNextLevelXP(p *models.Player) int64
- func (Player) DeleteBoxFromPlayer(p *models.Player, b *models.LootBox)
- func (Player) GetAvailableCard(p *models.Player, i int) (*models.Card, bool)
- func (Player) GetMarketAuction(p *models.Player, i int) (*models.Card, bool)
- func (Player) GetMarketListing(p *models.Player, i int) (*models.Card, bool)
- func (c Player) GiveXP(p *models.Player, given int64) (levelUp bool)
- func (Player) LootBoxesCount(p *models.Player) map[models.LootBoxesType]int
- func (Player) MarketAuctions(p *models.Player) []*models.Card
- func (Player) MarketListings(p *models.Player) []*models.Card
- func (Player) TakeFirstLootBoxOf(p *models.Player, t models.LootBoxesType) (*models.LootBox, bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var Auctions auction
Functions ¶
func FindCommandByName ¶
func FindCommandByName(commands []discord.ApplicationCommand, name string) discord.ApplicationCommand
HELPER FUNCTIONS
func GenerateNewCookieId ¶
func GenerateNewCookieId() string
func GetRedirectForW ¶
func GetSessionFromContext ¶
func GetSessionFromContext(c echo.Context) *models.AuthCookie
Types ¶
type A ¶
type A struct{}
var App A
func (A) DispatchNewAuction ¶
func (A) DispatchNewAuction(app interfaces.App, auction *models.Auction)
func (A) DispatchNewBid ¶
func (A) DispatchNewBid(app interfaces.App, bid *models.AuctionsBid)
func (A) DispatchNewListing ¶
func (A) DispatchNewListing(app interfaces.App, listing *models.Listing)
func (A) DispatchRemoveAuction ¶
func (A) DispatchRemoveAuction(app interfaces.App, auction *models.Auction)
func (A) DispatchRemoveListing ¶
func (A) DispatchRemoveListing(app interfaces.App, listing *models.Listing)
func (A) DispatchRescheduleAuction ¶
func (A) DispatchRescheduleAuction(app interfaces.App, auction *models.Auction)
func (A) DispatchUpdateAuction ¶
func (A) DispatchUpdateAuction(app interfaces.App, auction *models.Auction)
func (A) SendDM ¶
func (A) SendDM(app interfaces.App, to string, msg discord.MessageCreate)
type CardMetadata ¶
type CardMetadata struct {
Location string
}
type Event ¶
type Event struct { // ID is used to set the EventSource object's last event ID value. ID []byte // Data field is for the message. When the EventSource receives multiple consecutive lines // that begin with data:, it concatenates them, inserting a newline character between each one. // Trailing newlines are removed. Data []byte // Event is a string identifying the type of event described. If this is specified, an event // will be dispatched on the browser to the listener for the specified event name; the website // source code should use addEventListener() to listen for named events. The onmessage handler // is called if no event name is specified for a message. Event []byte // Retry is the reconnection time. If the connection to the server is lost, the browser will // wait for the specified time before attempting to reconnect. This must be an integer, specifying // the reconnection time in milliseconds. If a non-integer value is specified, the field is ignored. Retry []byte // Comment line can be used to prevent connections from timing out; a server can send a comment // periodically to keep the connection alive. Comment []byte }
Event represents Server-Sent Event. SSE explanation: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format
type Player ¶
type Player struct{}
var Players Player
func (Player) AvailableCards ¶
Replace with iterator with go1.23
func (Player) DeleteBoxFromPlayer ¶
func (Player) GetAvailableCard ¶
func (Player) GetMarketAuction ¶
func (Player) GetMarketListing ¶
func (Player) LootBoxesCount ¶
func (Player) TakeFirstLootBoxOf ¶
Click to show internal directories.
Click to hide internal directories.