diff --git a/configschema.json b/configschema.json index 8a10ce33..6ece55cd 100644 --- a/configschema.json +++ b/configschema.json @@ -711,6 +711,19 @@ "enabled", "apiUrl" ] + }, + "therungg": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean", + "default": true + } + }, + "required": [ + "enabled" + ] } }, "required": [ @@ -729,6 +742,7 @@ "offsite", "server", "discord", - "streamlabsCharity" + "streamlabsCharity", + "therungg" ] } diff --git a/src/extension/therungg.ts b/src/extension/therungg.ts index 4ab8ab8d..12eee1a4 100644 --- a/src/extension/therungg.ts +++ b/src/extension/therungg.ts @@ -122,6 +122,6 @@ function connect(): void { }); } -if (nodecg().bundleConfig.event.thisEvent === 1) { +if (nodecg().bundleConfig.event.thisEvent === 1 && nodecg().bundleConfig.therungg.enabled) { connect(); } diff --git a/src/types/schemas/configschema.d.ts b/src/types/schemas/configschema.d.ts index ddcd5f52..8c9f289b 100644 --- a/src/types/schemas/configschema.d.ts +++ b/src/types/schemas/configschema.d.ts @@ -125,6 +125,9 @@ export interface Configschema { enabled: boolean; apiUrl: string; }; + therungg: { + enabled: boolean; + }; } export interface BidwarBias { bidId: number;