add DiscordClient::DeleteMessage

This commit is contained in:
ouwou 2020-08-30 01:59:50 -04:00
parent fbd8ed2ba7
commit af4f659aaa
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -74,6 +74,7 @@ public:
const ChannelData *GetChannel(Snowflake id) const;
void SendChatMessage(std::string content, Snowflake channel);
void DeleteMessage(Snowflake channel_id, Snowflake id);
void UpdateToken(std::string token);