Documentation ¶
Overview ¶
Package bacotell_plugin provides the plugin entrypoint.
Index ¶
- func Debug(id, token string) (hclog.Logger, <-chan struct{}, error)
- func DebugCustom(customPlugin common.Plugin, token string) (hclog.Logger, <-chan struct{}, error)
- func Run(id string) (hclog.Logger, <-chan struct{}, error)
- func RunCustom(customPlugin common.Plugin) (hclog.Logger, <-chan struct{}, error)
- func SetApplicationCommands(commands ...common.Command)
- func SetMessageComponents(components ...common.Component)
- func SetModals(modals ...common.Modal)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug starts the plugin in debug mode with the provided id, bot token and a default plugin implementation.
In debug mode a BacoTell instance is started within the plugin process so that the plugin can be executed directly. This allows for easy debugging within an IDE. The embedded BacoTell only loads the current plugin.
Before calling this all commands, component, etc. that should be provided by the plugin must be set using the functions SetApplicationCommands, SetMessageComponents, etc. The returned logger should be used by the plugin code to log messages to stdout/stderr. Because this function does not wait for the plugin to terminate again, the returned channel should be used to block until it gets closed, signaling a exit.
func DebugCustom ¶
DebugCustom starts the plugin in debug mode with the provided id, bot token and custom plugin implementation.
In debug mode a BacoTell instance is started within the plugin process so that the plugin can be executed directly. This allows for easy debugging within an IDE. The embedded BacoTell only loads the current plugin.
The returned logger should be used by the plugin code to log messages to stdout/stderr. Because this function does not wait for the plugin to terminate again, the returned channel should be used to block until it gets closed, signaling a exit.
func Run ¶
Run starts the plugin with the provided id and a default plugin implementation.
Before calling this all commands, component, etc. that should be provided by the plugin must be set using the functions SetApplicationCommands, SetMessageComponents, etc. The returned logger should be used by the plugin code to log messages to stdout/stderr. Because this function does not wait for the plugin to terminate again, the returned channel should be used to block until it gets closed, signaling a exit.
func RunCustom ¶
RunCustom starts the plugin with the provided id and custom plugin implementation.
The returned logger should be used by the plugin code to log messages to stdout/stderr. Because this function does not wait for the plugin to terminate again, the returned channel should be used to block until it gets closed, signaling a exit.
func SetApplicationCommands ¶
SetApplicationCommands sets the commands provided by the current plugin.
func SetMessageComponents ¶
SetMessageComponents sets the components provided by the current plugin.
Types ¶
This section is empty.