mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 06:05:22 +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 inGroup = ctx => ctx.chat.type.endsWith('group');
|
||||
const inGroup = ctx => ctx.chat?.type.endsWith('group');
|
||||
|
||||
const capturingGroups = R.tail;
|
||||
|
||||
|
@@ -168,6 +168,9 @@ const unwarn = ({ id }, warnQuery) =>
|
||||
|
||||
const nowarns = query => unwarn(query, {});
|
||||
|
||||
const verifyCaptcha = ({ id }, captcha = true) =>
|
||||
User.update({ id }, { $set: { captcha } });
|
||||
|
||||
module.exports = {
|
||||
admin,
|
||||
ban,
|
||||
@@ -182,5 +185,6 @@ module.exports = {
|
||||
unban,
|
||||
unwarn,
|
||||
updateUser,
|
||||
verifyCaptcha,
|
||||
warn,
|
||||
};
|
||||
|
Reference in New Issue
Block a user