callback method

Future callback(
  1. String interactionId, {
  2. required String token,
  3. required InteractionResponseType type,
  4. InteractionApplicationCommandCallbackData? data,
})

Implementation

Future callback(
  String interactionId, {
  required String token,
  required InteractionResponseType type,
  InteractionApplicationCommandCallbackData? data,
}) {
  var endpoint = '/interactions/$interactionId/$token/callback';
  return _http.request(
    endpoint,
    converter: _http.asNull,
    method: 'post',
    body: {
      'type': type,
      'data': data,
    }..filterNullValues(),
  );
}