Facebook
From test, 3 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 56
  1. module.exports = zahra = async (zahraaa, message) => {
  2.     try {
  3.         let { body, type, id, from, to, t, sender, isGroupMsg, chat, caption, isMedia, mimetype, quotedMsg, quotedMsgObj, mentionedJidList, author } = message
  4.         if (sender && sender.isMe) from = to
  5.         const { name, formattedTitle } = chat
  6.         let { pushname, verifiedName } = sender
  7.         const pushname = pushname || verifiedName
  8.         const commands = caption || body || ''
  9.         const command = commands.toLowerCase().split(' ')[0] || ''
  10.         const args =  commands.split(' ')
  11.  
  12.         const msgs = (message) => {
  13.             if (command.startsWith('#')) {
  14.                 if (message.length >= 10){
  15.                     return `${message.substr(0, 15)}`
  16.                 }else{
  17.                     return `${message}`
  18.                 }
  19.             }
  20.         }
  21.  
  22.         const menulis = {
  23.             magernulissatu: 'Harap Tunggu, Bot Sedang Menulis Buku 1!~'
  24.             }
  25.         const time = moment(t * 1000).format('DD/MM HH:mm:ss')
  26.         const botNumber = await zahraaa.getHostNumber()
  27.         const groupId = isGroupMsg ? chat.groupMetadata.id : ''
  28.         const groupAdmins = isGroupMsg ? await zahraaa.getGroupAdmins(groupId) : ''