fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
2 changed files with 7 additions and 6 deletions
Showing only changes of commit 576e73b625 - Show all commits

View file

@ -603,13 +603,14 @@ export class DialogKeywords {
}
/**
* Returns a custom user param persisted on storage.
* Returns bot param persisted on storage.
*
* @example GET PARAM name
* @example GET CONFIG name
*
*/
public async getUserParam({ pid, name }) {
await DialogKeywords.getOption({ pid, name });
public async getConfig({ pid, name }) {
let { min, user, params } = await DialogKeywords.getProcessInfo(pid);
return min.core.getParam(min.instance, name, null);
}
/**

View file

@ -304,9 +304,9 @@ export class KeywordsExpressions {
];
keywords[i++] = [
/^\s*((?:[a-z]+.?)(?:(?:\w+).)(?:\w+)*)\s*=\s*get param\s*(.*)/gim,
/^\s*((?:[a-z]+.?)(?:(?:\w+).)(?:\w+)*)\s*=\s*get config\s*(.*)/gim,
($0, $1, $2) => {
return `${$1} = await dk.getUserParam ({pid: pid, ${$2}})`;
return `${$1} = await dk.getConfig ({pid: pid, ${$2}})`;
}
];