discord

package
v0.0.0-...-57c80df Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands map[string]Command

Functions

func CreateChannel

func CreateChannel(name string, parent string) (channel *discordgo.Channel)

parent - cateogy to put channel under

func GetChannelByName

func GetChannelByName(name string) (channelid string)

will return empty if channel was not found

func SanitizeMsg

func SanitizeMsg(msg *discordgo.MessageCreate) (ret string)

replace discord emotes with text

func SendMessage

func SendMessage(channelId string, msg string, username string)

func SetupBot

func SetupBot()

func SetupWebhook

func SetupWebhook(channelId string) (webhookId string, token string)

Types

type CHelp

type CHelp struct{}

func (CHelp) Description

func (_ CHelp) Description() string

func (CHelp) Run

func (_ CHelp) Run(msg *discordgo.Message)

type CNames

type CNames struct {
	// this is used because IRC is retarded and sends message in parts
	// key is channel name, [] is array of names
	Buf map[string][]string
}

func (*CNames) AtEnd

func (cmd *CNames) AtEnd(channelName string)

func (CNames) Description

func (_ CNames) Description() string

func (CNames) Run

func (_ CNames) Run(msg *discordgo.Message)

type CWhois

type CWhois struct{}

func (CWhois) Description

func (_ CWhois) Description() string

func (CWhois) Run

func (_ CWhois) Run(msg *discordgo.Message)

type Command

type Command interface {
	Description() string
	Run(msg *discordgo.Message)
}

Jump to

Keyboard shortcuts

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