interactionsapi

package
v0.0.0-...-02eba7e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdPing       = "ping"
	CmdCharacters = "characters"
)
View Source
const (
	ErrTypeInternalServerError = errTypePrefix + "internal-server-error"
	ErrTypeUnknownCommand      = errTypePrefix + "unknown-command"
)

Variables

View Source
var Commands = map[string]*discordgo.ApplicationCommand{
	CmdPing: &discordgo.ApplicationCommand{
		Description: "Make the bot respond with a pong.",
	},
	CmdCharacters: &discordgo.ApplicationCommand{
		Description: "Print character creation availability status of all worlds.",
	},
}

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Type     string `json:"type"`
	Title    string `json:"title,omitempty"`
	Status   int    `json:"status,omitempty"`
	Detail   string `json:"detail,omitempty"`
	Instance string `json:"instance,omitempty"`
}

ErrorResponse is an object as defined by RFC 7807.

type Server

type Server struct {
	Logger logger.Logger

	API ffxivapi.Client

	DiscordApplicationID string
	DiscordPublicKey     ed25519.PublicKey
	DiscordThumbnailURL  string
	DiscordToken         string

	SkipDiscordRequestValidation bool
	// contains filtered or unexported fields
}

func (*Server) Cleanup

func (s *Server) Cleanup() error

func (*Server) Initialize

func (s *Server) Initialize() error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Worlds

type Worlds []ffxivapi.World

func (Worlds) Embed

func (worlds Worlds) Embed(title string, thumbnailURL string) (*discordgo.MessageEmbed, error)

Jump to

Keyboard shortcuts

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