mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 04:29:16 +00:00
extends conditional class
This commit is contained in:
@@ -1,2 +1,15 @@
|
||||
const BotClass = require('./classes/bot.class')
|
||||
module.exports = { instance: BotClass }
|
||||
|
||||
/**
|
||||
* Crear instancia de clase
|
||||
* @param {*} args
|
||||
* @returns
|
||||
*/
|
||||
const create = ({ flow, database, provider }) => {
|
||||
return Object.setPrototypeOf(
|
||||
new BotClass(flow, database, provider),
|
||||
provider
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = { create }
|
||||
|
||||
Reference in New Issue
Block a user