Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cmd): . export #23

Open
2 tasks
sudojunior opened this issue Aug 22, 2022 · 0 comments
Open
2 tasks

feat(cmd): . export #23

sudojunior opened this issue Aug 22, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@sudojunior
Copy link
Member

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.

@sudojunior sudojunior added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant