discord

package
v0.0.0-...-2e53e79 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HalvaGuildID = discord.GuildID(623964456929591297)

	MonkaS = "<:monkaS:817041877718138891>"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*state.State
	// contains filtered or unexported fields
}
var State *Client

func NewClient

func NewClient(cfg Config, logger *zap.Logger, debug bool) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

func (*Client) RegisterBoth

func (c *Client) RegisterBoth(cmd api.CreateCommandData, cmdHandle CommandHandlerFunc, msgHandle MessageHandlerFunc)

func (*Client) RegisterCommand

func (c *Client) RegisterCommand(cmd api.CreateCommandData, cmdHandle CommandHandlerFunc)

func (*Client) RegisterMessageCommand

func (c *Client) RegisterMessageCommand(name string, handle MessageHandlerFunc)

type CommandHandlerFunc

type CommandHandlerFunc func(ctx context.Context, data cmdroute.CommandData) (*api.InteractionResponseData, error)

type Config

type Config struct {
	Token        string
	Prefix       string
	DebugChannel int64 `yaml:"debug_channel"`
}

type MessageHandlerFunc

type MessageHandlerFunc func(ctx context.Context, c *gateway.MessageCreateEvent) (*api.SendMessageData, error)

Jump to

Keyboard shortcuts

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