bothelper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMembersPerFetch = 1000
)

Variables

View Source
var (
	ErrNotFound  = errors.New("not found")
	ErrManyFound = errors.New("many found")
)

Functions

func Fold

func Fold(s string) string

func IsMatchingNick

func IsMatchingNick(nick string, m *discordgo.Member) bool

Types

type BotHelper

type BotHelper struct {
	*discordgo.Session
}

func New

func New(session *discordgo.Session) *BotHelper

func (*BotHelper) CategoryByArgument added in v0.3.0

func (h *BotHelper) CategoryByArgument(gid, arg string) (*discordgo.Channel, error)

func (*BotHelper) CategoryById added in v0.3.0

func (h *BotHelper) CategoryById(id string) (*discordgo.Channel, error)

func (*BotHelper) CategoryByName added in v0.3.0

func (h *BotHelper) CategoryByName(gid, name string) (*discordgo.Channel, error)

func (*BotHelper) ChannelByArgument

func (h *BotHelper) ChannelByArgument(gid, arg string) (*discordgo.Channel, error)

func (*BotHelper) ChannelById

func (h *BotHelper) ChannelById(id string) (*discordgo.Channel, error)

func (*BotHelper) ChannelByName

func (h *BotHelper) ChannelByName(gid, name string) (*discordgo.Channel, error)

func (*BotHelper) GuildById

func (h *BotHelper) GuildById(id string) (*discordgo.Guild, error)

func (*BotHelper) Me

func (h *BotHelper) Me() *discordgo.User

func (*BotHelper) MemberByArgument

func (h *BotHelper) MemberByArgument(gid, arg string) (*discordgo.Member, error)

func (*BotHelper) MemberById

func (h *BotHelper) MemberById(gid, uid string) (*discordgo.Member, error)

func (*BotHelper) MemberByName

func (h *BotHelper) MemberByName(gid, name string) (*discordgo.Member, error)

func (*BotHelper) RoleByArgument

func (h *BotHelper) RoleByArgument(gid, arg string) (*discordgo.Role, error)

func (*BotHelper) RoleById

func (h *BotHelper) RoleById(gid, rid string) (*discordgo.Role, error)

func (*BotHelper) RoleByName

func (h *BotHelper) RoleByName(gid, name string) (*discordgo.Role, error)

Jump to

Keyboard shortcuts

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