common

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsExtractChannelTypes

func FieldsExtractChannelTypes(
	event *events.Event, args []string, types ...discordgo.ChannelType,
) (*discordgo.Channel, []string, error)

Types

type Command

type Command struct {
	Name                string
	SkipRootCommand     bool
	SkipPrefix          bool
	Params              []CommandParam
	Description         string
	PermissionsRequired Permissions
	PermissionsString   string
}

type CommandParam

type CommandParam struct {
	Name     string
	Example  string
	Type     ParamType
	Optional bool
}

type ParamType

type ParamType int
const (
	Text ParamType = iota
	QuotedText
	Flag
	User
	Channel
	Link
	Attachment
	Duration
	DiscordInvite
)

type Permissions

type Permissions []interfaces.Permission

func (Permissions) String

func (p Permissions) String() (permissionsText string)

type PluginHelp

type PluginHelp struct {
	Names               []string
	Description         string
	Commands            []Command
	Reactions           []Reaction
	Hide                bool
	PermissionsRequired Permissions
	PermissionsString   string
}

type Reaction

type Reaction struct {
	Name                string
	EmojiName           string
	Description         string
	PermissionsRequired Permissions
	PermissionsString   string
}

type StartParameters

type StartParameters struct {
	Logger         *zap.Logger
	DB             *gorm.DB
	Redis          *redis.Client
	Tokens         map[string]string
	State          *state.State
	FeatureFlagger *featureflag.FeatureFlagger
	PluginHelpList []*PluginHelp
	Localizations  []interfaces.Localization
	Publisher      *events.Publisher
	HTTPMux        *chi.Mux
}

type StopParameters

type StopParameters struct {
	Logger         *zap.Logger
	DB             *gorm.DB
	Redis          *redis.Client
	Tokens         map[string]string
	State          *state.State
	FeatureFlagger *featureflag.FeatureFlagger
	Localizations  []interfaces.Localization
	Publisher      *events.Publisher
}

Jump to

Keyboard shortcuts

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