(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
(NEW) Manager Auto Priority
Adds a new utility class for handling priorities within managers. Can be used by workers or priority related thing.
number(current) orobject(new).objectinstead 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-ticketopendiscord:discord-logsopendiscord:logsNew:
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-logsopendiscord:logs