MCPcopy Create free account
hub / github.com/GlobalTechInfo/MEGA-MDX / handler

Function handler

plugins/unmute.ts:11–27  ·  view source on GitHub ↗
(sock: any, message: any, args: any, context: BotContext)

Source from the content-addressed store, hash-verified

9 adminOnly: true,
10
11 async handler(sock: any, message: any, args: any, context: BotContext) {
12 const { chatId, channelInfo } = context;
13
14 try {
15 await sock.groupSettingUpdate(chatId, 'not_announcement');
16 await sock.sendMessage(chatId, {
17 text: 'The group has been unmuted.',
18 ...channelInfo
19 }, { quoted: message });
20 } catch(error: any) {
21 console.error('Error unmuting group:', error);
22 await sock.sendMessage(chatId, {
23 text: 'Failed to unmute the group.',
24 ...channelInfo
25 }, { quoted: message });
26 }
27 }
28};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected