Skip to content

Commit

Permalink
refactor: changed some brief from requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Oct 31, 2023
1 parent f0164b0 commit 421a797
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 21 deletions.
2 changes: 1 addition & 1 deletion doxygen-awesome-css
17 changes: 12 additions & 5 deletions include/dpp/guild.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ class DPP_EXPORT guild_member : public json_interface<guild_member> {

protected:
/**
* @brief Nickname, or empty string if they don't have a nickname on this guild
* @brief Nickname.
*
* @note Empty string if they don't have a nickname on this guild
*/
std::string nickname;

Expand Down Expand Up @@ -445,9 +447,12 @@ class DPP_EXPORT guild_member : public json_interface<guild_member> {
snowflake user_id;

/**
* @brief User avatar (per-server avatar is a nitro only feature)
* @brief User avatar.
*
* @note Per-server avatar is a nitro only feature.
*/
utility::iconhash avatar;

/**
* @brief Timestamp of when the time out will be removed; until then, they cannot interact with the guild
*/
Expand Down Expand Up @@ -707,7 +712,9 @@ struct DPP_EXPORT welcome_channel : public json_interface<welcome_channel> {
std::string description;

/**
* @brief The emoji name if custom, the unicode character if standard, or null if no emoji is set.
* @brief The emoji name.
*
* @note name if custom, the unicode character if standard, or null if no emoji is set.
*/
std::string emoji_name;

Expand Down Expand Up @@ -852,8 +859,8 @@ enum guild_explicit_content_t : uint8_t {
};

/**
* @brief MFA level for server. If set to elevated all moderators need MFA to perform specific
* actions such as kick or ban.
* @brief MFA level for server.
* If set to elevated all moderators need MFA to perform specific actions such as kick or ban.
*/
enum mfa_level_t : uint8_t {
/**
Expand Down
5 changes: 3 additions & 2 deletions include/dpp/permissions.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ enum permissions : uint64_t {
p_use_embedded_activities = 0x08000000000,

/**
* @brief Allows for timing out users to prevent them from sending or reacting
* to messages in chat and threads, and from speaking in voice and stage channels.
* @brief Allows for timing out users
* to prevent them from sending or reacting to messages in chat and threads,
* and from speaking in voice and stage channels.
*/
p_moderate_members = 0x10000000000,

Expand Down
23 changes: 15 additions & 8 deletions include/dpp/presence.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,14 @@ struct DPP_EXPORT activity_party {
snowflake id;

/**
* @brief The party's current size. Used to show the party's current size.
* @brief The party's current size.
* Used to show the party's current size.
*/
int32_t current_size;

/**
* @brief The party's maximum size. Used to show the party's maximum size.
* @brief The party's maximum size.
* Used to show the party's maximum size.
*/
int32_t maximum_size;

Expand All @@ -358,12 +360,14 @@ struct DPP_EXPORT activity_party {
class DPP_EXPORT activity {
public:
/**
* @brief Name of activity (e.g. "Fortnite", "Mr Boom's Firework Factory", etc).
* @brief Name of activity.
* e.g. "Fortnite", "Mr Boom's Firework Factory", etc.
*/
std::string name;

/**
* @brief State of activity or the custom user status (e.g. "Waiting in lobby").
* @brief State of activity or the custom user status.
* e.g. "Waiting in lobby".
*/
std::string state;

Expand Down Expand Up @@ -415,17 +419,20 @@ class DPP_EXPORT activity {
time_t created_at;

/**
* @brief Start time. e.g. when game was started.
* @brief Start time.
* e.g. when game was started.
*/
time_t start;

/**
* @brief End time, e.g. for songs on spotify.
* @brief End time.
* e.g. for songs on spotify.
*/
time_t end;

/**
* @brief Creating application (e.g. a linked account on the user's client).
* @brief Creating application.
* e.g. a linked account on the user's client.
*/
snowflake application_id;

Expand Down Expand Up @@ -519,7 +526,7 @@ class DPP_EXPORT presence : public json_interface<presence> {
uint8_t flags;

/**
* @brief List of activities
* @brief List of activities.
*/
std::vector<activity> activities;

Expand Down
14 changes: 9 additions & 5 deletions include/dpp/queues.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ struct DPP_EXPORT http_request_completion_t {
std::multimap<std::string, std::string> headers;

/**
* @brief HTTP status (e.g. 200 = OK, 404 = Not found, 429 = Rate limited, etc).
* @brief HTTP status.
* e.g. 200 = OK, 404 = Not found, 429 = Rate limited, etc.
*/
uint16_t status = 0;

/**
* @brief Error status (e.g. if the request could not connect at all).
* @brief Error status.
* e.g. if the request could not connect at all.
*/
http_error error = h_success;

Expand Down Expand Up @@ -149,7 +151,7 @@ struct DPP_EXPORT http_request_completion_t {
uint64_t ratelimit_retry_after = 0;

/**
* @brief True if this request has caused us to be globally rate limited .
* @brief True if this request has caused us to be globally rate limited.
*/
bool ratelimit_global = false;

Expand Down Expand Up @@ -230,7 +232,8 @@ class DPP_EXPORT http_request {
bool non_discord;
public:
/**
* @brief Endpoint name e.g. /api/users.
* @brief Endpoint name
* e.g. /api/users.
*/
std::string endpoint;

Expand Down Expand Up @@ -265,7 +268,8 @@ class DPP_EXPORT http_request {
std::vector<std::string> file_content;

/**
* @brief Upload file mime types (application/octet-stream if unspecified).
* @brief Upload file mime types.
* application/octet-stream if unspecified.
*/
std::vector<std::string> file_mimetypes;

Expand Down

0 comments on commit 421a797

Please sign in to comment.