discord

package
v0.0.0-...-26efd1a Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackHandler

type CallbackHandler func(s *discordgo.Session, m *discordgo.MessageCreate) error

type DiscordService

type DiscordService struct {
	Session *discordgo.Session
}

func NewService

func NewService(token string) (*DiscordService, error)

NewService creates a new discord service instance.

func (*DiscordService) CommandMessageCreateHandler

func (ds *DiscordService) CommandMessageCreateHandler(callback CallbackHandler, prefix string)

CommandMessageCreateHandler handles the message interaction.

func (*DiscordService) Connect

func (ds *DiscordService) Connect() error

Connect creates a websocket connection to Discord.

func (*DiscordService) Disconnect

func (ds *DiscordService) Disconnect() error

Disconnect closes a websocket connection to Discord.

Jump to

Keyboard shortcuts

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