Open Ticket v4 Beta

This commit is contained in:
DJj123dj
2024-08-21 13:24:56 +02:00
parent 9326d0fae8
commit 0c2aca7039
154 changed files with 33881 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import {openticket, api, utilities} from "../../index"
export const loadAllRoles = async () => {
openticket.options.getAll().forEach((opt) => {
if (opt instanceof api.ODRoleOption){
openticket.roles.add(loadRole(opt))
}
})
}
export const loadRole = (option:api.ODRoleOption) => {
return new api.ODRole(option.id,[
new api.ODRoleData("openticket:roles",option.get("openticket:roles").value),
new api.ODRoleData("openticket:mode",option.get("openticket:mode").value),
new api.ODRoleData("openticket:remove-roles-on-add",option.get("openticket:remove-roles-on-add").value),
new api.ODRoleData("openticket:add-on-join",option.get("openticket:add-on-join").value)
])
}