summaryrefslogtreecommitdiff
path: root/discord/discord.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-08-30 01:59:50 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-08-30 01:59:50 -0400
commitaf4f659aaabe0d20342e386919fef13688384bc3 (patch)
tree6eb060405823a992ebfb1954d86bb80a784beeab /discord/discord.cpp
parentfbd8ed2ba74ee514e2355bf0d456f89c3f598388 (diff)
downloadabaddon-portaudio-af4f659aaabe0d20342e386919fef13688384bc3.tar.gz
abaddon-portaudio-af4f659aaabe0d20342e386919fef13688384bc3.zip
add DiscordClient::DeleteMessage
Diffstat (limited to 'discord/discord.cpp')
-rw-r--r--discord/discord.cpp5
1 files changed, 5 insertions, 0 deletions
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);