mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-28 04:37:52 +00:00
16 lines
354 B
JavaScript
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);
|
|
};
|