message

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package message handles replies and message events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher []Handler

Dispatcher for inbound messages to Handlers.

func (*Dispatcher) Dispatch

func (d *Dispatcher) Dispatch(s *discordgo.Session, m *discordgo.MessageCreate)

Dispatch an inbound message to the registered handlers.

type Editor added in v0.0.5

type Editor interface {
	ChannelMessageEditComplex(m *discordgo.MessageEdit) (st *discordgo.Message, err error)
}

Editor used to edit messages on the underlying platform.

type Handler

type Handler func(m Messenger, msg *discordgo.Message)

Handler used to process inbound messages.

type Messenger added in v0.0.5

type Messenger interface {
	Sender
	Editor
}

Messenger can send and edit messages.

type Sender

type Sender interface {
	ChannelMessageSendComplex(channelID string,
		m *discordgo.MessageSend) (st *discordgo.Message, err error)
}

Sender used to send messages to the underlying platform.

Jump to

Keyboard shortcuts

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