Orca
A bot framework that is easy to reason about, easy to debug, and easy to use.
Public Attributes | List of all members
discord_bucket Struct Reference

The bucket struct that will handle ratelimiting. More...

#include <discord-internal.h>

Public Attributes

char route [256]
 this bucket 'key'
 
char hash [128]
 the unique hash associated with this bucket
 
int busy
 amount of busy connections that have not yet finished its requests
 
int remaining
 connections this bucket can do before waiting for cooldown
 
int64_t reset_after_ms
 how long until cooldown timer resets
 
u64_unix_ms_t reset_tstamp
 timestamp of when cooldown timer resets
 
u64_unix_ms_t update_tstamp
 timestamp of the most recent request
 
pthread_mutex_t lock
 synchronize buckets between threads
 
pthread_cond_t cond
 
UT_hash_handle hh
 makes this structure hashable
 

Detailed Description

The bucket struct that will handle ratelimiting.

See also
https://discord.com/developers/docs/topics/rate-limits

The documentation for this struct was generated from the following file: