bot

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChannelRegex         = regexp.MustCompile("(?:<#)?([0-9]+)>?")
	ChannelRegexExplicit = regexp.MustCompile("^(?:<#)?([0-9]+)>?$")
	UserRegex            = regexp.MustCompile("(?:<@!?)?([0-9]+)>?")
	RoleRegex            = regexp.MustCompile("(?:<@&)?([0-9]+)>?")
)

Functions

func CapitalChannelName

func CapitalChannelName(c *discordgo.Channel) string

func ChannelCommand

func ChannelCommand(ctx *exrouter.Context, cmdType ChannelCmdType)

func ChannelCommandRoute

func ChannelCommandRoute(ctx *exrouter.Context)

func EntitiesCMD

func EntitiesCMD(ctx *exrouter.Context)

func GetMessageGuild

func GetMessageGuild(c *exrouter.Context, m *discordgo.Message) (*discordgo.Guild, error)

func GuildMemberPermissions

func GuildMemberPermissions(member *discordgo.Member, guild *discordgo.Guild) (apermissions int)

func ParseChannel

func ParseChannel(arg string) (string, bool)

func TransformMentions added in v1.1.0

func TransformMentions(session *discordgo.Session, cid string, body string) string

Types

type ChannelCmdType

type ChannelCmdType int
const (
	Receive ChannelCmdType = iota
	Send
)

type DiscordBot

type DiscordBot struct {
	Session *discordgo.Session
}
var RelayBot *DiscordBot

func (*DiscordBot) Listen

func (b *DiscordBot) Listen()

Jump to

Keyboard shortcuts

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