(v4.2.0) Fixed all known bugs
This commit is contained in:
@@ -2,26 +2,6 @@ import {opendiscord, api, utilities} from "../../index.js"
|
||||
|
||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||
|
||||
/** (CONTRIBUTOR GUIDE) HOW TO ADD NEW CONFIG VARIABLES?
|
||||
* - Make the change to the config file in (./config/) and be aware of the following things:
|
||||
* - The variable has a clear name and its function is obvious.
|
||||
* - The variable is in the correct position/category of the config.
|
||||
* - The variable contains a default placeholder to suggest the contents.
|
||||
* - If there's a (./devconfig/), also modify this file.
|
||||
* - Register the config in loadAllConfigs() in (./src/data/framework/configLoader.ts)
|
||||
* - The variable should be added to the "formatters" in the correct position.
|
||||
* - Add autocomplete for the variable in ODJsonConfig_Default... in (./src/core/api/defaults/config.ts)
|
||||
* - Add the variable to the config checker in (./src/data/framework/checkerLoader.ts)
|
||||
* - Make sure the variable is compatible with the Interactive Setup CLI.
|
||||
* - The variable should be added by the migration manager (./src/core/startup/migration.ts) when missing.
|
||||
* - Update the Open Ticket Documentation.
|
||||
*
|
||||
* IF VARIABLE IS FROM questions.json, options.json OR panels.json:
|
||||
* - Check (./src/data/openticket/...) for loading/unloading of data.
|
||||
* - Check (./src/actions/createTicket.ts) and related files.
|
||||
* - Check (./src/builders), (./src/actions), (./src/data) & (./src/commands) in general in the areas that were changed.
|
||||
*/
|
||||
|
||||
export async function loadAllConfigCheckers(){
|
||||
opendiscord.checkers.add(new api.ODChecker("opendiscord:general",opendiscord.checkers.storage,0,opendiscord.configs.get("opendiscord:general"),defaultGeneralStructure,{cliDisplayName:"General Config",cliDisplayDescription:"Configure the bot token, status, colors, permissions & more."}))
|
||||
opendiscord.checkers.add(new api.ODChecker("opendiscord:questions",opendiscord.checkers.storage,2,opendiscord.configs.get("opendiscord:questions"),defaultQuestionsStructure,{cliDisplayName:"Questions Config",cliDisplayDescription:"Create, modify & delete questions which are used in options."}))
|
||||
|
||||
@@ -3,16 +3,6 @@ import * as discord from "discord.js"
|
||||
|
||||
const lang = opendiscord.languages
|
||||
|
||||
/** (CONTRIBUTOR GUIDE) HOW TO ADD NEW COMMANDS?
|
||||
* - Register the command in loadAllSlashCommands() & loadAllTextCommands() in (./src/data/framework/commandLoader.ts)
|
||||
* - Add autocomplete for the command in OD(Slash/Text)CommandManagerIds_Default in (./src/core/api/defaults/client.ts)
|
||||
* - Add the command to the help menu in (./src/data/framework/helpMenuLoader.ts)
|
||||
* - If required, new config variables should be added (incl. logs, dm-logs & permissions).
|
||||
* - Update the Open Ticket Documentation.
|
||||
* - If the command contains complex logic or can be executed from a button/dropdown, it should be placed inside an `ODAction`.
|
||||
* - Check all files, test the bot carefully & try a lot of different scenario's with different settings.
|
||||
*/
|
||||
|
||||
export async function loadAllSlashCommands(){
|
||||
const commands = opendiscord.client.slashCommands
|
||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||
|
||||
@@ -1,26 +1,6 @@
|
||||
import {opendiscord, api, utilities} from "../../index.js"
|
||||
import * as fjs from "formatted-json-stringify"
|
||||
|
||||
/** (CONTRIBUTOR GUIDE) HOW TO ADD NEW CONFIG VARIABLES?
|
||||
* - Make the change to the config file in (./config/) and be aware of the following things:
|
||||
* - The variable has a clear name and its function is obvious.
|
||||
* - The variable is in the correct position/category of the config.
|
||||
* - The variable contains a default placeholder to suggest the contents.
|
||||
* - If there's a (./devconfig/), also modify this file.
|
||||
* - Register the config in loadAllConfigs() in (./src/data/framework/configLoader.ts)
|
||||
* - The variable should be added to the "formatters" in the correct position.
|
||||
* - Add autocomplete for the variable in ODJsonConfig_Default... in (./src/core/api/defaults/config.ts)
|
||||
* - Add the variable to the config checker in (./src/data/framework/checkerLoader.ts)
|
||||
* - Make sure the variable is compatible with the Interactive Setup CLI.
|
||||
* - The variable should be added by the migration manager (./src/core/startup/migration.ts) when missing.
|
||||
* - Update the Open Ticket Documentation.
|
||||
*
|
||||
* IF VARIABLE IS FROM questions.json, options.json OR panels.json:
|
||||
* - Check (./src/data/openticket/...) for loading/unloading of data.
|
||||
* - Check (./src/actions/createTicket.ts) and related files.
|
||||
* - Check (./src/builders), (./src/actions), (./src/data) & (./src/commands) in general in the areas that were changed.
|
||||
*/
|
||||
|
||||
export async function loadAllConfigs(){
|
||||
const devconfigFlag = opendiscord.flags.get("opendiscord:dev-config")
|
||||
const isDevconfig = devconfigFlag ? devconfigFlag.value : false
|
||||
|
||||
@@ -2,16 +2,6 @@ import {opendiscord, api, utilities} from "../../index.js"
|
||||
|
||||
const lang = opendiscord.languages
|
||||
|
||||
/** (CONTRIBUTOR GUIDE) HOW TO ADD NEW COMMANDS?
|
||||
* - Register the command in loadAllSlashCommands() & loadAllTextCommands() in (./src/data/framework/commandLoader.ts)
|
||||
* - Add autocomplete for the command in OD(Slash/Text)CommandManagerIds_Default in (./src/core/api/defaults/client.ts)
|
||||
* - Add the command to the help menu in (./src/data/framework/helpMenuLoader.ts)
|
||||
* - If required, new config variables should be added (incl. logs, dm-logs & permissions).
|
||||
* - Update the Open Ticket Documentation.
|
||||
* - If the command contains complex logic or can be executed from a button/dropdown, it should be placed inside an `ODAction`.
|
||||
* - Check all files, test the bot carefully & try a lot of different scenario's with different settings.
|
||||
*/
|
||||
|
||||
export async function loadAllHelpMenuCategories(){
|
||||
const helpmenu = opendiscord.helpmenu
|
||||
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
import {opendiscord, api, utilities} from "../../index.js"
|
||||
|
||||
/** (CONTRIBUTOR GUIDE) HOW TO ADD NEW LANGUAGES?
|
||||
* - Add the file to (./languages/) and make sure the metadata is valid.
|
||||
* - Register the language in loadAllLanguages() in (./src/data/framework/languageLoader.ts).
|
||||
* - Add autocomplete for the language in ODLanguageManagerIds_Default in (./src/core/api/defaults/language.ts).
|
||||
* - Update the language list in the README.md translator list.
|
||||
* - Update the 2 language counters in the README.md features list.
|
||||
* - Update the Open Ticket Documentation.
|
||||
*/
|
||||
|
||||
export async function loadAllLanguages(){
|
||||
//register languages
|
||||
opendiscord.languages.add(new api.ODJsonLanguage("opendiscord:custom","custom.json"))
|
||||
|
||||
Reference in New Issue
Block a user