2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-09-03 15:45:20 +00:00

Merge pull request #136 from thedevs-network/feature/verify-captcha

Add verify captcha function
This commit is contained in:
Pouria Ezzati
2021-05-15 17:14:28 +04:30
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ const isChannelForward = R.pathEq(
); );
const fromAdmin = R.pathEq([ 'from', 'status' ], 'admin'); const fromAdmin = R.pathEq([ 'from', 'status' ], 'admin');
const inGroup = ctx => ctx.chat.type.endsWith('group'); const inGroup = ctx => ctx.chat?.type.endsWith('group');
const capturingGroups = R.tail; const capturingGroups = R.tail;

View File

@@ -168,6 +168,9 @@ const unwarn = ({ id }, warnQuery) =>
const nowarns = query => unwarn(query, {}); const nowarns = query => unwarn(query, {});
const verifyCaptcha = ({ id }, captcha = true) =>
User.update({ id }, { $set: { captcha } });
module.exports = { module.exports = {
admin, admin,
ban, ban,
@@ -182,5 +185,6 @@ module.exports = {
unban, unban,
unwarn, unwarn,
updateUser, updateUser,
verifyCaptcha,
warn, warn,
}; };