From 9f163de9ad6004693e9a1b6db60c7438b529148a Mon Sep 17 00:00:00 2001 From: Archie Date: Sun, 21 Jul 2024 21:16:23 +0100 Subject: [PATCH] fix: removed some exclamation marks, moved emoji fill to one liner --- src/dpp/cluster/emoji.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dpp/cluster/emoji.cpp b/src/dpp/cluster/emoji.cpp index 1d079e0eec..5e1c607cf3 100644 --- a/src/dpp/cluster/emoji.cpp +++ b/src/dpp/cluster/emoji.cpp @@ -46,7 +46,7 @@ void cluster::guild_emojis_get(snowflake guild_id, command_completion_event_t ca void cluster::application_emojis_get(command_completion_event_t callback) { /* Because Discord can't be consistent, we can't just do `rest_request_list` because all items are behind `items`. - * so now we end up with this duplicating `rest_request_list` because we need to iterate the `items` array!!! Thanks Discord!!!!!!! + * so now we end up with this duplicating `rest_request_list` because we need to iterate the `items` array! Thanks Discord! */ post_rest(API_PATH "/application", me.id.str(), "emojis", m_get, "", [this, callback](json &j, const http_request_completion_t& http) { std::unordered_map list; @@ -56,8 +56,7 @@ void cluster::application_emojis_get(command_completion_event_t callback) { // No const for `fill_from_json`. auto emojis_list = j["items"]; for (auto & curr_item : emojis_list) { - emoji t_emoji{}; - list[snowflake_not_null(&curr_item, key.c_str())] = t_emoji.fill_from_json(&curr_item); + list[snowflake_not_null(&curr_item, key.c_str())] = emoji().fill_from_json(&curr_item); } } if (callback) {