Browse Source

Misc

tags/v1.0.0
GingerPlusPlus 1 year ago
parent
commit
5bbdb529f1
3 changed files with 9 additions and 0 deletions
  1. +3
    -0
      handlers/commands/fban.js
  2. +4
    -0
      handlers/middlewares/updateUserData.js
  3. +2
    -0
      index.js

+ 3
- 0
handlers/commands/fban.js View File

@@ -0,0 +1,3 @@
'use strict';

module.exports = require('./ban');

+ 4
- 0
handlers/middlewares/updateUserData.js View File

@@ -10,6 +10,10 @@ const updateUserDataHandler = async (ctx, next) => {
updateUser(ctx.message.forward_from);
}

const { entities = [] } = ctx.message;

await Promise.all(entities.map(({ user }) => user && updateUser(user)));

if (!ctx.from) return next();

const user = await updateUser(ctx.from);


+ 2
- 0
index.js View File

@@ -1,5 +1,7 @@
'use strict';

process.chdir(__dirname);

// Utils
const { logError } = require('./utils/log');



Loading…
Cancel
Save