view user profile (notes+connections+badges)

change some stuff with callbacks
This commit is contained in:
ouwou
2021-02-04 23:41:53 -05:00
parent 0479bf52c2
commit 64adcffe42
40 changed files with 686 additions and 37 deletions

View File

@@ -4,6 +4,27 @@
#include <string>
struct UserData {
enum {
DiscordEmployee = 1 << 0,
PartneredServerOwner = 1 << 1,
HypeSquadEvents = 1 << 2,
BugHunterLevel1 = 1 << 3,
HouseBravery = 1 << 6,
HouseBrilliance = 1 << 7,
HouseBalance = 1 << 8,
EarlySupporter = 1 << 9,
TeamUser = 1 << 10, // no idea what this is
System = 1 << 12,
BugHunterLevel2 = 1 << 14,
VerifiedBot = 1 << 16,
EarlyVerifiedBotDeveloper = 1 << 17,
MaxFlag = EarlyVerifiedBotDeveloper,
};
static const char *GetFlagName(uint64_t flag);
static const char *GetFlagReadableName(uint64_t flag);
Snowflake ID;
std::string Username;
std::string Discriminator;
@@ -14,9 +35,9 @@ struct UserData {
std::optional<std::string> Locale;
std::optional<bool> IsVerified;
std::optional<std::string> Email; // null
std::optional<int> Flags;
std::optional<uint64_t> Flags;
std::optional<int> PremiumType; // null
std::optional<int> PublicFlags;
std::optional<uint64_t> PublicFlags;
// undocumented (opt)
std::optional<bool> IsDesktop;