MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / addGoodbye

Function addGoodbye

lib/index.js:274–291  ·  view source on GitHub ↗
(jid, enabled, message)

Source from the content-addressed store, hash-verified

272}
273
274async function addGoodbye(jid, enabled, message) {
275 try {
276 const data = loadUserGroupData();
277 if (!data.goodbye) data.goodbye = {};
278
279 data.goodbye[jid] = {
280 enabled: enabled,
281 message: message || '╔═⚔️ GOODBYE ⚔️═╗\n║ 🛡️ User: {user}\n║ 🏰 Kingdom: {group}\n╠═══════════════╣\n║ ⚰️ We will never miss you!\n╚═══════════════╝',
282 channelId: '120363406588763460@newsletter'
283 };
284
285 saveUserGroupData(data);
286 return true;
287 } catch (error) {
288 console.error('Error in addGoodbye:', error);
289 return false;
290 }
291}
292
293async function delGoodBye(jid) {
294 try {

Callers 1

handleGoodbyeFunction · 0.85

Calls 2

loadUserGroupDataFunction · 0.70
saveUserGroupDataFunction · 0.70

Tested by

no test coverage detected