discord

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelMessageSendError

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

ChannelMessageSendError is an implementation of the error interface used to signify an error sending a message to a channel.

func NewChannelMessageSendError

func NewChannelMessageSendError(e error) *ChannelMessageSendError

NewChannelMessageSendError returns a new instance of ChannelMessageSendError.

func (*ChannelMessageSendError) Error

func (e *ChannelMessageSendError) Error() string

Error implements the error interface for ChannelMessageSendError type.

type Credentials

type Credentials struct {
	Token string
}

Credentials stores the credentials necessary for authentication with the Discord API.

type Session

type Session discordgo.Session

Session is an alias for discordgo.Session with some additional receiver functions for convenience.

func GetSession

func GetSession(c *Credentials) (*Session, error)

GetSession returns a discord session given proper credentials.

func (*Session) Send

func (s *Session) Send(messages []string) []error

Send is a convenience function wrapping the discord session functionality.

Jump to

Keyboard shortcuts

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