From 0b8c83eaa1fdb0fcb610f9181145abde3d60d803 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 23 Nov 2020 20:34:09 -0500 Subject: progress 2 --- discord/discord.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'discord/discord.hpp') diff --git a/discord/discord.hpp b/discord/discord.hpp index c60f8ad..df7675a 100644 --- a/discord/discord.hpp +++ b/discord/discord.hpp @@ -55,7 +55,7 @@ public: static const constexpr char *GatewayIdentity = "Discord"; public: - DiscordClient(); + DiscordClient(bool mem_store = false); void Start(); void Stop(); bool IsStarted() const; @@ -80,18 +80,17 @@ public: void FetchInviteData(std::string code, std::function cb, std::function err); void FetchMessagesInChannel(Snowflake id, std::function &)> cb); void FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake before_id, std::function &)> cb); - const Message *GetMessage(Snowflake id) const; + std::optional GetMessage(Snowflake id) const; const Channel *GetChannel(Snowflake id) const; + std::optional GetPermissionOverwrite(Snowflake channel_id, Snowflake id) const; std::optional GetUser(Snowflake id) const; - const Role *GetRole(Snowflake id) const; + std::optional GetRole(Snowflake id) const; const Guild *GetGuild(Snowflake id) const; const GuildMember *GetMember(Snowflake user_id, Snowflake guild_id) const; - const PermissionOverwrite *GetPermissionOverwrite(Snowflake channel_id, Snowflake id) const; const Emoji *GetEmoji(Snowflake id) const; Snowflake GetMemberHoistedRole(Snowflake guild_id, Snowflake user_id, bool with_color = false) const; Snowflake GetMemberHighestRole(Snowflake guild_id, Snowflake user_id) const; std::unordered_set GetUsersInGuild(Snowflake id) const; - std::unordered_set GetRolesInGuild(Snowflake id) const; std::unordered_set GetChannelsInGuild(Snowflake id) const; bool HasGuildPermission(Snowflake user_id, Snowflake guild_id, Permission perm) const; -- cgit v1.2.3