components

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LogComponentRegistry = "Component Manager"

LogComponentRegistry is the custom component name used to identify log messages from the component management system

Variables

View Source
var Components = []*api.Component{
	bot_log.C,
	pingpong.C,
}

Components contains all components that should be available.

Enabled components should be registered here.

Functions

func RegisterComponents

func RegisterComponents(discord *discordgo.Session)

RegisterComponents handles the initialization of all components listed in the Components array.

When it is not possible to register a component, an error will be printed into the log. The application will continue to run as nothing happened.

func UnloadComponents

func UnloadComponents(discord *discordgo.Session)

UnloadComponents iterates through all registered api.Component registered in the Components array and calls their UnloadComponent function.

If an api.Component does not have an UnloadComponent function defined, it will be ignored.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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