Documentation ¶
Index ¶
- Variables
- type Handler
- func (h *Handler) FindItem(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (h *Handler) FindItem2(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (h *Handler) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (h *Handler) LoadInventory(s *discordgo.Session, i *discordgo.InteractionCreate)
- type InventoryData
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = []*discordgo.ApplicationCommand{ { Name: "gbank", Description: "Guild Bank", Options: []*discordgo.ApplicationCommandOption{ { Name: "search", Description: "search", Type: discordgo.ApplicationCommandOptionSubCommand, Options: []*discordgo.ApplicationCommandOption{ { Type: discordgo.ApplicationCommandOptionString, Name: "name", Description: "name of the item to search for", Required: true, }, }, }, { Name: "sniff", Description: "sniff", Type: discordgo.ApplicationCommandOptionSubCommand, Options: []*discordgo.ApplicationCommandOption{ { Type: discordgo.ApplicationCommandOptionString, Name: "name", Description: "name of the item to search for", Required: true, }, { Type: discordgo.ApplicationCommandOptionString, Name: "location", Description: "name of the item to search for", Required: true, }, }, }, }, }, { Name: "find-item", Description: "find an item in the bank", Options: []*discordgo.ApplicationCommandOption{ { Type: discordgo.ApplicationCommandOptionString, Name: "item-name", Description: "name of the item to search for", Required: true, }, }, }, loadInventoryCommand, }
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) FindItem ¶
func (h *Handler) FindItem(s *discordgo.Session, i *discordgo.InteractionCreate)
func (*Handler) FindItem2 ¶
func (h *Handler) FindItem2(s *discordgo.Session, i *discordgo.InteractionCreate)
func (*Handler) Handle ¶
func (h *Handler) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
func (*Handler) LoadInventory ¶
func (h *Handler) LoadInventory(s *discordgo.Session, i *discordgo.InteractionCreate)
type InventoryData ¶
type InventoryData struct { CharName string `json:"charName"` ItemCounts map[string]int `json:"itemCounts"` ItemNames map[string]string `json:"itemNames"` }
func ParseInventoryData ¶
func ParseInventoryData(input string) (*InventoryData, error)
Click to show internal directories.
Click to hide internal directories.