discord

package
v0.0.0-...-e72cd69 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventHandler

func EventHandler(ctx *types.Context, s *discordgo.Session, m *discordgo.MessageCreate)

EventHandler function will be called (due to AddHandler above) every time a new message is created on any channel that the authenticated bot has access to.

func GetChannels

func GetChannels(chanId string, channels map[string]types.ChannelMapping) (types.ChannelMapping, error)

func SendEdit

func SendEdit(ctx types.Context, channel types.ChannelMapping, message types.GoferEditedMessage) error

func SendFile

func SendFile(ctx types.Context, channel types.ChannelMapping, file types.GoferFile) error

func SendImage

func SendImage(ctx types.Context, channel types.ChannelMapping, photo types.GoferPhoto) error

func SendMessage

func SendMessage(ctx types.Context, channel types.ChannelMapping, message types.GoferMessage) error

func SendMisc

func SendMisc(ctx types.Context, channel types.ChannelMapping, misc types.GoferMisc) error

func SendWebHookMessage

func SendWebHookMessage(ctx types.Context, channel types.ChannelMapping, message types.GoferMessage) error

Types

type DiscordWebHook

type DiscordWebHook struct {
	Content   string `json:"content"`
	Username  string `json:"username"`
	AvatarUrl string `json:"avatar_url"`
}

Jump to

Keyboard shortcuts

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