From 5866836d5d423ccf52ac8fbbe94df6c9cf7debac Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 3 Jun 2021 19:23:33 -0400 Subject: allow overriding of gateway + api url --- discord/discord.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'discord/discord.hpp') diff --git a/discord/discord.hpp b/discord/discord.hpp index ff4fe2e..029cc71 100644 --- a/discord/discord.hpp +++ b/discord/discord.hpp @@ -49,10 +49,6 @@ class Abaddon; class DiscordClient { friend class Abaddon; -public: - static const constexpr char *DiscordGateway = "wss://gateway.discord.gg/?v=9&encoding=json&compress=zlib-stream"; - static const constexpr char *DiscordAPI = "https://discord.com/api/v9"; - public: DiscordClient(bool mem_store = false); void Start(); @@ -191,6 +187,9 @@ private: std::vector m_decompress_buf; z_stream m_zstream; + std::string GetAPIURL(); + std::string GetGatewayURL(); + static DiscordError GetCodeFromResponse(const http::response_type &response); void ProcessNewGuild(GuildData &guild); -- cgit v1.2.3