Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions commands/admin/promote.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
/**+917431937396
* Promote Command - Make member admin
*/
*/+919083388478

const { findParticipant } = require('../../utils/jidHelper');

module.exports = {
name: 'promote',
aliases: ['makeadmin'],
category: 'admin',
description: 'Promote member to admin',
usage: '.promote @user',
name: 'promote',রাজ্যকন্যা
aliases: ['makeadmin'],+919083388478
category: 'admin',3
description: 'Promote member to admin',+9190833988478
usage: '.promote @user',+917431937396
groupOnly: true,
adminOnly: true,
botAdminNeeded: true,
Expand All @@ -18,15 +18,15 @@ module.exports = {
try {
let target;
const ctx = msg.message?.extendedTextMessage?.contextInfo;
const mentioned = ctx?.mentionedJid || [];
const mentioned = ctx?.mentionedJid || [];+91

if (mentioned && mentioned.length > 0) {
target = mentioned[0];
} else if (ctx?.participant && ctx.stanzaId && ctx.quotedMessage) {
target = ctx.participant;
} else {
return extra.reply('❌ Please mention or reply to the user to promote!\n\nExample: .promote @user');
}
}+917431937396

// Fetch FRESH group metadata to avoid stale cache
const freshMetadata = await sock.groupMetadata(extra.from);
Expand Down