(v4.1) Minor Bugfixes
This commit is contained in:
@@ -182,7 +182,8 @@ export interface ODHelpMenuManagerCategoryIds_DefaultTicketUser {
|
|||||||
"opendiscord:claim":ODHelpMenuCommandComponent,
|
"opendiscord:claim":ODHelpMenuCommandComponent,
|
||||||
"opendiscord:unclaim":ODHelpMenuCommandComponent,
|
"opendiscord:unclaim":ODHelpMenuCommandComponent,
|
||||||
"opendiscord:add":ODHelpMenuCommandComponent,
|
"opendiscord:add":ODHelpMenuCommandComponent,
|
||||||
"opendiscord:remove":ODHelpMenuCommandComponent
|
"opendiscord:remove":ODHelpMenuCommandComponent,
|
||||||
|
"opendiscord:transfer":ODHelpMenuCommandComponent,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODHelpMenuCategory_DefaultTicketUser `default_class`
|
/**## ODHelpMenuCategory_DefaultTicketUser `default_class`
|
||||||
@@ -265,7 +266,11 @@ export interface ODHelpMenuManagerCategoryIds_DefaultAdvanced {
|
|||||||
"opendiscord:stats-ticket":ODHelpMenuCommandComponent,
|
"opendiscord:stats-ticket":ODHelpMenuCommandComponent,
|
||||||
"opendiscord:stats-user":ODHelpMenuCommandComponent,
|
"opendiscord:stats-user":ODHelpMenuCommandComponent,
|
||||||
"opendiscord:autoclose-disable":ODHelpMenuCommandComponent,
|
"opendiscord:autoclose-disable":ODHelpMenuCommandComponent,
|
||||||
"opendiscord:autoclose-enable":ODHelpMenuCommandComponent
|
"opendiscord:autoclose-enable":ODHelpMenuCommandComponent,
|
||||||
|
"opendiscord:autodelete-disable":ODHelpMenuCommandComponent,
|
||||||
|
"opendiscord:autodelete-enable":ODHelpMenuCommandComponent,
|
||||||
|
"opendiscord:topic-set":ODHelpMenuCommandComponent,
|
||||||
|
"opendiscord:priority-set":ODHelpMenuCommandComponent,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**## ODHelpMenuCategory_DefaultAdvanced `default_class`
|
/**## ODHelpMenuCategory_DefaultAdvanced `default_class`
|
||||||
|
|||||||
@@ -697,7 +697,7 @@ export class ODCheckerNumberStructure extends ODCheckerStructure {
|
|||||||
checker.createMessage("opendiscord:invalid-type","error","This property needs to be the type: number!",lt,null,["number"],this.id,(this.options.docs ?? null))
|
checker.createMessage("opendiscord:invalid-type","error","This property needs to be the type: number!",lt,null,["number"],this.id,(this.options.docs ?? null))
|
||||||
return false
|
return false
|
||||||
}else if (!this.options.nanAllowed && isNaN(value)){
|
}else if (!this.options.nanAllowed && isNaN(value)){
|
||||||
checker.createMessage("opendiscord:number-nan","error",`This number can't NaN (Not A Number)!`,lt,null,[],this.id,(this.options.docs ?? null))
|
checker.createMessage("opendiscord:number-nan","error",`This number can't be NaN (Not A Number)!`,lt,null,[],this.id,(this.options.docs ?? null))
|
||||||
return false
|
return false
|
||||||
}else if (typeof this.options.minLength != "undefined" && value.toString().length < this.options.minLength){
|
}else if (typeof this.options.minLength != "undefined" && value.toString().length < this.options.minLength){
|
||||||
checker.createMessage("opendiscord:number-too-short","error",`This number can't be shorter than ${this.options.minLength} characters!`,lt,null,[this.options.minLength.toString()],this.id,(this.options.docs ?? null))
|
checker.createMessage("opendiscord:number-too-short","error",`This number can't be shorter than ${this.options.minLength} characters!`,lt,null,[this.options.minLength.toString()],this.id,(this.options.docs ?? null))
|
||||||
|
|||||||
@@ -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-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: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.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.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!
|
tm.quickTranslate(lm,"checker.messages.numberLengthInvalid","message","opendiscord:number-length-invalid") // This number needs to be {0} characters long!
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ export const loadAllSlashCommands = async () => {
|
|||||||
if (allowedCommands.includes("topic")) commands.add(new api.ODSlashCommand("opendiscord:topic",{
|
if (allowedCommands.includes("topic")) commands.add(new api.ODSlashCommand("opendiscord:topic",{
|
||||||
type:act.ChatInput,
|
type:act.ChatInput,
|
||||||
name:"topic",
|
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],
|
contexts:[discord.InteractionContextType.Guild],
|
||||||
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
|
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
|
||||||
options:[
|
options:[
|
||||||
@@ -585,7 +585,7 @@ export const loadAllSlashCommands = async () => {
|
|||||||
if (allowedCommands.includes("priority")) commands.add(new api.ODSlashCommand("opendiscord:priority",{
|
if (allowedCommands.includes("priority")) commands.add(new api.ODSlashCommand("opendiscord:priority",{
|
||||||
type:act.ChatInput,
|
type:act.ChatInput,
|
||||||
name:"priority",
|
name:"priority",
|
||||||
description:"Set the priority of the ticket.", //TODO TRANSLATION!!!
|
description:"Manage the priority of the ticket.", //TODO TRANSLATION!!!
|
||||||
contexts:[discord.InteractionContextType.Guild],
|
contexts:[discord.InteractionContextType.Guild],
|
||||||
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
|
integrationTypes:[discord.ApplicationIntegrationType.GuildInstall],
|
||||||
options:[
|
options:[
|
||||||
|
|||||||
@@ -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 (ticketUser){
|
||||||
if (allowedCommands.includes("claim")) ticketUser.add(new api.ODHelpMenuCommandComponent("opendiscord:claim",7,{
|
if (allowedCommands.includes("claim")) ticketUser.add(new api.ODHelpMenuCommandComponent("opendiscord:claim",7,{
|
||||||
textName:prefix+"claim",
|
textName:prefix+"claim",
|
||||||
@@ -161,6 +161,14 @@ export const loadAllHelpMenuComponents = async () => {
|
|||||||
textOptions:[{name:"user",optional:false},{name:"reason",optional:true}],
|
textOptions:[{name:"user",optional:false},{name:"reason",optional:true}],
|
||||||
slashOptions:[{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")
|
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,{
|
if (allowedCommands.includes("topic")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:topic-set",1,{
|
||||||
textName:prefix+"topic set",
|
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",
|
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}],
|
textOptions:[{name:"topic",optional:false}],
|
||||||
slashOptions:[{name:"topic",optional:false}]
|
slashOptions:[{name:"topic",optional:false}]
|
||||||
}))
|
}))
|
||||||
if (allowedCommands.includes("priority")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:priority-set",0,{
|
if (allowedCommands.includes("priority")) advanced.add(new api.ODHelpMenuCommandComponent("opendiscord:priority-set",0,{
|
||||||
textName:prefix+"priority set",
|
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",
|
slashName:"/priority set",
|
||||||
slashDescription:"Set the priority of the ticket channel.", //TODO TRANSLATION!!!
|
slashDescription:"Manage the priority of the ticket.", //TODO TRANSLATION!!!
|
||||||
textOptions:[{name:"priority",optional:false}],
|
textOptions:[{name:"priority",optional:false},{name:"reason",optional:true}],
|
||||||
slashOptions:[{name:"priority",optional:false}]
|
slashOptions:[{name:"priority",optional:false},{name:"reason",optional:true}]
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ export const loadAllStats = async () => {
|
|||||||
const creator = ticket.get("opendiscord:opened-by").value
|
const creator = ticket.get("opendiscord:opened-by").value
|
||||||
return lang.getTranslation("params.uppercase.creator")+": "+ (creator ? discord.userMention(creator) : "`unknown`")
|
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)
|
const ticket = opendiscord.tickets.get(scopeId)
|
||||||
if (!ticket) return ""
|
if (!ticket) return ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user