Documentation
¶
Index ¶
- Constants
- func NewClient(token string, log logger.Logger) *discordClient
- func NewLibrary(log logger.Logger, cfg ...*netsecurity.Config) *object.Library
- func NewLibraryConfigured(log logger.Logger, allowedPaths []string, cfg ...*netsecurity.Config) *object.Library
- func Register(registrar interface{ ... }, log logger.Logger, cfg ...*netsecurity.Config)
- func RegisterConfigured(registrar interface{ ... }, log logger.Logger, allowedPaths []string, ...)
Constants ¶
View Source
const LibraryName = "scriptling.messaging.discord"
LibraryName is the import path used in Scriptling scripts.
Variables ¶
This section is empty.
Functions ¶
func NewLibrary ¶
NewLibrary creates the scriptling.messaging.discord library. An optional network policy governs URLs scripts pass to download() that are not Discord's own hosts.
func NewLibraryConfigured ¶ added in v0.33.0
func NewLibraryConfigured(log logger.Logger, allowedPaths []string, cfg ...*netsecurity.Config) *object.Library
NewLibraryConfigured is NewLibrary with send_file confined to allowedPaths (nil = unrestricted, empty = deny all), as the os library is.
func Register ¶
func Register(registrar interface{ RegisterLibrary(*object.Library) }, log logger.Logger, cfg ...*netsecurity.Config)
Register registers the discord library with a Scriptling instance.
func RegisterConfigured ¶ added in v0.33.0
func RegisterConfigured(registrar interface{ RegisterLibrary(*object.Library) }, log logger.Logger, allowedPaths []string, cfg ...*netsecurity.Config)
RegisterConfigured registers the discord library with send_file confined to allowedPaths (nil = unrestricted, empty = deny all).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.