2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-28 04:37:52 +00:00
Thomas Rory Gummerson 758b924436
Type ctx
2020-03-13 22:00:30 +01:00

16 lines
354 B
JavaScript

'use strict';
const { hideGroup } = require('../../stores/group');
const noop = Function.prototype;
/** @param { import('../../typings/context').ExtendedContext } ctx */
module.exports = (ctx, next) => {
if (!ctx.state.isMaster) return next();
// try to revoke the old link
ctx.exportChatInviteLink().catch(noop);
return hideGroup(ctx.chat);
};