Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added banner property to user #265

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/sleepy_discord/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace SleepyDiscord {
username string the user's username, not unique across the platform identify
discriminator string the user's 4-digit discord-tag identify
avatar string the user's avatar hash identify
banner string the user's banner hash identify
bot bool whether the user belongs to an OAuth2 application identify
mfa_enabled bool whether the user has two factor enabled on their account identify
verified bool whether the email on this account has been verified email
Expand Down Expand Up @@ -55,6 +56,7 @@ namespace SleepyDiscord {
std::string username;
std::string discriminator;
std::string avatar; //base64 encoded jpeg image
std::string banner; //base64 encoded jpeg image
//these are optional
bool bot = false;
bool mfa_enabled = false; //true if two-factor authentication is enabled
Expand All @@ -71,6 +73,7 @@ namespace SleepyDiscord {
json::pair (&User::username , "username" , json::OPTIONAL_FIELD ),
json::pair (&User::discriminator, "discriminator", json::OPTIONAL_FIELD ),
json::pair (&User::avatar , "avatar" , json::OPTIONAL_NULLABLE_FIELD),
json::pair (&User::banner , "banner" , json::OPTIONAL_NULLABLE_FIELD),
json::pair (&User::bot , "bot" , json::OPTIONAL_FIELD ),
json::pair (&User::mfa_enabled , "mfa_enabled" , json::OPTIONAL_FIELD ),
json::pair (&User::verified , "verified" , json::OPTIONAL_FIELD ),
Expand Down