Sync Dev Branches

* Fixed bug due to discord.js new components

* Updated all versions to v4.0.3

* #155 : Fixed reply on creation when disabled.

Fixed a bug that caused the bot to send a partial ephemeral message while "replyOnTicketCreation" was disabled.
This commit is contained in:
Jasper
2025-04-28 18:30:43 +02:00
committed by GitHub
parent fd739054fd
commit d404f343e0
44 changed files with 127 additions and 49 deletions
+6 -3
View File
@@ -142,7 +142,8 @@ export const registerButtonResponders = async () => {
instance.modal(await opendiscord.builders.modals.getSafe("opendiscord:ticket-questions").build("panel-button",{guild,channel,user,option}))
}else{
//create ticket
await instance.defer("reply",true)
await instance.defer((generalConfig.data.system.replyOnTicketCreation) ? "reply" : "update",true)
const res = await opendiscord.actions.get("opendiscord:create-ticket").run("panel-button",{guild,user,answers:[],option})
if (!res.channel || !res.ticket){
//error
@@ -196,7 +197,8 @@ export const registerDropdownResponders = async () => {
instance.modal(await opendiscord.builders.modals.getSafe("opendiscord:ticket-questions").build("panel-dropdown",{guild,channel,user,option}))
}else{
//create ticket
await instance.defer("reply",true)
await instance.defer((generalConfig.data.system.replyOnTicketCreation) ? "reply" : "update",true)
const res = await opendiscord.actions.get("opendiscord:create-ticket").run("panel-dropdown",{guild,user,answers:[],option})
if (!res.channel || !res.ticket){
//error
@@ -264,7 +266,8 @@ export const registerModalResponders = async () => {
})
//create ticket
await instance.defer("reply",true)
await instance.defer((generalConfig.data.system.replyOnTicketCreation) ? "reply" : "update",true)
const res = await opendiscord.actions.get("opendiscord:create-ticket").run(originalSource,{guild,user,answers,option})
if (!res.channel || !res.ticket){
//error