The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'!
https://forums.lestoria.net
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
806 B
33 lines
806 B
12 months ago
|
#pragma once
|
||
|
|
||
|
#include "types.h"
|
||
12 months ago
|
#include <cstdint>
|
||
12 months ago
|
|
||
|
namespace discord {
|
||
|
|
||
|
class UserManager final {
|
||
|
public:
|
||
|
~UserManager() = default;
|
||
|
|
||
|
Result GetCurrentUser(User* currentUser);
|
||
|
void GetUser(UserId userId, std::function<void(Result, User const&)> callback);
|
||
|
Result GetCurrentUserPremiumType(PremiumType* premiumType);
|
||
|
Result CurrentUserHasFlag(UserFlag flag, bool* hasFlag);
|
||
|
|
||
|
Event<> OnCurrentUserUpdate;
|
||
|
|
||
|
private:
|
||
|
friend class Core;
|
||
|
|
||
|
UserManager() = default;
|
||
|
UserManager(UserManager const& rhs) = delete;
|
||
|
UserManager& operator=(UserManager const& rhs) = delete;
|
||
|
UserManager(UserManager&& rhs) = delete;
|
||
|
UserManager& operator=(UserManager&& rhs) = delete;
|
||
|
|
||
|
IDiscordUserManager* internal_;
|
||
|
static IDiscordUserEvents events_;
|
||
|
};
|
||
|
|
||
|
} // namespace discord
|