2018-01-30 14:38:50 +01:00
|
|
|
'use strict';
|
|
|
|
|
2020-03-10 22:10:48 +01:00
|
|
|
/** @param { import('../typings/context').ExtendedContext } ctx */
|
2020-05-13 22:59:23 +02:00
|
|
|
const unmatchedHandler = async ctx => {
|
2018-05-20 13:10:38 +02:00
|
|
|
ctx.state[unmatchedHandler.unmatched] = true;
|
|
|
|
if (ctx.chat && ctx.chat.type === 'private') {
|
2020-05-13 22:59:23 +02:00
|
|
|
await ctx.reply(
|
|
|
|
'Sorry, I couldn\'t understand that, do you need /help?',
|
|
|
|
);
|
2018-05-20 13:10:38 +02:00
|
|
|
}
|
|
|
|
};
|
2018-01-30 14:38:50 +01:00
|
|
|
|
2018-05-20 13:10:38 +02:00
|
|
|
unmatchedHandler.unmatched = Symbol('unmatchedHandler.unmatched');
|
|
|
|
|
|
|
|
module.exports = unmatchedHandler;
|