comments
This commit is contained in:
49
src/types/lang.d.ts
vendored
49
src/types/lang.d.ts
vendored
@@ -1,28 +1,66 @@
|
||||
/**
|
||||
* any indexable object
|
||||
*/
|
||||
//this is a generic type, and needs 'any'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type basicObject = {[keys: string]: any};
|
||||
|
||||
/**
|
||||
* any indexable object with string values
|
||||
*/
|
||||
type basicObjectStr = {[keys: string]: string};
|
||||
|
||||
/**
|
||||
* an abstract version of strings
|
||||
*/
|
||||
type bigString = string | string[];
|
||||
|
||||
/**
|
||||
* an object that contains embeds and can be passed directly to methods like `Discord.TextChannel.send()`
|
||||
*/
|
||||
interface embedData {
|
||||
content?: string,
|
||||
embeds: MessageEmbed[]
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* a representation of an author in the LANG object
|
||||
*
|
||||
* `LANG > Language > Embed > Field`
|
||||
*/
|
||||
interface embedField {
|
||||
name: string,
|
||||
value: bigString,
|
||||
inline?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* a representation of an author in the LANG object
|
||||
*
|
||||
* `LANG > Language > Embed > Author`
|
||||
*/
|
||||
interface authorData {
|
||||
name: string,
|
||||
url?: string,
|
||||
icon?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* a representation of a footer in the LANG object
|
||||
*
|
||||
* `LANG > Language > Embed > Footer`
|
||||
*/
|
||||
interface footerData {
|
||||
text: string,
|
||||
icon?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* a representation of an embed in the LANG object
|
||||
*
|
||||
* `LANG > Language > Embed`
|
||||
*/
|
||||
interface embedObj {
|
||||
embed: true,
|
||||
|
||||
@@ -51,5 +89,16 @@ interface embedObj {
|
||||
timestamp?: boolean | string | number
|
||||
}
|
||||
|
||||
/**
|
||||
* a specific language in the LANG object
|
||||
*
|
||||
* `LANG > Language`
|
||||
*/
|
||||
type LangObj = { [keys:string]: LangObj | embedObj | string }
|
||||
|
||||
/**
|
||||
* the entire LANG object
|
||||
*
|
||||
* `LANG`
|
||||
*/
|
||||
type LangObjWhole = { [langid:string]: LangObj }
|
||||
Reference in New Issue
Block a user