aboutsummaryrefslogtreecommitdiff
path: root/config/Config.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-29 19:53:53 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-29 19:53:53 -0400
commit800668f3e0fec80f3ba08f115d9563324bc54045 (patch)
tree6a210bcfafbdd82382dab1dc18a7e2aca93e42de /config/Config.ts
parentd941214503812267415db570f646cc69bc22664d (diff)
downloadtanzanite-800668f3e0fec80f3ba08f115d9563324bc54045.tar.gz
tanzanite-800668f3e0fec80f3ba08f115d9563324bc54045.tar.bz2
tanzanite-800668f3e0fec80f3ba08f115d9563324bc54045.zip
deploy stuff
Diffstat (limited to 'config/Config.ts')
-rw-r--r--config/Config.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/config/Config.ts b/config/Config.ts
index 4aae10a..90d4428 100644
--- a/config/Config.ts
+++ b/config/Config.ts
@@ -51,7 +51,7 @@ export class Config implements ConfigOptions {
this.credentials = options.credentials;
this.environment = options.environment;
this.owners = options.owners;
- this.prefix = options.prefix;
+ this.prefix = typeof options.prefix === 'string' ? options.prefix : options.prefix[this.environment];
this.channels = options.channels;
this.db = options.db;
this.logging = options.logging;
@@ -118,7 +118,7 @@ export interface ConfigOptions {
/**
* A string that needs to come before text commands.
*/
- prefix: string;
+ prefix: EnvironmentMap<string>;
/**
* Various discord channels that logs will be sent in.
@@ -210,7 +210,7 @@ export type Channels = {
* The id of a channel to send logging messages in,
* use an empty string for no channel to be used.
*/
- [Key in ConfigChannelKey]: Snowflake | '';
+ [Key in ConfigChannelKey]: EnvironmentMap<Snowflake | ''>;
};
/**
@@ -223,6 +223,11 @@ export type ConfigChannelKey = 'log' | 'error' | 'dm' | 'servers';
*/
export interface DataBase {
/**
+ * Ex. "tanzanite" would use the databases "tanzanite", "tanzanite-beta", "tanzanite-dev", and "tanzanite-shared".
+ */
+ databasePrefix: string;
+
+ /**
* The host of the database.
*/
host: string;
@@ -272,3 +277,5 @@ export interface SupportGuild {
*/
invite: string | null;
}
+
+export type EnvironmentMap<T> = T | { [Key in Environment]: T };