client

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

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

func NewDiscord

func NewDiscord(token string) (*Discord, error)

func (*Discord) Author

func (client *Discord) Author(id string) (string, error)

func (*Discord) Close

func (client *Discord) Close() error

func (*Discord) GetPinned added in v0.4.0

func (client *Discord) GetPinned(channelID string) ([]string, error)

func (*Discord) HandleMessageCreate

func (client *Discord) HandleMessageCreate(_ *discord.Session, m *discord.MessageCreate)

func (*Discord) HandleMessageUpdate added in v0.5.0

func (client *Discord) HandleMessageUpdate(_ *discord.Session, m *discord.MessageUpdate)

func (*Discord) Ping added in v0.3.0

func (client *Discord) Ping() bool

func (*Discord) SendMessage

func (client *Discord) SendMessage(channelID, authorID, content string) error

func (*Discord) SendMessages

func (client *Discord) SendMessages(channelID, authorID string, messages ...string)

func (*Discord) SubscribeMessageEvents

func (client *Discord) SubscribeMessageEvents(publisher Publisher)

type Joke

type Joke struct {
	Content string `json:"joke"`
}

type Joker

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

func NewJoker

func NewJoker() Joker

func (Joker) GetRandomJoke

func (client Joker) GetRandomJoke(ctx context.Context) (Joke, error)

type Publisher

type Publisher interface {
	Publish(channelID, authorID string, message string)
}

Jump to

Keyboard shortcuts

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