separated type definitions and util functions
This commit is contained in:
13
src/types/api.d.ts
vendored
Normal file
13
src/types/api.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface uniteApiData {
|
||||
name: string,
|
||||
id: string,
|
||||
avatar: string,
|
||||
|
||||
level: string,
|
||||
rank: string,
|
||||
class: string|null,
|
||||
elo: string|null,
|
||||
battles: string,
|
||||
wins: string,
|
||||
winrate: string
|
||||
}
|
||||
55
src/types/lang.d.ts
vendored
Normal file
55
src/types/lang.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
//this is a generic type, and needs 'any'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type basicObject = {[keys: string]: any};
|
||||
type basicObjectStr = {[keys: string]: string};
|
||||
|
||||
type bigString = string | string[];
|
||||
interface embedData {
|
||||
content?: string,
|
||||
embeds: MessageEmbed[]
|
||||
}
|
||||
interface embedField {
|
||||
name: string,
|
||||
value: bigString,
|
||||
inline?: boolean
|
||||
}
|
||||
|
||||
interface authorData {
|
||||
name: string,
|
||||
url?: string,
|
||||
icon?: string
|
||||
}
|
||||
interface footerData {
|
||||
text: string,
|
||||
icon?: string
|
||||
}
|
||||
interface embedObj {
|
||||
embed: true,
|
||||
|
||||
content?: string,
|
||||
title?: string,
|
||||
description?: bigString,
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
url?: string,
|
||||
/**
|
||||
* #FFFFFF
|
||||
*/
|
||||
color?: string,
|
||||
footer?: string | footerData,
|
||||
thumbnail?: string,
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
image?: string,
|
||||
/**
|
||||
* URL
|
||||
*/
|
||||
author?: string | authorData,
|
||||
fields?: embedField[],
|
||||
timestamp?: boolean | string | number
|
||||
}
|
||||
|
||||
type LangObj = { [keys:string]: LangObj | embedObj | string }
|
||||
type LangObjWhole = { [langid:string]: LangObj }
|
||||
8
src/types/queue.d.ts
vendored
Normal file
8
src/types/queue.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { GuildMember } from 'discord.js';
|
||||
|
||||
export interface queueInfoBase {
|
||||
teamsize: number
|
||||
}
|
||||
export interface queueInfo extends queueInfoBase {
|
||||
players: GuildMember[]
|
||||
}
|
||||
Reference in New Issue
Block a user