(v4.1) Minor Bugfixes

This commit is contained in:
JasperAtSchool
2025-11-05 14:53:05 +01:00
parent 4b485adf82
commit 5494c1ad8f
6 changed files with 27 additions and 14 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ export const registerDefaultCheckerMessageTranslations = (tm:api.ODCheckerTransl
tm.quickTranslate(lm,"//TODO TRANSLATION!!!","message","opendiscord:string-capital-sentence") // It looks like some sentences in this string don't start with a capital letter!
tm.quickTranslate(lm,"//TODO TRANSLATION!!!","message","opendiscord:string-punctuation") // It looks like the sentence in this string doesn't end with a punctuation mark!
tm.quickTranslate(lm,"//TODO TRANSLATION!!!","message","opendiscord:number-nan") // This number can't NaN (Not A Number)!
tm.quickTranslate(lm,"//TODO TRANSLATION!!!","message","opendiscord:number-nan") // This number can't be NaN (Not A Number)!
tm.quickTranslate(lm,"checker.messages.numberTooShort","message","opendiscord:number-too-short") // This number can't be shorter than {0} characters!
tm.quickTranslate(lm,"checker.messages.numberTooLong","message","opendiscord:number-too-long") // This number can't be longer than {0} characters!
tm.quickTranslate(lm,"checker.messages.numberLengthInvalid","message","opendiscord:number-length-invalid") // This number needs to be {0} characters long!
+2 -2
View File
@@ -560,7 +560,7 @@ export const loadAllSlashCommands = async () => {
if (allowedCommands.includes("topic")) commands.add(new api.ODSlashCommand("opendiscord:topic",{
type:act.ChatInput,
name:"topic",
description:"Change the topic of the ticket channel.", //TODO TRANSLATION!!!
description:"Manage the topic of the ticket channel.", //TODO TRANSLATION!!!
contexts:[discord.InteractionContextType.Guild],
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
options:[
@@ -585,7 +585,7 @@ export const loadAllSlashCommands = async () => {
if (allowedCommands.includes("priority")) commands.add(new api.ODSlashCommand("opendiscord:priority",{
type:act.ChatInput,
name:"priority",
description:"Set the priority of the ticket.", //TODO TRANSLATION!!!
description:"Manage the priority of the ticket.", //TODO TRANSLATION!!!
contexts:[discord.InteractionContextType.Guild],
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
options:[
+15 -7
View File
@@ -127,7 +127,7 @@ export const loadAllHelpMenuComponents = async () => {
}))
}
const ticketUser = helpmenu.get("opendiscord:ticket-channel")
const ticketUser = helpmenu.get("opendiscord:ticket-user")
if (ticketUser){
if (allowedCommands.includes("claim")) ticketUser.add(new api.ODHelpMenuCommandComponent("opendiscord:claim",7,{
textName:prefix+"claim",
@@ -161,6 +161,14 @@ export const loadAllHelpMenuComponents = async () => {
textOptions:[{name:"user",optional:false},{name:"reason",optional:true}],
slashOptions:[{name:"user",optional:false},{name:"reason",optional:true}]
}))
if (allowedCommands.includes("transfer")) ticketUser.add(new api.ODHelpMenuCommandComponent("opendiscord:transfer",-1,{
textName:prefix+"transfer",
textDescription:"Transfer the ticket ownership from one user to another.", //TODO TRANSLATION!!!
slashName:"/transfer",
slashDescription:"Transfer the ticket ownership from one user to another.", //TODO TRANSLATION!!!
textOptions:[{name:"user",optional:false},{name:"reason",optional:true}],
slashOptions:[{name:"user",optional:false},{name:"reason",optional:true}]
}))
}
const admin = helpmenu.get("opendiscord:admin")
@@ -271,19 +279,19 @@ export const loadAllHelpMenuComponents = async () => {
}))
if (allowedCommands.includes("topic")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:topic-set",1,{
textName:prefix+"topic set",
textDescription:"Change the topic of the ticket channel.", //TODO TRANSLATION!!!
textDescription:"Set the topic of the ticket channel.", //TODO TRANSLATION!!!
slashName:"/topic set",
slashDescription:"Change the topic of the ticket channel.", //TODO TRANSLATION!!!
slashDescription:"Manage the topic of the ticket channel.", //TODO TRANSLATION!!!
textOptions:[{name:"topic",optional:false}],
slashOptions:[{name:"topic",optional:false}]
}))
if (allowedCommands.includes("priority")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:priority-set",0,{
textName:prefix+"priority set",
textDescription:"Set the priority of the ticket channel.", //TODO TRANSLATION!!!
textDescription:"Set the priority of the ticket.", //TODO TRANSLATION!!!
slashName:"/priority set",
slashDescription:"Set the priority of the ticket channel.", //TODO TRANSLATION!!!
textOptions:[{name:"priority",optional:false}],
slashOptions:[{name:"priority",optional:false}]
slashDescription:"Manage the priority of the ticket.", //TODO TRANSLATION!!!
textOptions:[{name:"priority",optional:false},{name:"reason",optional:true}],
slashOptions:[{name:"priority",optional:false},{name:"reason",optional:true}]
}))
}
}
+1 -1
View File
@@ -128,7 +128,7 @@ export const loadAllStats = async () => {
const creator = ticket.get("opendiscord:opened-by").value
return lang.getTranslation("params.uppercase.creator")+": "+ (creator ? discord.userMention(creator) : "`unknown`")
}))
ticket.add(new api.ODDynamicStat("opendiscord:ticket-age",1,async (scopeId,guild,channel,user) => {
ticket.add(new api.ODDynamicStat("opendiscord:ticket-age",-1,async (scopeId,guild,channel,user) => {
const ticket = opendiscord.tickets.get(scopeId)
if (!ticket) return ""