handlers

package
v0.0.0-...-7360598 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoActiveList         = "You have no active shopping list. Create one first with `/shopping-list show`."
	GenericErrorOccurred = "Error retrieving the requested data. Please try again."
)
View Source
const ErrNoRealmPrefix = "No realm is assigned to this"

Variables

This section is empty.

Functions

This section is empty.

Types

type AucBot

type AucBot struct {
	AuctionAccessors cmap.ConcurrentMap
	DbAccessor       *db.Accessor
	BnetAccessor     *bnet.Accessor
	AdsAccessor      *ads.Accessor
	CacheAccessor    cache.ICache

	MultiItemPrintoutCap        int
	ShoppingListMaxItems        int
	EnableValuationFunctions    bool
	EnableADS                   bool
	DragonflightDefaultItemRank int
}

AucBot holds all data accessors and bot functions

func (*AucBot) BuyersGuide

func (ab *AucBot) BuyersGuide(session transport.Session, queryString, profString string, rank int) (*transport.Response, error)

BuyersGuide is called on !bg and handles basic buyer's guide requests

func (*AucBot) BuyersGuideExtended

func (ab *AucBot) BuyersGuideExtended(session transport.Session, queryString, profString string, rank int) (*transport.Response, error)

BuyersGuideExtended is called on /buyers-guide and handles extended buyer's guide requests

func (*AucBot) Choice

func (ab *AucBot) Choice(session transport.Session, queryString string) (*transport.Response, error)

Choice processes any pending requests for multiple item resolution

func (*AucBot) Clear

func (ab *AucBot) Clear(session transport.Session, _ string) (*transport.Response, error)

Clear is called on /clear

func (*AucBot) Component

func (ab *AucBot) Component(session transport.Session, queryString string) (*transport.Response, error)

Component is called on !c or !component and prints item components via recipes

func (*AucBot) Group

func (ab *AucBot) Group(session transport.Session, queryString string) (*transport.Response, error)

Group is called on !g or !group TODO unfinished

func (*AucBot) Help

func (ab *AucBot) Help(_ transport.Session, _ string) (*transport.Response, error)

Help is called on /bghelp and prints usage information

func (*AucBot) Price

func (ab *AucBot) Price(session transport.Session, queryString string, rank int) (*transport.Response, error)

Price is called on /price and prints price info on one item

func (*AucBot) Realm

func (ab *AucBot) Realm(session transport.Session, queryString string) (*transport.Response, error)

Realm is called on /realm

func (*AucBot) ShoppingList

func (ab *AucBot) ShoppingList(session transport.Session, queryString string) (*transport.Response, error)

func (*AucBot) ShoppingListAdd

func (ab *AucBot) ShoppingListAdd(session transport.Session, queryString string, rank, threshold int) (*transport.Response, error)

func (*AucBot) ShoppingListDelete

func (ab *AucBot) ShoppingListDelete(session transport.Session, queryString string, rank int) (*transport.Response, error)

type ItemRequest

type ItemRequest struct {
	Item *model.Item
	Rank int
	// Shadowlands legendary ranks are encoded by bonusID,
	// where DF ranks are an abstraction over multiple itemIDs with identical names.
	// if this is set, price queries should ignore the rank parameter.
	ItemIDEncodedRank bool
	DefaultRankUsed   uint8
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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