Skip to content

Commit f20d907

Browse files
authored
π‘»π’†π’‚π’Ž π‘΅π’”π’Œ
1 parent 8e4fa99 commit f20d907

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

β€Žplugins/jadibot-serbot.jsβ€Ž

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (global.conns instanceof Array) console.log()
2828
else global.conns = []
2929
let handler = async (m, { conn, args, usedPrefix, command, isOwner }) => {
3030
if (!global.db.data.settings[conn.user.jid].jadibotmd) return m.reply(`${lenguajeCD['smsSoloOwnerJB']()}`)
31-
if (m.fromMe) return
31+
if (m.fromMe || conn.user.jid === m.sender) return
3232
//if (conn.user.jid !== global.conn.user.jid) return conn.reply(m.chat, `${lenguajeCD['smsJBPrincipal']()} wa.me/${global.conn.user.jid.split`@`[0]}&text=${usedPrefix + command}`, m)
3333
let who = m.mentionedJid && m.mentionedJid[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender
3434
let id = `${who.split`@`[0]}` //conn.getName(who)
@@ -44,12 +44,16 @@ nskJBOptions.usedPrefix = usedPrefix
4444
nskJBOptions.command = command
4545
natsukiJadiBot(nskJBOptions)
4646
}
47-
handler.command = /^(jadibot|serbot|rentbot)/i
47+
handler.command = /^(jadibot|serbot|rentbot|code)/i
4848
export default handler
4949

5050
export async function natsukiJadiBot(options) {
5151
let { pathNatsukiJadiBot, m, conn, args, usedPrefix, command } = options
52-
const mcode = args[0] && /(--code|code)/.test(args[0].trim()) ? true : args[1] && /(--code|code)/.test(args[1].trim()) ? true : false
52+
if (command === 'code') {
53+
command = 'jadibot';
54+
args.unshift('code')}
55+
56+
const mcode = args[0] && /(--code|code)/.test(args[0].trim()) ? true : args[1] && /(--code|code)/.test(args[1].trim()) ? true : false;
5357
let txtCode, codeBot, txtQR
5458
if (mcode) {
5559
args[0] = args[0].replace(/^--code$|^code$/, "").trim()

0 commit comments

Comments
Β (0)