40 *DiscordRestConnection
conn;
74 hash<auto>
doRestCommand(
string method,
string path,
auto body, reference<hash<auto>> info);
80 bool retry(hash<ExceptionInfo> ex, reference<int> retries);
The Discord data provider base class.
Definition DiscordDataProviderBase.qc.dox.h:28
bool retry(hash< ExceptionInfo > ex, reference< int > retries)
Returns True if the error indicates that the operation should be retried.
constructor(DiscordRestConnection conn, *Logger::LoggerInterface logger)
Creates the object.
constructor()
Creates the object.
constructor(DiscordRestClient rest, *Logger::LoggerInterface logger)
Creates the object.
*DiscordRestClient rest
The REST client object for API calls.
Definition DiscordDataProviderBase.qc.dox.h:43
*DiscordRestConnection conn
The connection object used to create the REST client.
Definition DiscordDataProviderBase.qc.dox.h:40
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
hash< auto > doRestCommand(string method, string path, auto body, reference< hash< auto > > info)
Makes a REST call and returns the response; handles rate limit responses.
static threadWait(date wait_period)
Wait for a given period of time.
const MaxIoRetries
Max retries.
Definition DiscordDataProviderBase.qc.dox.h:36
const RetrySet
IO errors for REST retries.
Definition DiscordDataProviderBase.qc.dox.h:32
hash< auto > getGuild(string id)
Retrieves info for the given guild; must be accessible to the calling user.
Qore DiscordDataProvider module definition.
Definition DiscordDataProvider.qc.dox.h:26