Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRoleNames ¶ added in v0.0.22
GetRoleNames returns the plain-english names of the roles a member has.
func HasPermission ¶
func HasPermission(member *discordgo.Member, session *discordgo.Session, guildID string, config *RoleConfig, cmdData *discordgo.ApplicationCommandInteractionData) bool
HasPermission checks if a member has permission to execute a command.
func NoPermissionError ¶
NoPermissionError returns a formatted error message for permission denied.
Types ¶
type BotContext ¶
type BotContext interface {
// GetSession returns the Discord session.
GetSession() *discordgo.Session
// GetScheduler returns the scheduler.
GetScheduler() *scheduler.Scheduler
// GetMonitorRepo returns the monitor repository.
GetMonitorRepo() *store.MonitorRepo
// GetChecksRepo returns the checks repository.
GetChecksRepo() *store.ChecksRepo
// GetMentionsRepo returns the mentions repository.
GetMentionsRepo() *store.MentionsRepo
// GetHiveSummaryRepo returns the Hive summary repository.
GetHiveSummaryRepo() *store.HiveSummaryRepo
// GetGrafana returns the Grafana client.
GetGrafana() grafana.Client
// GetHive returns the Hive client.
GetHive() hive.Hive
// GetCartographoor returns the cartographoor service.
GetCartographoor() *cartographoor.Service
// GetRoleConfig returns the role configuration.
GetRoleConfig() *RoleConfig
}
BotContext provides access to bot functionality needed by commands.
type Command ¶
type Command interface {
// Name returns the name of the command.
Name() string
// Register registers the command with the given session.
Register(*discordgo.Session) error
// Handle handles the command.
Handle(*discordgo.Session, *discordgo.InteractionCreate)
}
Command represents a Discord slash command.
Click to show internal directories.
Click to hide internal directories.