Skip to content

(Framework) Improved Plugin Worker Splitting #4

Description

@JasperAtSchool

(NEW) Manager Auto Priority

Adds a new utility class for handling priorities within managers. Can be used by workers or priority related thing.

  • Giving a priority can now be a simple number (current) or object (new).
  • Using the object instead of setting a static priority, you can set a dynamic priority which will also be dependend of other objects.

Object

  • priority: "lower"|"higher" => appends before or after the start point (lower == less, higher == more).
  • start: number|ODValidId => a static priority or id of any existing instance within the manager to start appending from.
  • skip: boolean => skip a priority level when it already exists in the manager (and go to the next one)

This way, you could choose to insert something after a specific id or priority.

(BREAKING) Split Existing Actions

Split existing actions (in ./actions/ in more smaller ones).

Example (opendiscord:claim-ticket)

Current:

  • opendiscord:claim-ticket
  • opendiscord:discord-logs
  • opendiscord:logs

New:

  • opendiscord:init (init action, first if-statements, emit event)
  • opendiscord:update-ticket (update all ticket variables)
  • opendiscord:update-stats (update all ticket, user & global stats)
  • opendiscord:update-category (update category)
  • opendiscord:update-ticket-message (update ticket message)
  • opendiscord:reply (reply with a message in the channel when enabled)
  • opendiscord:discord-logs
  • opendiscord:logs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Major FeatureA large feature request which affects a larger portion of the bot.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions