BREAKING: changed all ids to "opendiscord:"

This commit is contained in:
DJj123dj
2025-02-01 10:29:35 +01:00
parent 29f8e1452c
commit 6acbf74846
101 changed files with 3736 additions and 3739 deletions
+70 -70
View File
@@ -50,7 +50,7 @@ export interface ODOptionDataJson {
export interface ODOptionJson {
/**The id of this option. */
id:string,
/**The type of this option. (e.g. `openticket:ticket`, `openticket:website`, `openticket:role`) */
/**The type of this option. (e.g. `opendiscord:ticket`, `opendiscord:website`, `opendiscord:role`) */
type:string,
/**The version of Open Ticket used to create this option & store it in the database. */
version:string,
@@ -68,7 +68,7 @@ export interface ODOptionJson {
export class ODOption extends ODManager<ODOptionData<ODValidJsonType>> {
/**The id of this option. (from the config) */
id:ODId
/**The type of this option. (e.g. `openticket:ticket`, `openticket:website`, `openticket:role`) */
/**The type of this option. (e.g. `opendiscord:ticket`, `opendiscord:website`, `opendiscord:role`) */
type: string
constructor(id:ODValidId, type:string, data:ODOptionData<ODValidJsonType>[]){
@@ -138,51 +138,51 @@ export class ODOptionData<DataType extends ODValidJsonType> extends ODManagerDat
* It's used to generate typescript declarations for this class.
*/
export interface ODTicketOptionIds {
"openticket:name":ODOptionData<string>,
"openticket:description":ODOptionData<string>,
"opendiscord:name":ODOptionData<string>,
"opendiscord:description":ODOptionData<string>,
"openticket:button-emoji":ODOptionData<string>,
"openticket:button-label":ODOptionData<string>,
"openticket:button-color":ODOptionData<ODValidButtonColor>,
"opendiscord:button-emoji":ODOptionData<string>,
"opendiscord:button-label":ODOptionData<string>,
"opendiscord:button-color":ODOptionData<ODValidButtonColor>,
"openticket:admins":ODOptionData<string[]>,
"openticket:admins-readonly":ODOptionData<string[]>,
"openticket:allow-blacklisted-users":ODOptionData<boolean>,
"openticket:questions":ODOptionData<string[]>,
"opendiscord:admins":ODOptionData<string[]>,
"opendiscord:admins-readonly":ODOptionData<string[]>,
"opendiscord:allow-blacklisted-users":ODOptionData<boolean>,
"opendiscord:questions":ODOptionData<string[]>,
"openticket:channel-prefix":ODOptionData<string>,
"openticket:channel-suffix":ODOptionData<"user-name"|"user-id"|"random-number"|"random-hex"|"counter-dynamic"|"counter-fixed">,
"openticket:channel-category":ODOptionData<string>,
"openticket:channel-category-closed":ODOptionData<string>,
"openticket:channel-category-backup":ODOptionData<string>,
"openticket:channel-categories-claimed":ODOptionData<{user:string,category:string}[]>,
"openticket:channel-description":ODOptionData<string>,
"opendiscord:channel-prefix":ODOptionData<string>,
"opendiscord:channel-suffix":ODOptionData<"user-name"|"user-id"|"random-number"|"random-hex"|"counter-dynamic"|"counter-fixed">,
"opendiscord:channel-category":ODOptionData<string>,
"opendiscord:channel-category-closed":ODOptionData<string>,
"opendiscord:channel-category-backup":ODOptionData<string>,
"opendiscord:channel-categories-claimed":ODOptionData<{user:string,category:string}[]>,
"opendiscord:channel-description":ODOptionData<string>,
"openticket:dm-message-enabled":ODOptionData<boolean>,
"openticket:dm-message-text":ODOptionData<string>,
"openticket:dm-message-embed":ODOptionData<ODJsonConfig_DefaultOptionEmbedSettingsType>,
"opendiscord:dm-message-enabled":ODOptionData<boolean>,
"opendiscord:dm-message-text":ODOptionData<string>,
"opendiscord:dm-message-embed":ODOptionData<ODJsonConfig_DefaultOptionEmbedSettingsType>,
"openticket:ticket-message-enabled":ODOptionData<boolean>,
"openticket:ticket-message-text":ODOptionData<string>,
"openticket:ticket-message-embed":ODOptionData<ODJsonConfig_DefaultOptionEmbedSettingsType>,
"openticket:ticket-message-ping":ODOptionData<ODJsonConfig_DefaultOptionPingSettingsType>,
"opendiscord:ticket-message-enabled":ODOptionData<boolean>,
"opendiscord:ticket-message-text":ODOptionData<string>,
"opendiscord:ticket-message-embed":ODOptionData<ODJsonConfig_DefaultOptionEmbedSettingsType>,
"opendiscord:ticket-message-ping":ODOptionData<ODJsonConfig_DefaultOptionPingSettingsType>,
"openticket:autoclose-enable-hours":ODOptionData<boolean>,
"openticket:autoclose-enable-leave":ODOptionData<boolean>,
"openticket:autoclose-disable-claim":ODOptionData<boolean>,
"openticket:autoclose-hours":ODOptionData<number>,
"opendiscord:autoclose-enable-hours":ODOptionData<boolean>,
"opendiscord:autoclose-enable-leave":ODOptionData<boolean>,
"opendiscord:autoclose-disable-claim":ODOptionData<boolean>,
"opendiscord:autoclose-hours":ODOptionData<number>,
"openticket:autodelete-enable-days":ODOptionData<boolean>,
"openticket:autodelete-enable-leave":ODOptionData<boolean>,
"openticket:autodelete-disable-claim":ODOptionData<boolean>,
"openticket:autodelete-days":ODOptionData<number>,
"opendiscord:autodelete-enable-days":ODOptionData<boolean>,
"opendiscord:autodelete-enable-leave":ODOptionData<boolean>,
"opendiscord:autodelete-disable-claim":ODOptionData<boolean>,
"opendiscord:autodelete-days":ODOptionData<number>,
"openticket:cooldown-enabled":ODOptionData<boolean>,
"openticket:cooldown-minutes":ODOptionData<number>,
"opendiscord:cooldown-enabled":ODOptionData<boolean>,
"opendiscord:cooldown-minutes":ODOptionData<number>,
"openticket:limits-enabled":ODOptionData<boolean>,
"openticket:limits-maximum-global":ODOptionData<number>,
"openticket:limits-maximum-user":ODOptionData<number>
"opendiscord:limits-enabled":ODOptionData<boolean>,
"opendiscord:limits-maximum-global":ODOptionData<number>,
"opendiscord:limits-maximum-user":ODOptionData<number>
}
/**## ODTicketOption `class`
@@ -193,10 +193,10 @@ export interface ODTicketOptionIds {
* Use this option to create a new ticket!
*/
export class ODTicketOption extends ODOption {
type: "openticket:ticket" = "openticket:ticket"
type: "opendiscord:ticket" = "opendiscord:ticket"
constructor(id:ODValidId, data:ODOptionData<ODValidJsonType>[]){
super(id,"openticket:ticket",data)
super(id,"opendiscord:ticket",data)
}
get<OptionId extends keyof ODTicketOptionIds>(id:OptionId): ODTicketOptionIds[OptionId]
@@ -230,13 +230,13 @@ export class ODTicketOption extends ODOption {
* It's used to generate typescript declarations for this class.
*/
export interface ODWebsiteOptionIds {
"openticket:name":ODOptionData<string>,
"openticket:description":ODOptionData<string>,
"opendiscord:name":ODOptionData<string>,
"opendiscord:description":ODOptionData<string>,
"openticket:button-emoji":ODOptionData<string>,
"openticket:button-label":ODOptionData<string>,
"opendiscord:button-emoji":ODOptionData<string>,
"opendiscord:button-label":ODOptionData<string>,
"openticket:url":ODOptionData<string>,
"opendiscord:url":ODOptionData<string>,
}
/**## ODWebsiteOption `class`
@@ -247,10 +247,10 @@ export interface ODWebsiteOptionIds {
* Use this option to create a button which links to a website!
*/
export class ODWebsiteOption extends ODOption {
type: "openticket:website" = "openticket:website"
type: "opendiscord:website" = "opendiscord:website"
constructor(id:ODValidId, data:ODOptionData<ODValidJsonType>[]){
super(id,"openticket:website",data)
super(id,"opendiscord:website",data)
}
get<OptionId extends keyof ODWebsiteOptionIds>(id:OptionId): ODWebsiteOptionIds[OptionId]
@@ -284,17 +284,17 @@ export class ODWebsiteOption extends ODOption {
* It's used to generate typescript declarations for this class.
*/
export interface ODRoleOptionIds {
"openticket:name":ODOptionData<string>,
"openticket:description":ODOptionData<string>,
"opendiscord:name":ODOptionData<string>,
"opendiscord:description":ODOptionData<string>,
"openticket:button-emoji":ODOptionData<string>,
"openticket:button-label":ODOptionData<string>,
"openticket:button-color":ODOptionData<ODValidButtonColor>,
"opendiscord:button-emoji":ODOptionData<string>,
"opendiscord:button-label":ODOptionData<string>,
"opendiscord:button-color":ODOptionData<ODValidButtonColor>,
"openticket:roles":ODOptionData<string[]>,
"openticket:mode":ODOptionData<ODRoleUpdateMode>,
"openticket:remove-roles-on-add":ODOptionData<string[]>,
"openticket:add-on-join":ODOptionData<boolean>
"opendiscord:roles":ODOptionData<string[]>,
"opendiscord:mode":ODOptionData<ODRoleUpdateMode>,
"opendiscord:remove-roles-on-add":ODOptionData<string[]>,
"opendiscord:add-on-join":ODOptionData<boolean>
}
/**## ODRoleOption `class`
@@ -305,10 +305,10 @@ export interface ODRoleOptionIds {
* Use this option to create a button for reaction roles!
*/
export class ODRoleOption extends ODOption {
type: "openticket:role" = "openticket:role"
type: "opendiscord:role" = "opendiscord:role"
constructor(id:ODValidId, data:ODOptionData<ODValidJsonType>[]){
super(id,"openticket:role",data)
super(id,"opendiscord:role",data)
}
get<OptionId extends keyof ODRoleOptionIds>(id:OptionId): ODRoleOptionIds[OptionId]
@@ -424,13 +424,13 @@ export class ODOptionCounterDynamicSuffix extends ODOptionSuffix {
/**Initialize the database for this suffix. */
async #init(){
if (!await this.database.exists("openticket:option-suffix-counter",this.option.id.value)) await this.database.set("openticket:option-suffix-counter",this.option.id.value,0)
if (!await this.database.exists("opendiscord:option-suffix-counter",this.option.id.value)) await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,0)
}
getSuffix(user:discord.User): string {
const rawCurrentValue = this.database.get("openticket:option-suffix-counter",this.option.id.value)
const rawCurrentValue = this.database.get("opendiscord:option-suffix-counter",this.option.id.value)
const currentValue = (typeof rawCurrentValue != "number") ? 0 : rawCurrentValue
const newValue = currentValue+1
this.database.set("openticket:option-suffix-counter",this.option.id.value,newValue)
this.database.set("opendiscord:option-suffix-counter",this.option.id.value,newValue)
return newValue.toString()
}
}
@@ -454,14 +454,14 @@ export class ODOptionCounterFixedSuffix extends ODOptionSuffix {
/**Initialize the database for this suffix. */
async #init(){
if (!await this.database.exists("openticket:option-suffix-counter",this.option.id.value)) await this.database.set("openticket:option-suffix-counter",this.option.id.value,0)
if (!await this.database.exists("opendiscord:option-suffix-counter",this.option.id.value)) await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,0)
}
getSuffix(user:discord.User): string {
const rawCurrentValue = this.database.get("openticket:option-suffix-counter",this.option.id.value)
const rawCurrentValue = this.database.get("opendiscord:option-suffix-counter",this.option.id.value)
const currentValue = (typeof rawCurrentValue != "number") ? 0 : rawCurrentValue
const newValue = (currentValue >= 9999) ? 0 : currentValue+1
this.database.set("openticket:option-suffix-counter",this.option.id.value,newValue)
this.database.set("opendiscord:option-suffix-counter",this.option.id.value,newValue)
if (newValue.toString().length == 1) return "000"+newValue.toString()
else if (newValue.toString().length == 2) return "00"+newValue.toString()
else if (newValue.toString().length == 3) return "0"+newValue.toString()
@@ -488,7 +488,7 @@ export class ODOptionRandomNumberSuffix extends ODOptionSuffix {
/**Initialize the database for this suffix. */
async #init(){
if (!await this.database.exists("openticket:option-suffix-history",this.option.id.value)) await this.database.set("openticket:option-suffix-history",this.option.id.value,[])
if (!await this.database.exists("opendiscord:option-suffix-history",this.option.id.value)) await this.database.set("opendiscord:option-suffix-history",this.option.id.value,[])
}
/**Get a unique number for this suffix. */
#generateUniqueValue(history:string[]): string {
@@ -502,12 +502,12 @@ export class ODOptionRandomNumberSuffix extends ODOptionSuffix {
else return number
}
getSuffix(user:discord.User): string {
const rawCurrentValues = this.database.get("openticket:option-suffix-history",this.option.id.value)
const rawCurrentValues = this.database.get("opendiscord:option-suffix-history",this.option.id.value)
const currentValues = ((Array.isArray(rawCurrentValues)) ? rawCurrentValues : []) as string[]
const newValue = this.#generateUniqueValue(currentValues)
currentValues.push(newValue)
if (currentValues.length > 50) currentValues.shift()
this.database.set("openticket:option-suffix-history",this.option.id.value,currentValues)
this.database.set("opendiscord:option-suffix-history",this.option.id.value,currentValues)
return newValue
}
}
@@ -531,7 +531,7 @@ export class ODOptionRandomHexSuffix extends ODOptionSuffix {
/**Initialize the database for this suffix. */
async #init(){
if (!await this.database.exists("openticket:option-suffix-history",this.option.id.value)) await this.database.set("openticket:option-suffix-history",this.option.id.value,[])
if (!await this.database.exists("opendiscord:option-suffix-history",this.option.id.value)) await this.database.set("opendiscord:option-suffix-history",this.option.id.value,[])
}
/**Get a unique hex-string for this suffix. */
#generateUniqueValue(history:string[]): string {
@@ -540,12 +540,12 @@ export class ODOptionRandomHexSuffix extends ODOptionSuffix {
else return hex
}
getSuffix(user:discord.User): string {
const rawCurrentValues = this.database.get("openticket:option-suffix-history",this.option.id.value)
const rawCurrentValues = this.database.get("opendiscord:option-suffix-history",this.option.id.value)
const currentValues = ((Array.isArray(rawCurrentValues)) ? rawCurrentValues : []) as string[]
const newValue = this.#generateUniqueValue(currentValues)
currentValues.push(newValue)
if (currentValues.length > 50) currentValues.shift()
this.database.set("openticket:option-suffix-history",this.option.id.value,currentValues)
this.database.set("opendiscord:option-suffix-history",this.option.id.value,currentValues)
return newValue
}
}
+13 -13
View File
@@ -54,23 +54,23 @@ export interface ODPanelJson {
* It's used to generate typescript declarations for this class.
*/
export interface ODPanelIds {
"openticket:name":ODPanelData<string>,
"openticket:options":ODPanelData<string[]>,
"openticket:dropdown":ODPanelData<boolean>,
"opendiscord:name":ODPanelData<string>,
"opendiscord:options":ODPanelData<string[]>,
"opendiscord:dropdown":ODPanelData<boolean>,
"openticket:text":ODPanelData<string>,
"openticket:embed":ODPanelData<ODJsonConfig_DefaultPanelEmbedSettingsType>,
"opendiscord:text":ODPanelData<string>,
"opendiscord:embed":ODPanelData<ODJsonConfig_DefaultPanelEmbedSettingsType>,
"openticket:dropdown-placeholder":ODPanelData<string>,
"opendiscord:dropdown-placeholder":ODPanelData<string>,
"openticket:enable-max-tickets-warning-text":ODPanelData<boolean>,
"openticket:enable-max-tickets-warning-embed":ODPanelData<boolean>,
"opendiscord:enable-max-tickets-warning-text":ODPanelData<boolean>,
"opendiscord:enable-max-tickets-warning-embed":ODPanelData<boolean>,
"openticket:describe-options-layout":ODPanelData<"simple"|"normal"|"detailed">,
"openticket:describe-options-custom-title":ODPanelData<string>,
"openticket:describe-options-in-text":ODPanelData<boolean>,
"openticket:describe-options-in-embed-fields":ODPanelData<boolean>,
"openticket:describe-options-in-embed-description":ODPanelData<boolean>
"opendiscord:describe-options-layout":ODPanelData<"simple"|"normal"|"detailed">,
"opendiscord:describe-options-custom-title":ODPanelData<string>,
"opendiscord:describe-options-in-text":ODPanelData<boolean>,
"opendiscord:describe-options-in-embed-fields":ODPanelData<boolean>,
"opendiscord:describe-options-in-embed-description":ODPanelData<boolean>
}
/**## ODPanel `class`
+17 -17
View File
@@ -60,7 +60,7 @@ export interface ODQuestionJson {
export class ODQuestion extends ODManager<ODQuestionData<ODValidJsonType>> {
/**The id of this question. (from the config) */
id:ODId
/**The type of this question (e.g. `openticket:short` or `openticket:paragraph`) */
/**The type of this question (e.g. `opendiscord:short` or `opendiscord:paragraph`) */
type: string
constructor(id:ODValidId, type:string, data:ODQuestionData<ODValidJsonType>[]){
@@ -130,13 +130,13 @@ export class ODQuestionData<DataType extends ODValidJsonType> extends ODManagerD
* It's used to generate typescript declarations for this class.
*/
export interface ODShortQuestionIds {
"openticket:name":ODQuestionData<string>,
"openticket:required":ODQuestionData<boolean>,
"openticket:placeholder":ODQuestionData<string>,
"opendiscord:name":ODQuestionData<string>,
"opendiscord:required":ODQuestionData<boolean>,
"opendiscord:placeholder":ODQuestionData<string>,
"openticket:length-enabled":ODQuestionData<boolean>,
"openticket:length-min":ODQuestionData<number>,
"openticket:length-max":ODQuestionData<number>
"opendiscord:length-enabled":ODQuestionData<boolean>,
"opendiscord:length-min":ODQuestionData<number>,
"opendiscord:length-max":ODQuestionData<number>
}
/**## ODShortQuestion `class`
@@ -147,10 +147,10 @@ export interface ODShortQuestionIds {
* Use this question in an option to add a short text field to the modal!
*/
export class ODShortQuestion extends ODQuestion {
type: "openticket:short" = "openticket:short"
type: "opendiscord:short" = "opendiscord:short"
constructor(id:ODValidId, data:ODQuestionData<ODValidJsonType>[]){
super(id,"openticket:short",data)
super(id,"opendiscord:short",data)
}
get<QuestionId extends keyof ODShortQuestionIds>(id:QuestionId): ODShortQuestionIds[QuestionId]
@@ -184,13 +184,13 @@ export class ODShortQuestion extends ODQuestion {
* It's used to generate typescript declarations for this class.
*/
export interface ODParagraphQuestionIds {
"openticket:name":ODQuestionData<string>,
"openticket:required":ODQuestionData<boolean>,
"openticket:placeholder":ODQuestionData<string>,
"opendiscord:name":ODQuestionData<string>,
"opendiscord:required":ODQuestionData<boolean>,
"opendiscord:placeholder":ODQuestionData<string>,
"openticket:length-enabled":ODQuestionData<boolean>,
"openticket:length-min":ODQuestionData<number>,
"openticket:length-max":ODQuestionData<number>
"opendiscord:length-enabled":ODQuestionData<boolean>,
"opendiscord:length-min":ODQuestionData<number>,
"opendiscord:length-max":ODQuestionData<number>
}
/**## ODParagraphQuestion `class`
@@ -201,10 +201,10 @@ export interface ODParagraphQuestionIds {
* Use this question in an option to add a paragraph text field to the modal!
*/
export class ODParagraphQuestion extends ODQuestion {
type: "openticket:paragraph" = "openticket:paragraph"
type: "opendiscord:paragraph" = "opendiscord:paragraph"
constructor(id:ODValidId, data:ODQuestionData<ODValidJsonType>[]){
super(id,"openticket:paragraph",data)
super(id,"opendiscord:paragraph",data)
}
get<QuestionId extends keyof ODParagraphQuestionIds>(id:QuestionId): ODParagraphQuestionIds[QuestionId]
+4 -4
View File
@@ -54,10 +54,10 @@ export interface ODRoleJson {
* It's used to generate typescript declarations for this class.
*/
export interface ODRoleIds {
"openticket:roles":ODRoleData<string[]>,
"openticket:mode":ODRoleData<ODRoleUpdateMode>,
"openticket:remove-roles-on-add":ODRoleData<string[]>,
"openticket:add-on-join":ODRoleData<boolean>
"opendiscord:roles":ODRoleData<string[]>,
"opendiscord:mode":ODRoleData<ODRoleUpdateMode>,
"opendiscord:remove-roles-on-add":ODRoleData<string[]>,
"opendiscord:add-on-join":ODRoleData<boolean>
}
/**## ODRole `class`
+33 -33
View File
@@ -49,7 +49,7 @@ export class ODTicketManager extends ODManager<ODTicket> {
}
/**Get the main ticket message of a ticket channel when found. */
async getTicketMessage(ticket:ODTicket): Promise<discord.Message<true>|null> {
const msgId = ticket.get("openticket:ticket-message").value
const msgId = ticket.get("opendiscord:ticket-message").value
if (!this.#guild || !msgId) return null
try {
const channel = await this.getTicketChannel(ticket)
@@ -64,22 +64,22 @@ export class ODTicketManager extends ODManager<ODTicket> {
if (!this.#guild) return null
try {
if (user == "creator"){
const creatorId = ticket.get("openticket:opened-by").value
const creatorId = ticket.get("opendiscord:opened-by").value
if (!creatorId) return null
else return (await this.#guild.client.users.fetch(creatorId))
}else if (user == "closer"){
const closerId = ticket.get("openticket:closed-by").value
const closerId = ticket.get("opendiscord:closed-by").value
if (!closerId) return null
else return (await this.#guild.client.users.fetch(closerId))
}else if (user == "claimer"){
const claimerId = ticket.get("openticket:claimed-by").value
const claimerId = ticket.get("opendiscord:claimed-by").value
if (!claimerId) return null
else return (await this.#guild.client.users.fetch(claimerId))
}else if (user == "pinner"){
const pinnerId = ticket.get("openticket:pinned-by").value
const pinnerId = ticket.get("opendiscord:pinned-by").value
if (!pinnerId) return null
else return (await this.#guild.client.users.fetch(pinnerId))
@@ -94,14 +94,14 @@ export class ODTicketManager extends ODManager<ODTicket> {
if (!channel) return null
//add creator
const creatorId = ticket.get("openticket:opened-by").value
const creatorId = ticket.get("opendiscord:opened-by").value
if (creatorId){
const creator = await this.#client.fetchUser(creatorId)
if (creator) final.push({user:creator,role:"creator"})
}
//add participants
const participants = ticket.get("openticket:participants").value.filter((p) => p.type == "user")
const participants = ticket.get("opendiscord:participants").value.filter((p) => p.type == "user")
for (const p of participants){
if (!final.find((u) => u.user.id == p.id)){
const participant = await this.#client.fetchUser(p.id)
@@ -110,7 +110,7 @@ export class ODTicketManager extends ODManager<ODTicket> {
}
//add admin roles
const roles = ticket.get("openticket:participants").value.filter((p) => p.type == "role")
const roles = ticket.get("opendiscord:participants").value.filter((p) => p.type == "role")
for (const r of roles){
const role = await this.#client.fetchGuildRole(channel.guild,r.id)
if (role){
@@ -154,35 +154,35 @@ export interface ODTicketJson {
* It's used to generate typescript declarations for this class.
*/
export interface ODTicketIds {
"openticket:busy":ODTicketData<boolean>,
"openticket:ticket-message":ODTicketData<string|null>,
"openticket:participants":ODTicketData<{type:"role"|"user",id:string}[]>,
"openticket:channel-suffix":ODTicketData<string>,
"opendiscord:busy":ODTicketData<boolean>,
"opendiscord:ticket-message":ODTicketData<string|null>,
"opendiscord:participants":ODTicketData<{type:"role"|"user",id:string}[]>,
"opendiscord:channel-suffix":ODTicketData<string>,
"openticket:open":ODTicketData<boolean>,
"openticket:opened-by":ODTicketData<string|null>,
"openticket:opened-on":ODTicketData<number|null>,
"openticket:closed":ODTicketData<boolean>,
"openticket:closed-by":ODTicketData<string|null>,
"openticket:closed-on":ODTicketData<number|null>,
"openticket:claimed":ODTicketData<boolean>,
"openticket:claimed-by":ODTicketData<string|null>,
"openticket:claimed-on":ODTicketData<number|null>,
"openticket:pinned":ODTicketData<boolean>,
"openticket:pinned-by":ODTicketData<string|null>,
"openticket:pinned-on":ODTicketData<number|null>,
"openticket:for-deletion":ODTicketData<boolean>,
"opendiscord:open":ODTicketData<boolean>,
"opendiscord:opened-by":ODTicketData<string|null>,
"opendiscord:opened-on":ODTicketData<number|null>,
"opendiscord:closed":ODTicketData<boolean>,
"opendiscord:closed-by":ODTicketData<string|null>,
"opendiscord:closed-on":ODTicketData<number|null>,
"opendiscord:claimed":ODTicketData<boolean>,
"opendiscord:claimed-by":ODTicketData<string|null>,
"opendiscord:claimed-on":ODTicketData<number|null>,
"opendiscord:pinned":ODTicketData<boolean>,
"opendiscord:pinned-by":ODTicketData<string|null>,
"opendiscord:pinned-on":ODTicketData<number|null>,
"opendiscord:for-deletion":ODTicketData<boolean>,
"openticket:category":ODTicketData<string|null>,
"openticket:category-mode":ODTicketData<null|"normal"|"closed"|"backup"|"claimed">,
"opendiscord:category":ODTicketData<string|null>,
"opendiscord:category-mode":ODTicketData<null|"normal"|"closed"|"backup"|"claimed">,
"openticket:autoclose-enabled":ODTicketData<boolean>,
"openticket:autoclose-hours":ODTicketData<number>,
"openticket:autoclosed":ODTicketData<boolean>,
"openticket:autodelete-enabled":ODTicketData<boolean>,
"openticket:autodelete-days":ODTicketData<number>,
"opendiscord:autoclose-enabled":ODTicketData<boolean>,
"opendiscord:autoclose-hours":ODTicketData<number>,
"opendiscord:autoclosed":ODTicketData<boolean>,
"opendiscord:autodelete-enabled":ODTicketData<boolean>,
"opendiscord:autodelete-days":ODTicketData<number>,
"openticket:answers":ODTicketData<{id:string,name:string,type:"short"|"paragraph",value:string|null}[]>,
"opendiscord:answers":ODTicketData<{id:string,name:string,type:"short"|"paragraph",value:string|null}[]>,
}
/**## ODTicket `class`
+3 -3
View File
@@ -13,7 +13,7 @@ import * as discord from "discord.js"
*
* This class manages all transcript generators in the bot.
*
* The 2 default built-in transcript generators are: `openticket:html-compiler` & `openticket:text-compiler`.
* The 2 default built-in transcript generators are: `opendiscord:html-compiler` & `opendiscord:text-compiler`.
*/
export class ODTranscriptManager extends ODManager<ODTranscriptCompiler<any>> {
/**The manager responsible for collecting all messages in a channel. */
@@ -119,8 +119,8 @@ export class ODTranscriptCompiler<Data extends object> extends ODManagerData {
* It's used to generate typescript declarations for this class.
*/
export interface ODTranscriptCompilerIds {
"openticket:html-compiler":ODTranscriptCompiler<{url:string}>,
"openticket:text-compiler":ODTranscriptCompiler<{contents:string}>,
"opendiscord:html-compiler":ODTranscriptCompiler<{url:string}>,
"opendiscord:text-compiler":ODTranscriptCompiler<{contents:string}>,
}
/**## ODTranscriptManager_Default `default_class`