From 8cd91d6fd30c5dcc1effbce96e4e69d9faf10eeb Mon Sep 17 00:00:00 2001 From: fajar55 <67202122+fajar55@users.noreply.github.com> Date: Sat, 21 Aug 2021 00:08:18 +0700 Subject: [PATCH 1/4] Update sen.js --- sen.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sen.js b/sen.js index 12faf37..f126530 100644 --- a/sen.js +++ b/sen.js @@ -22,6 +22,8 @@ const fs = require('fs') const axios = require("axios") const encodeUrl = require('encodeurl') const figlet = require('figlet') +const express = require('express') +const app = express() const moment = require('moment-timezone') const toMs = require('ms') const ms = require("parse-ms"); From 867fd8722ba6b119c3a372d021421daccdc31643 Mon Sep 17 00:00:00 2001 From: fajar55 <67202122+fajar55@users.noreply.github.com> Date: Sat, 21 Aug 2021 00:10:21 +0700 Subject: [PATCH 2/4] Update sen.js --- sen.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sen.js b/sen.js index f126530..0c6ff72 100644 --- a/sen.js +++ b/sen.js @@ -48,7 +48,7 @@ const date = new Date().toLocaleDateString() const wib = moment.tz('Asia/Jakarta').format('HH:mm:ss') const wita = moment.tz('Asia/Makassar').format('HH:mm:ss') const wit = moment.tz('Asia/Jayapura').format('HH:mm:ss') - +app.use('/', (req, res) => { const starts = async (senku = new WAConnection()) => { senku.version = [2, 2119, 6] //enku.browserDescription = [ '[•] Senku', 'Chrome', '3.0' ] @@ -85,7 +85,8 @@ fs.writeFileSync('./senku.json', JSON.stringify(senku.base64EncodedAuthInfo(), n senku.on('chat-update', async (message) => { require('./index.js')(senku, message) }) - +console.log("on bang bot nya") +}) senku.on('group-participants-update', async (anu) => { if (!welkom.includes(anu.jid)) return From 9b928d1d33fb65e9306909296b722b1021facfb4 Mon Sep 17 00:00:00 2001 From: fajar55 <67202122+fajar55@users.noreply.github.com> Date: Sat, 21 Aug 2021 00:12:00 +0700 Subject: [PATCH 3/4] Update sen.js --- sen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sen.js b/sen.js index 0c6ff72..d2cabf5 100644 --- a/sen.js +++ b/sen.js @@ -87,7 +87,7 @@ require('./index.js')(senku, message) }) console.log("on bang bot nya") }) - +app.listen(PORT, () => console.log(`Listening On Port ${port}`)) senku.on('group-participants-update', async (anu) => { if (!welkom.includes(anu.jid)) return const left = JSON.parse(fs.readFileSync('./database/left.json')) From 9d3b1a17babbd7eb810f821f1fd7df1d6d082f44 Mon Sep 17 00:00:00 2001 From: fajar55 <67202122+fajar55@users.noreply.github.com> Date: Sat, 21 Aug 2021 00:13:09 +0700 Subject: [PATCH 4/4] Update sen.js --- sen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sen.js b/sen.js index d2cabf5..88239b0 100644 --- a/sen.js +++ b/sen.js @@ -24,6 +24,7 @@ const encodeUrl = require('encodeurl') const figlet = require('figlet') const express = require('express') const app = express() +const port = process.env.PORT || 3000 const moment = require('moment-timezone') const toMs = require('ms') const ms = require("parse-ms"); @@ -87,7 +88,7 @@ require('./index.js')(senku, message) }) console.log("on bang bot nya") }) -app.listen(PORT, () => console.log(`Listening On Port ${port}`)) +app.listen(port, () => console.log(`Listening On Port ${port}`)) senku.on('group-participants-update', async (anu) => { if (!welkom.includes(anu.jid)) return const left = JSON.parse(fs.readFileSync('./database/left.json'))