roles

package
v0.0.0-...-710481b Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SelfAssignFile string = "data/selfAssignRoles.json"

SelfAssignFile is the path were tha self assign role data is located

Variables

This section is empty.

Functions

This section is empty.

Types

type Assigner

type Assigner interface {
	ExecuteRoleCommands(req []string, msg *dg.MessageCreate) (*dg.MessageEmbed, error)
	LoadSelfAssignRoles(file string) error
	AutoPromote(msg *dg.MessageCreate) error
	LoadAutoRanks(file string) error
}

Assigner is the interface for interacting with the roleAction methods

func NewRoleStorage

func NewRoleStorage(s *dg.Session, xp *xp.System) Assigner

NewRoleStorage creates the roles package data storage map for the session

type DgSession

type DgSession interface {
	GuildRoles(guildID string) (st []*dg.Role, err error)
	GuildMember(guildID string, userID string) (st *dg.Member, err error)
	GuildMembers(guildID string, after string, limit int) (st []*dg.Member, err error)
	GuildMemberRoleAdd(guildID string, userID string, roleID string) (err error)
	GuildMemberRoleRemove(guildID string, userID string, roleID string) (err error)
}

DgSession is the interface for mocking the discordgo session functions in this package.

type MsgEmbed

type MsgEmbed *dg.MessageEmbed

MsgEmbed is used to shorten the name of the original embed type from discordGo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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