interfaces

package
v0.0.0-...-a30b172 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 2 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Localization

type Localization interface {
	Language() string
	Translate(string) string
	Translatef(string, ...interface{}) string
	TranslateMap(string, map[interface{}]interface{}) string
}

Localization represents a localization service

type Permission

type Permission interface {
	Name() string
	Match(
		state State,
		db *gorm.DB,
		userID string,
		channelID string,
		dm bool,
		superUser bool,
	) bool
}

type State

type State interface {
	Channel(channelID string) (channel *discordgo.Channel, err error)
	Guild(guildID string) (guild *discordgo.Guild, err error)
	Member(guildID, userID string) (member *discordgo.Member, err error)
	Role(guildID, roleID string) (role *discordgo.Role, err error)

	UserPermissions(userID, guildID string) (apermissions int64, err error)
	UserChannelPermissions(userID, channelID string) (apermissions int64, err error)
}

Jump to

Keyboard shortcuts

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