arbMetadata function

Map arbMetadata(
  1. MainMessage message
)

Implementation

Map arbMetadata(MainMessage message) {
  var out = {};
  var desc = message.description;
  if (desc != null) {
    out["description"] = desc;
  }
  out["type"] = "text";
  var placeholders = {};
  var placeholderNames = [];
  for (var arg in message.arguments) {
    placeholderNames.add(arg);
    addArgumentFor(message, arg, placeholders);
  }
  out["placeholders_order"] = placeholderNames;
  out["placeholders"] = placeholders;
  return out;
}