discordance

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 8 Imported by: 2

README

Discordance

Build Issues Pull Requests Go Doc License

A wrapper around discordgo for bots.

Documentation

Overview

Package discordance allows connection to discord and registration of various handlers for a bot interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

Connection to a discord server.

func Connect

func Connect(settings config.Discord) (*Connection, error)

Connect to discord using the given config.

func (*Connection) Commands

func (c *Connection) Commands(commands ...*command.Definition)

Commands understood by the connection.

func (*Connection) Listen

func (c *Connection) Listen()

Listen for events. Listen blocks until SIGINT is received.

func (*Connection) Message

func (c *Connection) Message(handlers ...message.Handler)

Message handlers to register on the connection.

func (*Connection) Send

func (c *Connection) Send(msg message.Outbound) error

Send a message on this connection.

func (*Connection) Unregister

func (c *Connection) Unregister()

Unregister all commands for this bot.

Directories

Path Synopsis
Package command defines application commands and handlers for the bot.
Package command defines application commands and handlers for the bot.
Package config provides goconfigure compatible configuration blocks for a discordance bot.
Package config provides goconfigure compatible configuration blocks for a discordance bot.
Package message handles replies and message events.
Package message handles replies and message events.

Jump to

Keyboard shortcuts

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