| 47 | } |
| 48 | |
| 49 | void cluster::edit_webhook_message(const class webhook &wh, const struct message& m, snowflake thread_id, command_completion_event_t callback) { |
| 50 | std::string parameters = utility::make_url_parameters({ |
| 51 | {"thread_id", thread_id}, |
| 52 | }); |
| 53 | |
| 54 | this->post_rest_multipart(API_PATH "/webhooks", std::to_string(wh.id), utility::url_encode(!wh.token.empty() ? wh.token: token) + "/messages/" + std::to_string(m.id) + parameters, m_patch, m.build_json(false), [this, callback](json &j, const http_request_completion_t& http) { |
| 55 | if (callback) { |
| 56 | callback(confirmation_callback_t(this, message(this).fill_from_json(&j), http)); |
| 57 | } |
| 58 | }, m.file_data); |
| 59 | } |
| 60 | |
| 61 | void cluster::edit_webhook_with_token(const class webhook& wh, command_completion_event_t callback) { |
| 62 | json jwh = wh.to_json(true); |
nothing calls this directly
no test coverage detected