mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 06:00:10 +00:00
add DiscordClient::DeleteMessage
This commit is contained in:
parent
fbd8ed2ba7
commit
af4f659aaa
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user