MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / gdm_add

Method gdm_add

src/dpp/cluster/dm.cpp:55–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void 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
62void 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);

Callers

nothing calls this directly

Calls 2

to_stringFunction · 0.85
dumpMethod · 0.45

Tested by

no test coverage detected