Skip to content

Commit 824b037

Browse files
authored
Update owner-addprem.js
1 parent 96feded commit 824b037

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

plugins/owner-addprem.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import { jidNormalizedUser } from '@rexxhayanasi/elaina-bail'
1+
import { jidNormalizedUser } from '@rexxhayanasi/elaina-baileys'
22

33
let handler = async (m, { conn, args, usedPrefix, command }) => {
4-
// LID helpers usage
5-
const sender = (global.decodeSender ? global.decodeSender(m, conn) : (conn?.decodeJid ? conn.decodeJid(m.sender) : m.sender));
6-
const chatId = (global.decodeChat ? global.decodeChat(m, conn) : (conn?.decodeJid ? conn.decodeJid(m.chat) : m.chat));
7-
8-
// LID injection removed (now using global helpers)
94

105
let rawWho = m.mentionedJid && m.mentionedJid[0]
116
? m.mentionedJid[0]
@@ -29,13 +24,11 @@ let handler = async (m, { conn, args, usedPrefix, command }) => {
2924

3025
let user = global.db.data.users[who]
3126

32-
// Ambil nama kontak dari conn.store.contacts kalau ada
3327
let contact = conn.store?.contacts?.[who]
3428
if (contact) {
35-
// Utamakan properti nama yang ada, fallback ke jid username
3629
user.name = contact.notify || contact.name || contact.vname || who.split('@')[0]
3730
} else {
38-
user.name = user.name || who.split('@')[0] // pastikan ada nama walau kontak gak ada
31+
user.name = user.name || who.split('@')[0]
3932
}
4033

4134
let txt = args[1]
@@ -81,4 +74,4 @@ handler.owner = true
8174

8275
export default handler
8376

84-
const delay = time => new Promise(res => setTimeout(res, time))
77+
const delay = time => new Promise(res => setTimeout(res, time))

0 commit comments

Comments
 (0)