Skip to content

Conversation

@tristancamejo
Copy link
Member

@tristancamejo tristancamejo commented Nov 15, 2022

Support message components within Disploy.

This is a collaborative pull request, we would love to see you contribute to the feat/message-components branch!

Todo

  • Modal structure
  • Action-row structure
  • Button structure
  • Select-menu structure
  • Handle modals in the router
  • Handle buttons in the router

The more suggestions; the more todo items that will be added.

* feat(structs): Interaction#showModal

* feat(structs): ActionRow

* feat(structs): ActionRowComponent

* feat(structs): Modal

* feat(structs): ModalActionRowComponent

* feat(structs): ModalSubmitInteraction

* refactor(structs): Array<T> -> T[]

* refactor(structs): Modal pseudo-optional properties

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>

* fix(structs): make ActionRow#type public

* feat(structs): ModalSubmitComponent

* feat(structs): TextInputComponent

* refactor(structs): ActionRow return itself on methods

* refactor(structs): ActionRowComponent return itself on methods

* refactor(structs): Modal return itself on methods

* refactor(structs): move TextInputComponent methods and properties out

* fix(structs): ModalSubmitInteraction components use constructors

* feat(structs): Modal#toJSON

* fix(structs): CommandInteraction#showModal uses modal

Co-authored-by: Tristan Camejo <contact@tristancamejo.com>

* style(structs): Modal Array<T> -> T[]

Co-authored-by: Tristan Camejo <contact@tristancamejo.com>

* style(structs): Modal Array<T> -> T[]

Co-authored-by: Tristan Camejo <contact@tristancamejo.com>

* refactor(structs): remove redundant app extending

* refactor(structs): TextInputComponent remove redundant app extending

* fix(structs): CommandInteraction import Modal

* chore(structs): index exports new classes

* feat(structs): ActionRow takes an array of components

* feat(structs): Modal can be built on constructor.

* feat(structs): ModalActionRowComponent can be built on constructor.

* fix(structs): make ActionRow constructor argument optional

* feat(structs): TextInputComponent can be built on constructor

* chore(structs): Define functions and constructors public

* feat(structs): ActionRow#get

* feat(structs): ModalSubmitComponent#getValue()

* feat(example): Modal command

* feat(commands): implement modalSubmit

* chore(*): run yarn format

* feat(structs): CommandInteraction#showModal takes a union as a parameter

* refactor(structs): make Command#modalSubmit optional

* chore(*): undo yarn format on README

* fix(example): fix type-errors on modal

* feat(structs): ModalSubmitInteraction#reply

* fix(example): type-errors on modal

* fix(example): type-errors on modal

* fix(example): type-errors on modal

* fix(example): type-errors on modal

* fix(example): type-errors on modal

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Tristan Camejo <contact@tristancamejo.com>
@tristancamejo tristancamejo added enhancement New feature or request help wanted Extra attention is needed packages:disploy structures Keeping our structures inline with the Discord API labels Nov 15, 2022
@tristancamejo tristancamejo added this to the v1.0.0 milestone Nov 15, 2022
@vercel
Copy link

vercel bot commented Nov 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
disploy-docs ⬜️ Ignored (Inspect) Nov 15, 2022 at 1:34AM (UTC)

@TenDRILLL TenDRILLL mentioned this pull request Nov 15, 2022
20 tasks
@tristancamejo tristancamejo marked this pull request as draft November 15, 2022 07:21
@tristancamejo
Copy link
Member Author

tristancamejo commented Nov 23, 2022

The buttons pull request #68 implemented message component handlers, routing and more. However, it doesn't include Button structures or action rows, only supporting raw JSON.

This pull request implemented this, but it's now too stale and outdated for the new changes. We should look at the goals of this pull request and implement them separately later.

@tristancamejo tristancamejo deleted the feat/message-components branch November 27, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed packages:disploy structures Keeping our structures inline with the Discord API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants