handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package handler contains the main Discord-related logic for handling messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ChannelID is the channel where the bot should listen to messages
	// from.
	ChannelID string
}

TODO: move somewhere else

type Handler

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

func New

func New(conf *Config, logger *log.Logger) *Handler

New creates a new handler with the default set of providers enabled.

func (*Handler) Handle

func (h *Handler) Handle(s *discordgo.Session, m *discordgo.MessageCreate)

Handler implements a discordgo.EventHandler for handling new messages being sent.

Jump to

Keyboard shortcuts

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