Skip to content

Add support for instant + parallel event function handlers #568

@notunderctrl

Description

@notunderctrl

The current event handler implementation calls event functions in an order, while waiting for the previous one to finish. Some situations require multiple, instant, and parallel handling which the current handler lacks.

Proposed structure

// File: src/app/events/interactionCreate/handler.js

// an export to treat this handler differently from the ones running in sequence
// ckit might use something like Promise.all() to call them all at once
export const parallel = true; // variable name might need work

export default async function (interaction) {
  // handle event
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions