interactions

package
v0.0.0-...-0794c0a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 NewHandler(g *database.Gringotts) *Handler

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 (*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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL