| 144 | } |
| 145 | |
| 146 | CommandResult NamesTypes(const char *type) { |
| 147 | auto data = CallbackContext{ |
| 148 | .name = "", |
| 149 | .sticker_type = sticker_type, |
| 150 | .response = response, |
| 151 | .is_song = StringIsEqual("song", sticker_type) |
| 152 | }; |
| 153 | |
| 154 | auto callback = [](const char *found_value, const char *found_type, void *user_data) { |
| 155 | auto context = reinterpret_cast<CallbackContext *>(user_data); |
| 156 | context->response.Fmt("name: {}\n", found_value); |
| 157 | context->response.Fmt("type: {}\n", found_type); |
| 158 | }; |
| 159 | |
| 160 | sticker_database.NamesTypes(type, callback, &data); |
| 161 | |
| 162 | return CommandResult::OK; |
| 163 | } |
| 164 | |
| 165 | protected: |
| 166 | DomainHandler(Response &_response, |
no outgoing calls
no test coverage detected