discord

package
v0.0.0-...-d0af5f0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 6 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
}

Discord .. Every module will need to pass around this struct to add Message

func NewDiscord

func NewDiscord(token string, modules *modules.Modules) (*Discord, error)

NewDiscord returns a Discord Client Default prefix: !

func (*Discord) Close

func (d *Discord) Close()

Close shuts down the websocket connection to Discord

func (*Discord) InitHandlers

func (d *Discord) InitHandlers()

InitHandlers adds all handlers to the discord session

func (*Discord) InitModules

func (d *Discord) InitModules()

InitModules registers a handler to the bot. Only when the prefix is present

func (*Discord) SetPrefix

func (d *Discord) SetPrefix(prefix string)

SetPrefix overrides the default prefix of "!". Must be used before InitHandler()

func (*Discord) Start

func (d *Discord) Start()

Start opens a websocket connection to Discord and begins listening

Jump to

Keyboard shortcuts

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