UNPKG

botium-core

Version:
16 lines (12 loc) 445 B
const { cardsFromMsg } = require('../helpers') const BaseCountAsserter = require('./BaseCountAsserter') const _cardsCount = ({ botMsg }) => { return cardsFromMsg(botMsg, true).length } module.exports = class CardsCountRecAsserter extends BaseCountAsserter { constructor (context, caps = {}) { super(context, caps, 'Cards') this.name = 'Cards Count (recursive) Asserter' } async _getCount (argv) { return _cardsCount(argv) } }