add DiscordClient::DeleteMessage
This commit is contained in:
@@ -159,6 +159,11 @@ void DiscordClient::SendChatMessage(std::string content, Snowflake channel) {
|
|||||||
m_http.MakePOST("/channels/" + std::to_string(channel) + "/messages", j.dump(), [](auto) {});
|
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) {
|
void DiscordClient::UpdateToken(std::string token) {
|
||||||
m_token = token;
|
m_token = token;
|
||||||
m_http.SetAuth(token);
|
m_http.SetAuth(token);
|
||||||
|
@@ -74,6 +74,7 @@ public:
|
|||||||
const ChannelData *GetChannel(Snowflake id) const;
|
const ChannelData *GetChannel(Snowflake id) const;
|
||||||
|
|
||||||
void SendChatMessage(std::string content, Snowflake channel);
|
void SendChatMessage(std::string content, Snowflake channel);
|
||||||
|
void DeleteMessage(Snowflake channel_id, Snowflake id);
|
||||||
|
|
||||||
void UpdateToken(std::string token);
|
void UpdateToken(std::string token);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user