ODFormattedJsonDatabase_DefaultOptions class
We are still working the API Reference! This page might be incomplete or doesn't contain all details!
Overview
This is a special class that adds type definitions & typescript to the ODFormattedJsonDatabase class. It doesn't add any extra features!
This default class is made for the options.json database!
Properties
inherited file string ➜ string
The name of the file with extension.
inherited formatter type ➜ formatted-json-stringify.ArrayFormatter
The formatter to use on the database array
inherited id class ➜ api.ODId
The id of this data.
inherited path string ➜ string
The path to the file relative to the main directory.
Methods
constructor() function ➜ api.ODFormattedJsonDatabase_DefaultOptions
(no description)
View Parameters (4)
id: type ➜api.ODValidId- Parameter Description Lorem Ipsum.file: string ➜string- Parameter Description Lorem Ipsum.formatter: type ➜formatted-json-stringify.ArrayFormatter- Parameter Description Lorem Ipsum.customPath: string ➜string- Parameter Description Lorem Ipsum.
inherited protected _change() function ➜ void
Trigger an onChange() event in the parent ODManager of this class.
inherited changed() function ➜ void
(❌ SYSTEM ONLY!!) Set the callback executed when a value inside this class changes.
delete() function ➜ api.ODOptionalPromise
Remove the value of category & key. Returns undefined when non-existent!
View Parameters (2)
exists() function ➜ api.ODOptionalPromise
Check if a value of category & key exists. Returns false when non-existent!
View Parameters (2)
category: type ➜"opendiscord:used-option"- Parameter Description Lorem Ipsum.key: string ➜string- Parameter Description Lorem Ipsum.
get() function ➜ api.ODOptionalPromise
Get the value of category & key. Returns undefined when non-existent!
View Parameters (2)
inherited getAll() function ➜ api.ODOptionalPromise
Get all values in category.
getCategory() function ➜ api.ODOptionalPromise
Get all values in category. Returns undefined when non-existent!
View Parameters (1)
category: string ➜string- Parameter Description Lorem Ipsum.
inherited init() function ➜ api.ODPromiseVoid
Init the database.
set() function ➜ api.ODOptionalPromise
Set/overwrite the value of category & key. Returns true when overwritten!
View Parameters (3)
category: string ➜string- Parameter Description Lorem Ipsum.key: string ➜string- Parameter Description Lorem Ipsum.value: type ➜api.ODValidJsonType- Parameter Description Lorem Ipsum.
Defaults
We're still working on this part of the documentation!
Examples
We're still working on this part of the documentation!