Fixed all currently known bugs :)

This commit is contained in:
DJj123dj
2024-10-14 20:30:45 +02:00
parent 330ea47ab9
commit 848c968483
3 changed files with 267 additions and 267 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ export const loadPanelAutoUpdateCode = async () => {
const channel = await openticket.client.fetchGuildTextChannel(mainServer,splittedId[0])
if (!channel) return
const message = await openticket.client.fetchGuildChannelMessage(mainServer,channel,splittedId[1])
if (!message) return
if (!message || !message.editable) return
message.edit((await openticket.builders.messages.getSafe("openticket:panel").build("auto-update",{guild:mainServer,channel,user:openticket.client.client.user,panel})).message)
openticket.log("Panel in server got auto-updated!","info",[
+2 -2
View File
@@ -62,7 +62,7 @@ export const addTicketPermissions = async (ticket:api.ODTicket) => {
const admins = ticket.option.exists("openticket:admins") ? ticket.option.get("openticket:admins").value : []
const readAdmins = ticket.option.exists("openticket:admins-readonly") ? ticket.option.get("openticket:admins-readonly").value : []
admins.concat(readAdmins).forEach(async (admin) => {
for (const admin of admins.concat(readAdmins)){
if (openticket.permissions.exists("openticket:ticket-admin_"+ticket.id.value+"_"+admin)) return
const role = await mainServer.roles.fetch(admin)
if (!role) return openticket.log("Unable to register permission for ticket admin!","error",[
@@ -70,7 +70,7 @@ export const addTicketPermissions = async (ticket:api.ODTicket) => {
])
openticket.permissions.add(new api.ODPermission("openticket:ticket-admin_"+ticket.id.value+"_"+admin,"channel-role","support",role,channel))
})
}
}
export const removeTicketPermissions = async (ticket:api.ODTicket) => {