From 5e1cfe7942fadf370d8180a647d824f0aa0e3380 Mon Sep 17 00:00:00 2001 From: JasperAtSchool Date: Tue, 28 Jan 2025 11:21:49 +0100 Subject: [PATCH] Added new API comments (part 9) --- src/core/api/openticket/option.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/core/api/openticket/option.ts b/src/core/api/openticket/option.ts index a708083..33604e3 100644 --- a/src/core/api/openticket/option.ts +++ b/src/core/api/openticket/option.ts @@ -337,12 +337,19 @@ export class ODRoleOption extends ODOption { } } +/**## ODOptionSuffixManager `class` + * This is an open ticket option suffix manager. + * + * This class manages all suffixes from option in the bot. The id of an option suffix is the same as the option id. + * + * All ticket options should have a corresponding option suffix class. + */ export class ODOptionSuffixManager extends ODManager { constructor(debug:ODDebugger){ super(debug,"ticket suffix") } - /**Instantly get the suffix from an option. */ + /**Instantly get the suffix from an `ODTicketOption`. */ getSuffixFromOption(option:ODTicketOption,user:discord.User): string|null { const suffix = this.getAll().find((suffix) => suffix.option.id.value == option.id.value) if (!suffix) return null @@ -350,6 +357,13 @@ export class ODOptionSuffixManager extends ODManager { } } +/**## ODOptionSuffix `class` + * This is an open ticket option suffix. + * + * This class can generate a suffix for a discord channel name from a specific option. + * + * Use `getSuffix()` to get the new suffix! + */ export class ODOptionSuffix extends ODManagerData { /**The option of this suffix. */ option: ODTicketOption