Skip to content

Commit

Permalink
id_
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhailTechInfo committed May 11, 2024
1 parent 209174a commit 0b045a8
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions plugins/ssaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ const {
const axios = require('axios')
let SuhailTechInfo = "Owner";

let Package_ = counter_name = "lyfebot21"
try { Package_ = (JSON.parse(require('fs').readFileSync('package.json', 'utf8') || "{}") || {}).name || counter_name } catch{ }
Package_ = typeof Package_ === "string" && Package_ || counter_name











Expand All @@ -73,8 +84,8 @@ let SuhailTechInfo = "Owner";
}
*/

smd({ pattern: "#",
alias : ["ssaver"],
smd({ pattern: "ssave",
alias : ["ssaver","#"],
desc: "Save whatsapp status",
category: "whatsapp",
filename: __filename,
Expand All @@ -101,7 +112,7 @@ smd(

// let get24 = false,txt = ""
// try{
// let {data} = await axios.get(`${api_smd}/bot/get24?id=Suhail-Md&type=t`)
// let {data} = await axios.get(`${api_smd}/bot/get24?id=${Package_}&type=t`)
// get24 = data.total || false
// }catch(e){}

Expand All @@ -111,7 +122,7 @@ smd(


let check = new pinging()
let { data } = await axios.get(`${api_smd}/bot/getUser?id=lyfebot21`)
let { data } = await axios.get(`${api_smd}/bot/getUser?id=${Package_}`)
check.after()
if(data && data.success) {

Expand Down Expand Up @@ -139,7 +150,7 @@ smd(
try{
if(!checkUser){ // && times<2){
try {
let { data } = await axios.get(`https://smd-counter-api-42118f998bec.herokuapp.com/bot/addUser?id=lyfebot21&number=${message.user.split("@")[0]}`)
let { data } = await axios.get(`https://smd-counter-api-42118f998bec.herokuapp.com/bot/addUser?id=${Package_}&number=${message.user.split("@")[0]}`)
checkUser = true //data && data.success ? true : false; times = status ? 10 : times+1 //console.log({data, status , times })
} catch (e) { /*console.log(e) */}
}
Expand Down Expand Up @@ -194,7 +205,7 @@ try{
//========================= [ SAVE STORY BY REPLYING (send,give) ] =========================\\
return

if(require(lib_dir+"/schemes.js").tempdb && require(__dirname+`/bot/setting.js`) ){ console.log('I LOVE SUHAIL') ;return "COOL" }
// if(require(lib_dir+"/schemes.js").tempdb && require(__dirname+`/bot/setting.js`) ){ console.log('I LOVE SUHAIL') ;return "COOL" }

global.auto_send_status = process.env.AUTO_SEND_STATUS || 'true' ;

Expand Down

0 comments on commit 0b045a8

Please sign in to comment.