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

16 lines
412 B
JavaScript
Raw Normal View History

'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 => {
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?',
);
}
};
unmatchedHandler.unmatched = Symbol('unmatchedHandler.unmatched');
module.exports = unmatchedHandler;