Spaces:
Paused
Paused
File size: 665 Bytes
bb69f9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
const { setLydia, bot } = require('../lib/')
bot(
{
pattern: 'lydia ?(.*)',
desc: 'to on off chat bot',
type: 'misc',
},
async (message, match) => {
if (!match)
return await message.send(
'*Example : lydia on | off*\n_reply or mention to activate for a person only._'
)
const user = message.mention[0] || message.reply_message.jid
if (message.mention) {
match = match.replace(`@${jidToNum(user)}`, '').trim()
}
await setLydia(message.jid, match == 'on', user, message.id)
await message.send(
`_Lydia ${match == 'on' ? 'Activated' : 'Deactivated'}_\n*Only works from reply msg.`
)
}
)
|