@@ -28,7 +28,7 @@ if (global.conns instanceof Array) console.log()
2828else global . conns = [ ]
2929let handler = async ( m , { conn, args, usedPrefix, command, isOwner } ) => {
3030if ( ! 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)
3333let who = m . mentionedJid && m . mentionedJid [ 0 ] ? m . mentionedJid [ 0 ] : m . fromMe ? conn . user . jid : m . sender
3434let id = `${ who . split `@` [ 0 ] } ` //conn.getName(who)
@@ -44,12 +44,16 @@ nskJBOptions.usedPrefix = usedPrefix
4444nskJBOptions . command = command
4545natsukiJadiBot ( nskJBOptions )
4646}
47- handler . command = / ^ ( j a d i b o t | s e r b o t | r e n t b o t ) / i
47+ handler . command = / ^ ( j a d i b o t | s e r b o t | r e n t b o t | c o d e ) / i
4848export default handler
4949
5050export async function natsukiJadiBot ( options ) {
5151let { pathNatsukiJadiBot, m, conn, args, usedPrefix, command } = options
52- const mcode = args [ 0 ] && / ( - - c o d e | c o d e ) / . test ( args [ 0 ] . trim ( ) ) ? true : args [ 1 ] && / ( - - c o d e | c o d e ) / . test ( args [ 1 ] . trim ( ) ) ? true : false
52+ if ( command === 'code' ) {
53+ command = 'jadibot' ;
54+ args . unshift ( 'code' ) }
55+
56+ const mcode = args [ 0 ] && / ( - - c o d e | c o d e ) / . test ( args [ 0 ] . trim ( ) ) ? true : args [ 1 ] && / ( - - c o d e | c o d e ) / . test ( args [ 1 ] . trim ( ) ) ? true : false ;
5357let txtCode , codeBot , txtQR
5458if ( mcode ) {
5559args [ 0 ] = args [ 0 ] . replace ( / ^ - - c o d e $ | ^ c o d e $ / , "" ) . trim ( )
0 commit comments