31class DiscordGatewayDataProvider :
public DataProvider::AbstractDataProvider,
public DataProvider::DelayedObservable,
public DataProvider::Observer {
44 *DiscordWebSocketClient::DiscordWebSocketConnection
conn;
47 *DiscordWebSocketClient::DiscordWebSocketClient
ws;
76 update(
string event_id, hash<auto> msg);
108 static DiscordWebSocketClient::DiscordWebSocketClient
getWebSocketConnection(*hash<auto> options, *Logger::LoggerInterface logger);
The Discord gateway data provider class.
Definition DiscordGatewayDataProvider.qc.dox.h:31
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
*hash< DataProviderConnectionInfo > getConnectionInfoImpl()
Returns connection info.
static DiscordWebSocketClient::DiscordWebSocketClient getWebSocketConnection(*hash< auto > options, *Logger::LoggerInterface logger)
Returns a DiscordWebSocketClient connection from the options.
string getName()
Returns the data provider name.
*DiscordWebSocketClient::DiscordWebSocketConnection conn
The connection object used to create the REST client.
Definition DiscordGatewayDataProvider.qc.dox.h:44
stopEvents()
Called to stop generating events.
hash< DataProvider::DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
const ConstructorOptions
Constructor options.
Definition DiscordGatewayDataProvider.qc.dox.h:39
observersReady()
Called when all observers have been added to the object.
constructor(DiscordWebSocketClient::DiscordWebSocketClient ws)
Creates the object from a DiscordWebSocketClient.
hash< auto > getWebSocketInfo()
Returns information about the connection.
constructor(DiscordWebSocketClient::DiscordWebSocketConnection conn)
Creates the object from a DiscordWebSocketConnection.
*DiscordWebSocketClient::DiscordWebSocketClient ws
The WebSocket client object.
Definition DiscordGatewayDataProvider.qc.dox.h:47
constructor(*hash< auto > options)
Creates the object from constructor options.
const ProviderInfo
Provider info.
Definition DiscordGatewayDataProvider.qc.dox.h:35
destructor()
Deletes the object.
*string getDesc()
Returns the data provider description.
bool reconnect()
Reconnects with the gateway immediately.
hash< string, hash< DataProviderMessageInfo > > getEventTypesImpl()
Returns a hash of all supported event types.
update(string event_id, hash< auto > msg)
This method is called when an event is raised.
Qore DiscordDataProvider module definition.
Definition DiscordDataProvider.qc.dox.h:26
const EVENT_MESSAGE_CREATE
Discord MESSAGE_CREATE event constant.
Definition DiscordGatewayDataProvider.qc.dox.h:28