Add regions to Config

This commit is contained in:
Paul Munteanu 2021-07-26 02:14:37 +03:00
parent 007b977e0f
commit 0ce5c918f5
No known key found for this signature in database
GPG Key ID: 4C0797E4861E8917

View File

@ -24,6 +24,15 @@ export interface RateLimitOptions {
timespan: number; timespan: number;
} }
export interface Region {
id: string,
name: string,
vip: boolean,
custom: boolean,
deprecated: boolean,
optimal: boolean,
}
export interface DefaultOptions { export interface DefaultOptions {
gateway: { gateway: {
endpoint: string | null; endpoint: string | null;
@ -116,6 +125,10 @@ export interface DefaultOptions {
minSymbols: number; minSymbols: number;
}; };
}; };
regions: {
default: string;
available: Region[];
}
} }
export const DefaultOptions: DefaultOptions = { export const DefaultOptions: DefaultOptions = {
@ -207,6 +220,12 @@ export const DefaultOptions: DefaultOptions = {
minSymbols: 0, minSymbols: 0,
}, },
}, },
regions: {
default: "fosscord",
available: [
{ id: "fosscord", name: "Fosscord", vip: false, custom: false, deprecated: false, optimal: false },
]
},
}; };
export const ConfigSchema = new Schema({}, { strict: false }); export const ConfigSchema = new Schema({}, { strict: false });