From af4f659aaabe0d20342e386919fef13688384bc3 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 30 Aug 2020 01:59:50 -0400 Subject: add DiscordClient::DeleteMessage --- discord/discord.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'discord/discord.cpp') diff --git a/discord/discord.cpp b/discord/discord.cpp index 7d0ca23..481e193 100644 --- a/discord/discord.cpp +++ b/discord/discord.cpp @@ -159,6 +159,11 @@ void DiscordClient::SendChatMessage(std::string content, Snowflake channel) { m_http.MakePOST("/channels/" + std::to_string(channel) + "/messages", j.dump(), [](auto) {}); } +void DiscordClient::DeleteMessage(Snowflake channel_id, Snowflake id) { + std::string path = "/channels/" + std::to_string(channel_id) + "/messages/" + std::to_string(id); + m_http.MakeDELETE(path, [](auto) {}); +} + void DiscordClient::UpdateToken(std::string token) { m_token = token; m_http.SetAuth(token); -- cgit v1.2.3