From 8468ef17d528d84c1b7bdf64cc73ce60c76fc877 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:03:42 +0000 Subject: [PATCH] chore: add defaults comment in PluginContext --- src/types/plugin-context-single.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types/plugin-context-single.ts b/src/types/plugin-context-single.ts index 53d892c..a35ee49 100644 --- a/src/types/plugin-context-single.ts +++ b/src/types/plugin-context-single.ts @@ -23,12 +23,14 @@ export class PluginContext { public readonly inputs: PluginInputs, public _env: Env ) { + // this will fallback to defaults if it's a telegram bot command this._config = this.inputs.settings; } get env() { return Value.Decode(envValidator.schema, Value.Default(envValidator.schema, this._env)); } + set env(env: Env) { this._env = env; }