Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorEventInvalid = fmt.Errorf("discord: unknown event") ErrorEventHandlerFunctionInvalid = fmt.Errorf("discord: unknown event handler function signature") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(apikey string, intents primitives.GatewayIntent) *Client
New Client using specified apikey without a "Bot " prefix
func (*Client) AddHandlerFunc ¶
type GatewayEventHandler ¶
type GatewayEventHandler struct {
// contains filtered or unexported fields
}
GatewayEventHandler is an event handler specifically for primitives.GatewayEvent(s)
func (*GatewayEventHandler) FireEvent ¶
func (eventHandler *GatewayEventHandler) FireEvent(event primitives.GatewayEvent) error
FireEvent to registered EventHandlerFunctions; can return a ErrorEventInvalid if EventType is unknown
func (*GatewayEventHandler) RegisterEventHandlerFunction ¶
func (eventHandler *GatewayEventHandler) RegisterEventHandlerFunction(handlerFunction interface{}) error
RegisterEventHandlerFunction to be called when an Event is fired
func (*GatewayEventHandler) RemoveEventHandlerFunction ¶
func (eventHandler *GatewayEventHandler) RemoveEventHandlerFunction(handlerFunction interface{}) error
RemoveEventHandlerFunction and prevent it from being called again
Click to show internal directories.
Click to hide internal directories.