fix(bot): added delay promises

This commit is contained in:
Leifer Mendez
2022-12-07 16:20:56 +01:00
parent 8dd3be909b
commit 73caf090ba
5 changed files with 62 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ const { toJson } = require('./toJson')
/**
*
* @param answer string
* @param options {media:string, buttons:[{"body":"😎 Cursos"}], capture:true default false}
* @param options {media:string, buttons:[{"body":"😎 Cursos"}], delay:ms, capture:true default false}
* @returns
*/
const addAnswer =
@@ -24,6 +24,7 @@ const addAnswer =
: false,
child:
typeof options?.child === 'string' ? `${options?.child}` : null,
delay: typeof options?.delay === 'number' ? options?.delay : 0,
})
const getNested = () => ({