| 53 | } |
| 54 | |
| 55 | void cluster::gdm_add(snowflake channel_id, snowflake user_id, const std::string &access_token, const std::string &nick, command_completion_event_t callback) { |
| 56 | json params; |
| 57 | params["access_token"] = access_token; |
| 58 | params["nick"] = nick; |
| 59 | rest_request<confirmation>(this, API_PATH "/channels", std::to_string(channel_id), "recipients/" + std::to_string(user_id), m_put, params.dump(-1, ' ', false, json::error_handler_t::replace), callback); |
| 60 | } |
| 61 | |
| 62 | void cluster::gdm_remove(snowflake channel_id, snowflake user_id, command_completion_event_t callback) { |
| 63 | rest_request<confirmation>(this, API_PATH "/channels", std::to_string(channel_id), "recipients/" + std::to_string(user_id), m_delete, "", callback); |