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:
@@ -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;
|
||||||
|
|
||||||
|
@@ -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,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user