roles

package
v0.0.0-...-8101777 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: AGPL-3.0-or-later Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerRoleNotFound          string = "roles.role.role-not-found-on-server"
	MultipleServerRolesWithName string = "roles.role.multiple-server-roles-with-name"
)
View Source
const (
	PLUS  = "+"
	MINUS = "-"
)
View Source
const (
	INTERVAL = 30 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	gorm.Model

	Name      string
	GuildID   string
	ChannelID string // the channel this Category will listen to for role assignments
	Roles     []Role `gorm:"foreignkey:CategoryID"`
	Enabled   bool
	Hidden    bool
	Limit     int // 0 = no limit
}

func (*Category) TableName

func (*Category) TableName() string

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Action

func (p *Plugin) Action(event *events.Event) bool

func (*Plugin) Help

func (p *Plugin) Help() *common.PluginHelp

func (*Plugin) Names

func (p *Plugin) Names() []string

func (*Plugin) Passthrough

func (p *Plugin) Passthrough() bool

func (*Plugin) Priority

func (p *Plugin) Priority() int

func (*Plugin) Start

func (p *Plugin) Start(params common.StartParameters) error

func (*Plugin) Stop

func (p *Plugin) Stop(params common.StopParameters) error

type Role

type Role struct {
	gorm.Model

	CategoryID   uint // roles aren't guarenteed to have a category
	GuildID      string
	ServerRoleID string
	PrintName    string
	Emoji        string
	Enabled      bool
	Aliases      pq.StringArray `gorm:"type:varchar[]"`
}

func (*Role) Match

func (r *Role) Match(state *state.State, input string) bool

matches the input to see if its the server role name or the print name, or one of the aliases

func (*Role) Name

func (r *Role) Name(state *state.State) string

func (*Role) TableName

func (*Role) TableName() string

Jump to

Keyboard shortcuts

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