API Reference¶
Events¶
BrainPywer Events Implementation Some implementation details taken from discord.py written by Danny/Rapptz at https://github.com/Rapptz/discord.py
-
class
brainpywer.events.
Events
[source]¶ -
add
(func)[source]¶ This is the decorator version of adding events
Parameters: func (function) – The function we’re registering as an event Returns: func
-
dispatch
(message)[source]¶ This function takes a message received from the Dispatcher and sends it to the proper handler. If no handler is defined, we call the default handler which should always be defined.
Parameters: message (tuple (event name, relevant data)) – The message to be dispatched. Returns: Nothing
-
has_handler
(event)[source]¶ Do we have a handler defined for this event?
Parameters: event (str) – The event name to handle Returns: True if we have a handler defined Returns: False if no handler is defined for the event
-
Dispatcher¶
Http-thingamabob¶
BrainPywer Gateway testing implementation
-
class
brainpywer.http.
HttpClient
(token: str)[source]¶ HttpClient Class for things
-
get_channel
(channel: str)[source]¶ Get a channel by ID. Returns a guild channel or dm channel object.
Parameters: channel (str) – channel id to get Returns:
-