2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-22 18:08:51 +00:00
the-guard-bot/handlers/unmatched.js
2020-05-13 22:59:23 +02:00

16 lines
412 B
JavaScript

'use strict';
/** @param { import('../typings/context').ExtendedContext } ctx */
const unmatchedHandler = async ctx => {
ctx.state[unmatchedHandler.unmatched] = true;
if (ctx.chat && ctx.chat.type === 'private') {
await ctx.reply(
'Sorry, I couldn\'t understand that, do you need /help?',
);
}
};
unmatchedHandler.unmatched = Symbol('unmatchedHandler.unmatched');
module.exports = unmatchedHandler;