mtgplugin

package
v0.0.0-...-7a7262c Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MTGCardMap = map[string]*MTGCard{}

MTGCardMap is a map from card name to card.

View Source
var MTGCardNames []string

MTGCardNames is an array of card names

View Source
var MTGCostReplacer = strings.NewReplacer("{", "", "}", "")

MTGCostReplacer is a replacer for styling text content of card costs.

View Source
var MTGHelp = bruxism.NewCommandHelp("<cardname>", "Returns information about a Magic: The Gathering card.")

MTGHelp is the help for the MTG plugin.

View Source
var MTGRestReplacer = strings.NewReplacer("*", "\\*")

MTGRestReplacer is a replacer for styling card info.

View Source
var MTGTextReplacer = strings.NewReplacer("(", "*(", ")", ")*")

MTGTextReplacer is a replacer for styling text content of cards.

Functions

func MTGCommand

func MTGCommand(bot *bruxism.Bot, service bruxism.Service, message bruxism.Message, command string, parts []string)

MTGCommand is a command for getting information about MTG cards..

Types

type MTGCard

type MTGCard struct {
	Name      string  `json:"name"`
	ManaCost  string  `json:"manaCost"`
	Type      string  `json:"type"`
	Text      string  `json:"text"`
	ID        *int    `json:"multiverseid"`
	Power     *string `json:"power"`
	Toughness *string `json:"toughness"`
	Loyalty   *int    `json:"loyalty"`
}

MTGCard is a struct containing all the information on a card from MTG.

type MTGSet

type MTGSet struct {
	Cards []*MTGCard `json:"cards"`
}

MTGSet is a struct containing all the information on a set of MTG.

Jump to

Keyboard shortcuts

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