bot

package
v0.0.0-...-3d4fb19 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

func New

func New(opts *Options) (*Bot, error)

func (*Bot) Connect

func (b *Bot) Connect(ctx context.Context) error

func (*Bot) FromMessage

func (b *Bot) FromMessage(m *types.Message) *Context

type Context

type Context struct {
	Message *types.Message

	Channel *channel.Resource
	Guild   *guild.Resource
}

func (*Context) Reply

func (c *Context) Reply(ctx context.Context, msg string, args ...interface{})

func (*Context) Timeout

func (c *Context) Timeout(ctx context.Context) error

type Options

type Options struct {
	Debug bool
	Token string

	DB *sql.DB
}

Jump to

Keyboard shortcuts

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