Skip to content

feat(cmd): . export #23

@sudojunior

Description

@sudojunior

Intention to add a command to export a message configuration for use on a website like discohook. Exporting to that specific site requires encoding a payload from an array of messages and an array of targets.

{
  "message": [
  ],
  "targets": [
    { "url": "https://discord.com/api/v10/webhook/123/uJp30PUtedu9M_DAIZQwhtENIZGaJV7ffTPTreEmEXEHR7Ys4TprLQ-_" }
  ]
}
Buffer.from(JSON.stringify({ messages, targets: [`https://discord.com/api/webhooks/v10/${webhook.id}/${webhook.token}`] })); // 'encode'
JSON.parse(Buffer.from("", "base64").toString()); // 'decode'
  • Options to include webhook is another option...
  • Prerequisite of requiring a message cache may be needed if templating uses prior message data (i.e. message or channel id)

    author, id, channel_id, pinned, timestamp, application_id are all returned, which the current run sequence may not be aware of prior to running. If back to top or a table of contents is intended, this would break the templating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions