├── fez ├── cmd ├── TimnasaTech.ai ├── play (1).js ├── rebot.js ├── insult.js ├── lylcy.js ├── fancy.js ├── movie.js ├── timnasa_test.js ├── event.js ├── pair1.js ├── quote.js ├── Pair.js ├── shoot.js ├── github.js ├── contact2.js ├── setpp.js ├── fullpppro.js ├── profile.js ├── weather.js ├── encode.js ├── blocklist.js ├── ping.js ├── stickersearch.js ├── warn.js ├── apk.js ├── open.js ├── apk1.js ├── vv_timnasa.js ├── xpo.js ├── ahack.js ├── sc.js ├── canvacord.js ├── terminate.js ├── owner.js ├── play2.js ├── banUser.js ├── banGroup.js ├── allsticker.js ├── menuc.js ├── agents.js ├── jids.js ├── copy.js ├── url.js ├── downfacebock.js ├── mygroups.js ├── getallmembers.js ├── menu.js ├── about.js ├── bi.js ├── mafun.js ├── bug.js ├── vcf5.js └── devinette.js ├── data ├── base ├── data.json ├── afk .js ├── banUser.js ├── banGroup.js ├── cron.js ├── hentai.js ├── onlyAdmin.js ├── welcome.js ├── mention.js ├── warn.js ├── stickcmd.js ├── level.js └── sudo.js ├── gif └── gif.json ├── timnasa ├── br ├── dl │ ├── dl.json │ └── Function.js ├── ferush │ └── bugs ├── app.js ├── traduction.js ├── timoth.js ├── binary.js ├── luckyutil.js ├── lydia.js ├── utils.js ├── imgur.js ├── context.js ├── ytdl-core.js ├── timnasa.js ├── converting.js ├── command.js ├── tictactoe.js └── scrap.js ├── tmd ├── antibad.json ├── antibot.json ├── antibug.json ├── banUser.json ├── cron.json ├── events.json ├── hentai.json ├── mention.json ├── sudo.json ├── tmd.json ├── warn.json ├── antilien.json ├── antimention.json ├── bangroup.json ├── onlyAdmin.json ├── stickcmd.json ├── user_rank.json ├── alive.json └── anti.json ├── auth └── auth.json ├── media ├── media.json ├── rm.gif ├── antibot.gif ├── chrono.webp └── lyrics-img.jpg ├── scan └── creds.json ├── Procfile ├── gravity.gif ├── heroku.yml ├── gitignore.txt ├── exemple_de_set.env ├── render.yaml ├── Dockerfile ├── package.json ├── set.js └── README.md /fez/cmd: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /data/base: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gif/gif.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /timnasa/br: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tmd/antibad.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/antibot.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/antibug.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/banUser.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/cron.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/events.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/hentai.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/mention.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/sudo.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/tmd.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tmd/warn.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /auth/auth.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /data/data.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fez/TimnasaTech.ai: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /media/media.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /scan/creds.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /timnasa/dl/dl.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tmd/antilien.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/antimention.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/bangroup.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/onlyAdmin.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /tmd/stickcmd.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tmd/user_rank.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /timnasa/ferush/bugs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node timnasa.js 2 | -------------------------------------------------------------------------------- /gravity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Next5x/TIMNASA_TMD1/HEAD/gravity.gif -------------------------------------------------------------------------------- /tmd/alive.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 1, 3 | "message": "", 4 | "lien": "" 5 | } -------------------------------------------------------------------------------- /media/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Next5x/TIMNASA_TMD1/HEAD/media/rm.gif -------------------------------------------------------------------------------- /media/antibot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Next5x/TIMNASA_TMD1/HEAD/media/antibot.gif -------------------------------------------------------------------------------- /media/chrono.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Next5x/TIMNASA_TMD1/HEAD/media/chrono.webp -------------------------------------------------------------------------------- /media/lyrics-img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Next5x/TIMNASA_TMD1/HEAD/media/lyrics-img.jpg -------------------------------------------------------------------------------- /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | worker: Dockerfile 4 | run: 5 | worker: npm run timoth -------------------------------------------------------------------------------- /gitignore.txt: -------------------------------------------------------------------------------- 1 | /auth 2 | /set.env 3 | /package-lock.json 4 | /node_modules 5 | /store.json 6 | /audio.mp3 7 | /code obstrui 8 | /.opus -------------------------------------------------------------------------------- /tmd/anti.json: -------------------------------------------------------------------------------- 1 | { 2 | "ANTI_LINK_GROUP": "on", 3 | "ANTI_SHARE_GROUP": "on", 4 | "ANTI_TAG": "on", 5 | "ANTI_MENTION_GROUP": "on" 6 | } -------------------------------------------------------------------------------- /fez/play (1).js: -------------------------------------------------------------------------------- 1 | const {timoth}= ../timothtimnasa paly hakuna vya bure we matako huwezi pata command ya play kuja watsapp nkupe kwa buku 3000 +255784766591 2 | -------------------------------------------------------------------------------- /timnasa/app.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.reagir = void 0; 4 | async function reagir(dest, zok, msg, emoji) { 5 | await zok.sendMessage(dest, { react: { text: emoji, key: msg.key } }); 6 | } 7 | exports.reagir = reagir; 8 | -------------------------------------------------------------------------------- /timnasa/traduction.js: -------------------------------------------------------------------------------- 1 | const translatte = require('translatte'); 2 | 3 | async function traduire(text, options) { 4 | try { 5 | const result = await translatte(text, options); 6 | return result.text; 7 | } catch (error) { 8 | throw error; 9 | } 10 | } 11 | 12 | module.exports = traduire; 13 | -------------------------------------------------------------------------------- /exemple_de_set.env: -------------------------------------------------------------------------------- 1 | OWNER_NAME="TimnasaTech" 2 | PREFIX="." 3 | PUBLIC_MODE='non' 4 | AUTO_READ_STATUS="non" 5 | AUTO_DOWNLOAD_STATUS="oui" 6 | BOT_NAME= "TIMNASA_TMD1" 7 | IMAGE_MENU= "https://static.animecorner.me/2023/08/op2.jpg" 8 | NUMERO_OWNER= "255784766591" 9 | OWNER_NAME= "᚛TimnasaTech᚜" 10 | DATABASE_URL= "" 11 | WARN_COUNT= "3" 12 | OPENAI_API_KEY= "" 13 | STARTING_BOT_MESSAGE='yes' 14 | ANTI_DELETE_MESSAGE='yes' 15 | -------------------------------------------------------------------------------- /render.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | - type: web 3 | name: TIMNASA_TMD1 4 | env: node # Change to "python" or your environment if not Node.js 5 | plan: free 6 | buildCommand: npm install 7 | startCommand: npm start 8 | envVars: 9 | - key: SESSION-ID 10 | sync: false 11 | - key: OWNER 12 | sync: false 13 | - key: OWNER-NUMBER 14 | sync: false 15 | - key: PREFIX 16 | sync: false 17 | -------------------------------------------------------------------------------- /timnasa/timoth.js: -------------------------------------------------------------------------------- 1 | 2 | var tabCmds = []; 3 | let cm = []; 4 | function timoth(obj, fonctions) { 5 | let infoComs = obj; 6 | if (!obj.categorie) { 7 | infoComs.categorie = "General"; 8 | } 9 | if (!obj.reaction) { 10 | infoComs.reaction = "🙂"; 11 | } 12 | infoComs.fonction = fonctions; 13 | cm.push(infoComs); 14 | // console.log('chargement...') 15 | return infoComs; 16 | } 17 | module.exports = { timoth, Module: timoth, cm }; 18 | -------------------------------------------------------------------------------- /timnasa/binary.js: -------------------------------------------------------------------------------- 1 | async function dBinary(str) { 2 | var newBin = str.split(" ") 3 | var binCode = [] 4 | for (i = 0; i < newBin.length; i++) { 5 | binCode.push(String.fromCharCode(parseInt(newBin[i], 2))) 6 | } 7 | return binCode.join("") 8 | } 9 | 10 | async function eBinary(str = ''){ 11 | let res = '' 12 | res = str.split('').map(char => { 13 | return char.charCodeAt(0).toString(2); 14 | }).join(' ') 15 | return res 16 | } 17 | 18 | module.exports = { dBinary, eBinary } 19 | -------------------------------------------------------------------------------- /fez/rebot.js: -------------------------------------------------------------------------------- 1 | const {timoth}=require("../timnasa/timoth") 2 | 3 | 4 | timoth({nomCom:"restart",categorie:"Mods",reaction:"📴"},async(dest,z,com)=>{ 5 | 6 | 7 | 8 | const{repondre,ms,dev,superUser}=com; 9 | 10 | if(!superUser) 11 | { 12 | return repondre("This command is for owner only"); 13 | } 14 | 15 | const {exec}=require("child_process") 16 | 17 | repondre("TimnasaTech bot Restarting please wait😔😔😔⏳"); 18 | 19 | exec("pm2 restart all"); 20 | 21 | 22 | 23 | 24 | 25 | 26 | }) 27 | -------------------------------------------------------------------------------- /timnasa/luckyutil.js: -------------------------------------------------------------------------------- 1 | 2 | const alphautil = async (context, next) => { 3 | const { ms, superUser, verifAdmin, verifGroupe } = context; 4 | 5 | if (!verifGroupe) { 6 | return repondre("This command is meant for groups"); 7 | } 8 | if (!superUser) { 9 | return repondre("You need owner permission to execute this command."); 10 | } 11 | if (!verifAdmin) { 12 | return repondre("I need admin privileges"); 13 | } 14 | 15 | await next(); // Proceed to the next function (main handler) 16 | }; 17 | 18 | module.exports = luckyutil; 19 | -------------------------------------------------------------------------------- /timnasa/lydia.js: -------------------------------------------------------------------------------- 1 | const { DataTypes } = require('sequelize'); // Correct import syntax 2 | const s = require("../set"); 3 | 4 | export const ChatBot = s.DATABASE.define( 5 | 'ChatBot', 6 | { 7 | isActive: { 8 | type: DataTypes.BOOLEAN, 9 | defaultValue: false, 10 | }, 11 | isDMOnly: { 12 | type: DataTypes.BOOLEAN, 13 | defaultValue: false, 14 | }, 15 | isGCOnly: { 16 | type: DataTypes.BOOLEAN, 17 | defaultValue: false, 18 | }, 19 | }, 20 | { 21 | tableName: 'lydia', 22 | timestamps: false, 23 | } 24 | ); 25 | -------------------------------------------------------------------------------- /timnasa/utils.js: -------------------------------------------------------------------------------- 1 | function delay(ms) { 2 | console.log(`⏱️ delay for ${ms}ms`) 3 | return new Promise(resolve => setTimeout(resolve, ms)) 4 | } 5 | 6 | 7 | async function loading (dest, zk) { 8 | var lod = [ 9 | "《 █▒▒▒▒▒▒▒▒▒▒▒》10%", 10 | "《 ████▒▒▒▒▒▒▒▒》30%", 11 | "《 ███████▒▒▒▒▒》50%", 12 | "《 ██████████▒▒》80%", 13 | "《 ████████████》100%", 14 | "Lucky load Completed✅" 15 | ] 16 | let { key } = await zk.sendMessage(dest, {text: 'Loading Please Wait'}) 17 | 18 | for (let i = 0; i < lod.length; i++) { 19 | await zk.sendMessage(dest, {text: lod[i], edit: key }); 20 | } 21 | } 22 | 23 | function react(dest, zk, msg, reaction){ 24 | zk.sendMessage(dest, {react: {text : reaction, key: msg.key}}); 25 | } 26 | 27 | module.exports = { 28 | delay, 29 | loading, 30 | react 31 | } 32 | -------------------------------------------------------------------------------- /fez/insult.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require('../timnasa/timoth); 2 | const axios = require("axios"); 3 | 4 | timoth({ 5 | nomCom: "insult", 6 | aliases: ["abuse", "tusi"], 7 | categorie: "search", 8 | reaction: "🤷" 9 | }, async (dest, zk, commandeOptions) => { 10 | const { repondre, ms } = commandeOptions; 11 | 12 | try { 13 | const response = await axios.get('https://evilinsult.com/generate_insult.php?lang=en&type=json'); 14 | const data = response.data; 15 | 16 | if (!data || !data.insult) { 17 | return repondre('Unable to retrieve an insult. Please try again later.'); 18 | } 19 | 20 | const insult = data.insult; 21 | return repondre(`*Insult:* ${insult}`); 22 | } catch (error) { 23 | repondre(`Error: ${error.message || error}`); 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /timnasa/imgur.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const fs = require('fs'); 3 | const FormData = require('form-data'); 4 | 5 | async function uploadImageToImgur(imagePath, clientId) { 6 | try { 7 | const data = new FormData(); 8 | data.append('image', fs.createReadStream(imagePath)); 9 | 10 | const headers = { 11 | 'Authorization': `Client-ID ${clientId}`, 12 | ...data.getHeaders() 13 | }; 14 | 15 | const config = { 16 | method: 'post', 17 | maxBodyLength: Infinity, 18 | url: 'https://api.imgur.com/3/image', 19 | headers: headers, 20 | data: data 21 | }; 22 | 23 | const response = await axios(config); 24 | const imageUrl = response.data.data.link; 25 | return imageUrl; 26 | } catch (error) { 27 | console.error('Erreur lors de l\'envoi sur Imgur:', error); 28 | throw new Error('Une erreur est survenue lors de l\'envoi sur Imgur.'); 29 | } 30 | } 31 | 32 | module.exports = { uploadImageToImgur }; 33 | -------------------------------------------------------------------------------- /fez/lylcy.js: -------------------------------------------------------------------------------- 1 | const {timoth} =require("../timnasa/timoth"); 2 | const axios =require("axios"); 3 | 4 | 5 | timoth({ nomCom: "timolay", 6 | reaction: "✨", 7 | categorie: "Search" }, async (dest, zk, commandeOptions) => { 8 | 9 | const { repondre, arg, ms } = commandeOptions; 10 | 11 | try { 12 | 13 | if (!arg || arg.length === 0) return repondre("Where is the name of music"); 14 | 15 | let result = await axios.get(`http://api.maher-zubair.tech/search/lyrics?q=${arg.join(' ')}`); 16 | 17 | let lyrics = result.data.result; 18 | 19 | if (lyrics.error) return repondre("no lyrics found"); 20 | 21 | let msg = `---------⬡┃TKM bot┃⬡-------- 22 | 23 | * *Artist :* ${lyrics.artist} 24 | 25 | 26 | * *Title :* ${lyrics.title} 27 | 28 | 29 | ${lyrics.lyrics}` 30 | 31 | zk.sendMessage(dest,{image : { url : './media/lyrics-img.jpg'} , caption : msg}, { quoted : ms }); 32 | 33 | } catch (err) { 34 | repondre('Error') 35 | } 36 | }) 37 | -------------------------------------------------------------------------------- /fez/fancy.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const fancy = require("../timnasa/style"); 3 | 4 | timoth({ nomCom: "fancy", categorie: "Fun", reaction: "☑️" }, async (dest, zk, commandeOptions) => { 5 | const { arg, repondre, prefixe } = commandeOptions; 6 | const id = arg[0]?.match(/\d+/)?.join(''); 7 | const text = arg.slice(1).join(" "); 8 | 9 | try { 10 | if (id === undefined || text === undefined) { 11 | return await repondre(`\nExemple : ${prefixe}fancy 10 timnasa\n` + String.fromCharCode(8206).repeat(4001) + fancy.list('timnasa', fancy)); 12 | } 13 | 14 | const selectedStyle = fancy[parseInt(id) - 1]; 15 | if (selectedStyle) { 16 | return await repondre(fancy.apply(selectedStyle, text)); 17 | } else { 18 | return await repondre('_Style introuvable :(_'); 19 | } 20 | } catch (error) { 21 | console.error(error); 22 | return await repondre('_Une erreur s\'est produite :(_'); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /timnasa/context.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | getContextInfo: (ms) => { 4 | return { 5 | mentionedJid: [ms.sender || ms.from], 6 | forwardingScore: 999, 7 | isForwarded: true, 8 | forwardedNewsletterMessageInfo: { 9 | newsletterJid: '120363332512801418@newsletter', 10 | newsletterName: 'TIMNASA TECH', 11 | serverMessageId: 143 12 | } 13 | }; 14 | }, 15 | 16 | 17 | repondre: async (zk, dest, ms, text, options = {}) => { 18 | const contextInfo = { 19 | ...module.exports.getContextInfo(ms), 20 | ...options.contextInfo 21 | }; 22 | 23 | await zk.sendMessage(dest, { 24 | text: text, 25 | contextInfo: contextInfo 26 | }, { quoted: ms }); 27 | }, 28 | 29 | 30 | sendMessage: async (zk, dest, ms, options) => { 31 | const contextInfo = { 32 | ...module.exports.getContextInfo(ms), 33 | ...options.contextInfo 34 | }; 35 | 36 | await zk.sendMessage(dest, { 37 | ...options, 38 | contextInfo: contextInfo 39 | }, { quoted: ms }); 40 | } 41 | }; -------------------------------------------------------------------------------- /timnasa/ytdl-core.js: -------------------------------------------------------------------------------- 1 | const yts = require('yt-search'); 2 | const ytdl = require('ytdl-core'); 3 | const fs = require('fs'); 4 | 5 | 6 | /* fonction pour avoir les données d'une recherche*/ 7 | 8 | async function getytlink(key) { 9 | try { 10 | const resultat = await yts(key); 11 | const videos = resultat.videos; 12 | const choix = videos[0]; 13 | return { 14 | lien : choix.url , 15 | affiche : choix.thumbnail, 16 | titre : choix.title, 17 | duree : choix.timestamp, 18 | id : choix.videoId, 19 | } ; 20 | } catch (erreur) { 21 | console.error('Erreur lors de la recherche YouTube :', erreur); 22 | return null; 23 | } 24 | } 25 | 26 | module.exports = getytlink; 27 | 28 | /* fonction pour télécharger les videos avec ytdl-core*/ 29 | 30 | 31 | 32 | 33 | 34 | async function ytdwn(url) { 35 | const info = await ytdl.getInfo(url); 36 | const format = ytdl.chooseFormat(info.formats, { quality: '18' }); 37 | const video = ytdl.downloadFromInfo(info, format) 38 | 39 | return video ; 40 | 41 | } 42 | 43 | module.exports = ytdwn; 44 | 45 | 46 | -------------------------------------------------------------------------------- /fez/movie.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { getJson } = require("../timnasa/utils"); 3 | 4 | timoth({ 5 | nomCom: "movie", 6 | categorie: "search", 7 | reaction: "🎥" 8 | }, async (origineMessage, zk, commandeOptions) => { 9 | const { repondre, arg } = commandeOptions; 10 | 11 | if (!arg[0]) { 12 | repondre("Quel film veux-tu ?"); 13 | return; 14 | } 15 | 16 | const movieTitle = arg.join(" "); 17 | const movie = await getJson( 18 | `http://www.omdbapi.com/?apikey=742b2d09&t=${encodeURIComponent(movieTitle)}&plot=full` 19 | ); 20 | 21 | if (movie.Response !== 'True') { 22 | repondre('*Not found*'); 23 | return; 24 | } 25 | 26 | let msg = ''; 27 | const url = movie.Poster; 28 | delete movie.Poster; 29 | delete movie.Response; 30 | delete movie.Ratings; 31 | 32 | for (const data in movie) { 33 | if (movie[data] !== 'N/A') { 34 | msg += `*${data} :* ${movie[data]}\n`; 35 | } 36 | } 37 | 38 | if (url === 'N/A') { 39 | repondre(msg.trim()); 40 | } else { 41 | await zk.sendMessage(origineMessage.from, { url }, { caption: msg.trim() }); 42 | } 43 | }); 44 | -------------------------------------------------------------------------------- /fez/timnasa_test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const { timoth } = require("../timnasa/timoth"); 4 | timoth({ nomCom: "test2", reaction: "📎", nomFichier: __filename }, async (dest, zk, commandeOptions) => { 5 | console.log("Commande saisie !!!s"); 6 | let z = 'Hello my name is *𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝚃𝙼𝙳* \n\n ' + "i'm a whatsapp bot multi-device created "; 7 | let d = ' by *𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝚃𝙴𝙲𝙷*'; 8 | let varmess = z + d; 9 | var img = 'https://files.catbox.moe/o2zom2.jpg'; 10 | await zk.sendMessage(dest, { image: { url: img }, caption: varmess }); 11 | //console.log("montest") 12 | }); 13 | console.log("mon test"); 14 | /*module.exports.commande = () => { 15 | var nomCom = ["test","t"] 16 | var reaction="☺️" 17 | return { nomCom, execute,reaction } 18 | }; 19 | 20 | async function execute (origineMessage,zok) { 21 | console.log("Commande saisie !!!s") 22 | let z ='Hi my name is *Lucky V5* \n\n '+' I'm a Multi-device Whatsapp bot ' 23 | let d =' developed by *ғʀᴇᴅɪᴇ ᴛᴇᴄʜ*' 24 | let varmess=z+d 25 | var img='https://telegra.ph/file/5a0a3058b3949a15b3501.jpg' 26 | await zok.sendMessage(origineMessage, { image:{url:img},caption:varmess}); 27 | } */ 28 | -------------------------------------------------------------------------------- /fez/event.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require('../timnasa/timoth'); 2 | const { attribuerUnevaleur } = require('../data/welcome'); 3 | 4 | async function events(nomCom) { 5 | timoth({ 6 | nomCom: nomCom, 7 | categorie: 'Group' 8 | }, async (dest, zk, commandeOptions) => { 9 | const { ms, arg, repondre, superUser, verifAdmin } = commandeOptions; 10 | 11 | if (verifAdmin || superUser) { 12 | if (!arg[0] || arg.join(' ') === ' ') { 13 | repondre(nomCom + ' ' + ' on to active and ' + ' ' + nomCom + ' ' + 'off to put off'); 14 | } else { 15 | if (arg[0] === 'on' || arg[0] === 'off') { 16 | 17 | await attribuerUnevaleur(dest, nomCom, arg[0]); 18 | repondre( nomCom + "is actualised on " + arg[0]); 19 | } else { 20 | repondre('on for active and off for desactive'); 21 | } 22 | } 23 | } else { 24 | repondre('You can\'t use this commands '); 25 | } 26 | }); 27 | } 28 | 29 | // Appel de la fonction events pour les valeurs 'welcome' et 'goodbye' 30 | events('welcome'); 31 | events('goodbye'); 32 | events('antipromote'); 33 | events('antidemote') ; 34 | -------------------------------------------------------------------------------- /fez/pair1.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require("../timnasa/timoth"); 4 | const { 5 | default: axios 6 | } = require("axios"); 7 | timoth({ 8 | 'nomCom': "pair", 9 | 'aliases': ["session", "pair", "paircode", "qrcode"], 10 | 'reaction': '♂️', 11 | 'categorie': "General" 12 | }, async (_0x2ce843, _0x1c44fd, _0x32de8a) => { 13 | const { 14 | repondre: _0x2e61d5, 15 | arg: _0x8621a4 16 | } = _0x32de8a; 17 | try { 18 | if (!_0x8621a4 || _0x8621a4.length === 0) { 19 | return _0x2e61d5("Example Usage: .code 2557847665xxxx."); 20 | } 21 | await _0x2e61d5("*Wait am generating your pair code ✅...*"); 22 | const _0x386b0a = encodeURIComponent(_0x8621a4.join(" ")); 23 | const _0x1ea92d = "https://timnasa-session-id-etyy.onrender.com" + _0x386b0a; 24 | const _0xb59e41 = await axios.get(_0x1ea92d); 25 | const _0x1b71f0 = _0xb59e41.data; 26 | if (_0x1b71f0 && _0x1b71f0.code) { 27 | const _0x40751a = _0x1b71f0.code; 28 | await _0x2e61d5('' + _0x40751a); 29 | await _0x2e61d5("Here is your pair code, copy and paste it to the notification above or link devices."); 30 | } else { 31 | throw new Error("Invalid response from API."); 32 | } 33 | } catch (_0x21fdc6) { 34 | console.error("Error getting API response:", _0x21fdc6.message); 35 | _0x2e61d5("Error getting response from API."); 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /fez/quote.js: -------------------------------------------------------------------------------- 1 | 2 | const { timoth } = require('../timnasa/timoth'); 3 | 4 | timoth({ nomCom: 'quote', categorie: 'Group' }, async (dest, zk, commandeOptions) => { 5 | const { ms, repondre, verifGroupe, arg } = commandeOptions; 6 | if (!verifGroupe) { 7 | repondre('This Command works in groups only🤣'); 8 | return; 9 | } 10 | 11 | if (!arg[0]) { 12 | try { 13 | fetch('https://animechan.xyz/api/random') 14 | .then((response) => response.json()) 15 | .then(async (quote) => { 16 | repondre(`*TimnasaTech-Quotes* 17 | 18 | 🎬 Anime: ${quote.anime} 19 | 👤 Character: ${quote.character} 20 | 💬 Quote: ${quote.quote} 21 | 22 | Powered by *TimnasaTech*`); 23 | }); 24 | } catch (e) { 25 | repondre('Erreur lors de la génération de la citation : ' + e.message); 26 | } 27 | } else { 28 | const query = arg.join(' '); 29 | 30 | try { 31 | fetch('https://animechan.xyz/api/random/character?name=' + query) 32 | .then((response) => response.json()) 33 | .then(async (quote) => { 34 | repondre(`TIMBASA_TMD 35 | 36 | 🎬 Anime: ${quote.anime} 37 | 👤 Character: ${quote.character} 38 | 💬 Quote: ${quote.quote} 39 | 40 | Powered by *TimnasaTech*`); 41 | }); 42 | } catch (e) { 43 | repondre('Erreur lors de la génération de la citation : ' + e.message); 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Use the official Node.js LTS image (Debian-based) 2 | FROM node:lts-buster 3 | 4 | # Set working directory 5 | WORKDIR /app 6 | 7 | # Update package sources (Buster repos are archived) and install dependencies 8 | RUN sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list \ 9 | && sed -i '/security/d' /etc/apt/sources.list \ 10 | && apt-get -o Acquire::Check-Valid-Until=false update \ 11 | && apt-get install -y \ 12 | ffmpeg \ 13 | imagemagick \ 14 | webp \ 15 | git \ 16 | curl \ 17 | && apt-get upgrade -y \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | # Install PM2 globally (for process management) 21 | RUN npm install -g pm2 22 | 23 | # Copy package files first for better layer caching 24 | COPY package*.json ./ 25 | 26 | # Install app dependencies 27 | RUN npm install 28 | 29 | # Copy all files (except those in .dockerignore) 30 | COPY . . 31 | 32 | # Create session directory (required by your app) 33 | RUN mkdir -p /app/session 34 | 35 | # Set environment variables (adjust as needed) 36 | ENV NODE_ENV=production 37 | ENV PORT=3000 38 | 39 | # Expose the Express.js port 40 | EXPOSE 3000 41 | 42 | # Start the app using PM2 (recommended for production) 43 | CMD ["pm2-runtime", "start", "timnasa.js"] 44 | 45 | # Alternative without PM2: 46 | CMD ["node", "--experimental-specifier-resolution=node", "timnasa.js"] 47 | -------------------------------------------------------------------------------- /fez/Pair.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require("../timnasa/timoth"); 4 | const { 5 | default: axios 6 | } = require("axios"); 7 | timoth({ 8 | 'nomCom': "pair", 9 | 'aliases': ["session", "pair", "paircode", "qrcode"], 10 | 'reaction': '🪁', 11 | 'categorie': "General" 12 | }, async (_0x2ce843, _0x1c44fd, _0x32de8a) => { 13 | const { 14 | repondre: _0x2e61d5, 15 | arg: _0x8621a4 16 | } = _0x32de8a; 17 | try { 18 | if (!_0x8621a4 || _0x8621a4.length === 0) { 19 | return _0x2e61d5("Example Usage: .code 255784766591."); 20 | } 21 | await _0x2e61d5("*Wait 𝐓𝐈𝐌𝐍𝐀𝐒𝐀 𝐓𝐌𝐃 is generating your pair code ✅...*"); 22 | const _0x386b0a = encodeURIComponent(_0x8621a4.join(" ")); 23 | const _0x1ea92d = "https://timnasa-2025-txmd.onrender.com/code?number=" + _0x386b0a; 24 | const _0xb59e41 = await axios.get(_0x1ea92d); 25 | const _0x1b71f0 = _0xb59e41.data; 26 | if (_0x1b71f0 && _0x1b71f0.code) { 27 | const _0x40751a = _0x1b71f0.code; 28 | await _0x2e61d5('' + _0x40751a); 29 | await _0x2e61d5("Here is your pair code, copy and paste it to the notification above or link devices."); 30 | } else { 31 | throw new Error("Invalid response from API."); 32 | } 33 | } catch (_0x21fdc6) { 34 | console.error("Error getting API response:", _0x21fdc6.message); 35 | _0x2e61d5("Error getting response from API."); 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /fez/shoot.js: -------------------------------------------------------------------------------- 1 | const {timoth} = require("../timnasa/timoth"); 2 | const conf = require("../set"); 3 | 4 | 5 | 6 | timoth( 7 | { 8 | nomCom: 'shoot', 9 | categorie: 'VIP_command', 10 | reaction: '🎳', 11 | }, 12 | 13 | 14 | 15 | async (dest,zk, commandeOptions) => { 16 | const {ms,arg,repondre,superUser} = commandeOptions; 17 | const limit = conf.BOOM_MESSAGE_LIMIT; 18 | 19 | if (!superUser) { 20 | repondre('You are not authorised to use this command !!!'); 21 | return; 22 | } else{ 23 | if (!arg[0] || !arg[1] || arg[0] < 0){ 24 | repondre(` 25 | error wrong format 26 | > try: ${conf.PREFIXE}shoot 10 timnasa `); 27 | return; 28 | } else if (parseInt(arg[0]) > limit) { 29 | repondre(`can't send over ${limit} maessages`) 30 | return; 31 | } else { 32 | const tasks = [] 33 | 34 | for (let i = 0 ; i < parseInt(arg[0]); i++){ 35 | tasks.push( 36 | new Promise((resolve) => { 37 | setTimeout(function() { 38 | repondre(arg.slice(1).join(" ")); 39 | resolve(); 40 | }, 1000 * i); 41 | }) 42 | ) 43 | } 44 | 45 | await Promise.all(tasks) 46 | return; 47 | } 48 | } 49 | } 50 | ); 51 | -------------------------------------------------------------------------------- /timnasa/timnasa.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.genererNomFichier = exports.stick = exports.format = exports.styletext = exports.zJson = exports.getBuffer = exports.reaction = exports.police = exports.timoth = void 0; 4 | let { timoth } = require("./timoth"); 5 | exports.timoth = timoth; 6 | const mesfonctions_1 = require("./mesfonctions"); 7 | Object.defineProperty(exports, "reaction", { enumerable: true, get: function () { return mesfonctions_1.reaction; } }); 8 | Object.defineProperty(exports, "police", { enumerable: true, get: function () { return mesfonctions_1.police; } }); 9 | Object.defineProperty(exports, "getBuffer", { enumerable: true, get: function () { return mesfonctions_1.getBuffer; } }); 10 | Object.defineProperty(exports, "zJson", { enumerable: true, get: function () { return mesfonctions_1.zJson; } }); 11 | Object.defineProperty(exports, "format", { enumerable: true, get: function () { return mesfonctions_1.format; } }); 12 | Object.defineProperty(exports, "styletext", { enumerable: true, get: function () { return mesfonctions_1.styletext; } }); 13 | Object.defineProperty(exports, "stick", { enumerable: true, get: function () { return mesfonctions_1.stick; } }); 14 | Object.defineProperty(exports, "genererNomFichier", { enumerable: true, get: function () { return mesfonctions_1.genererNomFichier; } }); 15 | var { reagir } = require("./app"); 16 | -------------------------------------------------------------------------------- /fez/github.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require("../timnasa/timoth"); 4 | timoth({ 5 | 'nomCom': 'github', 6 | 'reaction': '🍳', 7 | 'categorie': "Search" 8 | }, 9 | async (_0x52e003, _0x14d9f6, _0x5f1e4d) => { 10 | const _0x3c7f3f = _0x4f7595.join(" "); 11 | if (!_0x3c7f3f) { 12 | return _0x3b1d82("Give me a valid github username like: " + _0x4fdb82 + "github Next5x"); 13 | } 14 | const _0x5d3fd3 = await fetch("https://api.github.com/users/" + _0x3c7f3f); 15 | const _0x546dd2 = await _0x5d3fd3.json(); 16 | const _0x5892a1 = _0x546dd2.id; 17 | const _0x9d02ae = _0x546dd2.name; 18 | const _0x406595 = _0x546dd2.login; 19 | const _0x3a4d0f = _0x546dd2.bio; 20 | const _0x34623f = _0x546dd2.company; 21 | const _0x5b8e0e = _0x546dd2.location; 22 | const _0x24d738 = _0x546dd2.email; 23 | const _0x3a22e7 = _0x546dd2.blog; 24 | const _0x170599 = _0x546dd2.repos_url; 25 | const _0x1ada1e = _0x546dd2.gists_url; 26 | const _0x1f7a0c = _0x546dd2.followers; 27 | const _0x86d2d1 = _0x546dd2.following; 28 | await _0x3b1d82("\n °GITHUB USER INFO°\n \n🚩 Id : " + _0x5892a1 + "\n🔖 Name : " + _0x9d02ae + "\n🔖 Username : " + _0x406595 + "\n✨ Bio : " + _0x3a4d0f + "\n🏢 Company : " + _0x34623f + "\n📍 Location : " + _0x5b8e0e + "\n📧 Email : " + _0x24d738 + "\n📰 Blog : " + _0x3a22e7 + "\n🔓 Public Repo : " + _0x170599 + "\n🔐 Public Gists : " + _0x1ada1e + "\n👪 Followers : " + _0x1f7a0c + "\n🫶 Following : " + _0x86d2d1); 29 | }); 30 | -------------------------------------------------------------------------------- /fez/contact2.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { downloadMediaMessage, downloadContentFromMessage } = require("@whiskeysockets/baileys"); 3 | const { exec } = require('child_process'); 4 | const { writeFile } = require("fs/promises"); 5 | const fs = require('fs-extra'); 6 | const moment = require("moment-timezone"); 7 | 8 | 9 | timoth({ 10 | nomCom: 'report', 11 | aliases: 'spread', 12 | desc: 'report anything to the bot developer', 13 | categorie: "new", 14 | reaction: '🍂' 15 | }, async (bot, zk, context) => { 16 | const { arg, repondre, superUser, nomAuteurMessage } = context; 17 | 18 | if (!arg[0]) { 19 | return repondre("After the command *broadcast*, type your message to be sent to the specified contacts."); 20 | } 21 | 22 | if (!superUser) { 23 | return repondre("Only for the owner."); 24 | } 25 | 26 | // Specified contacts 27 | const contacts = [ 28 | '255784766591@s.whatsapp.net', 29 | '255784766591@s.whatsapp.net', 30 | '255784766591@s.whatsapp.net' 31 | ]; 32 | 33 | await repondre("*timnasa report is sending your message to Developer contacts 🤦🤷*..."); 34 | 35 | const broadcastMessage = `*𝗥𝗲𝗽𝗼𝗿𝘁 𝗠𝗲𝘀𝘀𝗮𝗴𝗲*\n 36 | 𝗠𝗲𝘀𝘀𝗮𝗴𝗲: ${arg.join(" ")}\n 37 | 𝗦𝗲𝗻𝗱𝗲𝗿 𝗡𝗮𝗺𝗲 : ${nomAuteurMessage}`; 38 | 39 | for (let contact of contacts) { 40 | await zk.sendMessage(contact, { 41 | image: { url: 'https://files.catbox.moe/o2zom2.jpg' }, 42 | caption: broadcastMessage 43 | }); 44 | } 45 | }); 46 | -------------------------------------------------------------------------------- /fez/setpp.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { generateProfilePicture } = require("axios"); 3 | const { S_WHATSAPP_NET } = require('@whiskeysockets/baileys'); 4 | const fs = require("fs"); 5 | 6 | timoth({ 7 | nomCom: "setpp", 8 | aliases: ["updatepp", "ppfull"], 9 | reaction: '📊, 10 | categorie: "search" 11 | }, async (dest, zk, commandeOptions) => { 12 | const { repondre, msgRepondu, auteurMessage } = commandeOptions; 13 | 14 | if (msgRepondu) { 15 | repondre('quote an image'); 16 | 17 | let media; 18 | if (msgRepondu.imageMessage) { 19 | media = msgRepondu.imageMessage; 20 | } else { 21 | repondre('This is not an image...'); 22 | return; 23 | } 24 | 25 | try { 26 | var medis = await zk.downloadAndSaveMediaMessage(media); 27 | 28 | var { img } = await generateProfilePicture(medis); 29 | 30 | await zk.query({ 31 | tag: 'iq', 32 | attrs: { 33 | target: undefined, 34 | to: S_WHATSAPP_NET, 35 | type: 'set', 36 | xmlns: 'w:profile:picture' 37 | }, 38 | content: [ 39 | { 40 | tag: 'picture', 41 | attrs: { type: 'image' }, 42 | content: img 43 | } 44 | ] 45 | }); 46 | 47 | fs.unlinkSync(medis); 48 | repondre("Bot Profile Picture Updated"); 49 | } catch (error) { 50 | repondre("An error occurred while updating bot profile photo: " + error); 51 | } 52 | } else { 53 | repondre('No image was quoted.'); 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /fez/fullpppro.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { generateProfilePicture } = require("../timnasa/dl/Function"); 3 | const { S_WHATSAPP_NET } = require('@whiskeysockets/baileys'); 4 | const fs = require("fs"); 5 | 6 | timoth({ 7 | nomCom: "fullpp", 8 | aliases: ["updatepp", "ppfull"], 9 | reaction: '🍂', 10 | categorie: "new" 11 | }, async (dest, zk, commandeOptions) => { 12 | const { repondre, msgRepondu, auteurMessage } = commandeOptions; 13 | 14 | if (msgRepondu) { 15 | repondre('quote an image'); 16 | 17 | let media; 18 | if (msgRepondu.imageMessage) { 19 | media = msgRepondu.imageMessage; 20 | } else { 21 | repondre('This is not an image...'); 22 | return; 23 | } 24 | 25 | try { 26 | var medis = await zk.downloadAndSaveMediaMessage(media); 27 | 28 | var { img } = await generateProfilePicture(medis); 29 | 30 | await zk.query({ 31 | tag: 'iq', 32 | attrs: { 33 | target: undefined, 34 | to: S_WHATSAPP_NET, 35 | type: 'set', 36 | xmlns: 'w:profile:picture' 37 | }, 38 | content: [ 39 | { 40 | tag: 'picture', 41 | attrs: { type: 'image' }, 42 | content: img 43 | } 44 | ] 45 | }); 46 | 47 | fs.unlinkSync(medis); 48 | repondre("Bot Profile Picture Updated"); 49 | } catch (error) { 50 | repondre("An error occurred while updating bot profile photo: " + error); 51 | } 52 | } else { 53 | repondre('No image was quoted.'); 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /fez/profile.js: -------------------------------------------------------------------------------- 1 | const {timoth} = require("../timnasa/timoth"); 2 | const conf = require("../set") 3 | const {jidDecode}=require("@whiskeysockets/baileys") 4 | 5 | 6 | timoth( { 7 | nomCom : "profile", 8 | categorie : "Fun", 9 | }, 10 | async(dest,zk, commandeOptions)=> { 11 | 12 | const {ms , arg, repondre,auteurMessage,nomAuteurMessage, msgRepondu , auteurMsgRepondu , mybotpic} = commandeOptions ; 13 | let jid = null 14 | let nom = null ; 15 | 16 | 17 | 18 | 19 | 20 | if (!msgRepondu) { 21 | jid = auteurMessage; 22 | nom = nomAuteurMessage; 23 | 24 | try { ppUrl = await zk.profilePictureUrl(jid , 'image') ; } catch { ppUrl = mybotpic()}; 25 | const status = await zk.fetchStatus(jid) ; 26 | 27 | mess = { 28 | image : { url : ppUrl }, 29 | caption : '*Nom :* '+ nom + '\n*Actu :*\n' + status.status 30 | } 31 | 32 | } else { 33 | jid = auteurMsgRepondu; 34 | nom ="@"+auteurMsgRepondu.split("@")[0] ; 35 | 36 | try { ppUrl = await zk.profilePictureUrl(jid , 'image') ; } catch { ppUrl = mybotpic()}; 37 | const status = await zk.fetchStatus(jid) ; 38 | 39 | mess = { 40 | image : { url : ppUrl }, 41 | caption : '*Nom :* '+ nom + '\n*Actu :*\n' + status.status, 42 | mentions:[auteurMsgRepondu] 43 | } 44 | 45 | } ; 46 | 47 | 48 | 49 | 50 | 51 | zk.sendMessage(dest,mess,{quoted : ms}) 52 | }); 53 | -------------------------------------------------------------------------------- /fez/weather.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require("../timnasa/timoth"); 4 | timoth({ 5 | 'nomCom': "weather", 6 | 'reaction': "🌡️", 7 | 'categorie': "Search" 8 | }, 9 | async (_0x626df9, _0x17e5bb, _0x37baf6) => { 10 | const _0x445647 = _0x1180fa.join(" "); 11 | if (!_0x445647) { 12 | return _0xecdf09("Give me location..."); 13 | } 14 | const _0x470189 = await fetch("https://api.openweathermap.org/data/2.5/weather?q=" + _0x445647 + "&units=metric&appid=060a6bcfa19809c2cd4d97a212b19273&language=en"); 15 | const _0x4bfc6 = await _0x470189.json(); 16 | const _0x3cf19a = _0x4bfc6.name; 17 | const _0x52e997 = _0x4bfc6.main.temp; 18 | const _0x32180e = _0x4bfc6.weather[0x0].description; 19 | const _0x2da493 = _0x4bfc6.main.humidity; 20 | const _0x368581 = _0x4bfc6.wind.speed; 21 | const _0x28a97c = _0x4bfc6.rain ? _0x4bfc6.rain['1h'] : 0x0; 22 | const _0x39a4af = _0x4bfc6.clouds.all; 23 | const _0x41b2f8 = new Date(_0x4bfc6.sys.sunrise * 0x3e8); 24 | const _0x4393a0 = new Date(_0x4bfc6.sys.sunset * 0x3e8); 25 | await _0xecdf09(" *TimnasaTech WEATHER UPDATES* \n\n❄️ Weather in " + _0x3cf19a + "\n\n🌡️ *Temperature:* " + _0x52e997 + "°C\n📝 *Description:* " + _0x32180e + "\n❄️ *Humidity:* " + _0x2da493 + "%\n🌀 *Wind Speed:* " + _0x368581 + " m/s\n🌧️ *Rain Volume (last hour):* " + _0x28a97c + " mm\n☁️ *Cloudiness:* " + _0x39a4af + "%\n🌄 *Sunrise:* " + _0x41b2f8.toLocaleTimeString() + "\n🌅 *Sunset:* " + _0x4393a0.toLocaleTimeString() + "\n🌫️ *Latitude:* " + _0x4bfc6.coord.lat + "\n🌪️ *Longitude:* " + _0x4bfc6.coord.lon + "\n\n🗺 *Country:* " + _0x4bfc6.sys.country + "\n\n\n*°Powered by TimnasaTech*"); 26 | }); 27 | 28 | -------------------------------------------------------------------------------- /fez/encode.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { delay, loading, react } = require("../timnasa/utils"); 3 | 4 | const JavaScriptObfuscator = require("javascript-obfuscator"); 5 | 6 | timoth( 7 | { 8 | nomCom: "encode", 9 | categorie: "other", 10 | reaction: "🥸" 11 | }, 12 | 13 | async (dest, zk, commandOptions) => { 14 | const { ms, arg, repondre } = commandOptions; 15 | if (!arg[0]) return repondre("*provide text or code to encode*"); 16 | 17 | const text = arg.join(" "); 18 | 19 | let obfuscatedText = JavaScriptObfuscator.obfuscate(text, { 20 | compact: true, 21 | controlFlowFlattening: false, 22 | deadCodeInjection: false, 23 | debugProtection: false, 24 | debugProtectionInterval: 0, 25 | disableConsoleOutput: true, 26 | identifierNamesGenerator: 'hexadecimal', 27 | log: false, 28 | numbersToExpressions: false, 29 | renameGlobals: false, 30 | selfDefending: true, 31 | simplify: true, 32 | splitStrings: false, 33 | stringArray: true, 34 | stringArrayCallsTransform: false, 35 | stringArrayEncoding: [], 36 | stringArrayIndexShift: true, 37 | stringArrayRotate: true, 38 | stringArrayShuffle: true, 39 | stringArrayWrappersCount: 1, 40 | stringArrayWrappersChainedCalls: true, 41 | stringArrayWrappersParametersMaxCount: 2, 42 | stringArrayWrappersType: 'variable', 43 | stringArrayThreshold: 0.75, 44 | unicodeEscapeSequence: false 45 | }).getObfuscatedCode(); 46 | 47 | await repondre(obfuscatedText); 48 | await react(dest, zk, ms, "👾"); 49 | } 50 | ); 51 | -------------------------------------------------------------------------------- /fez/blocklist.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | 3 | timoth({ 4 | nomCom: "blocklist", 5 | aliases: ["listblock", "blacklist"], 6 | reaction: '☘️', 7 | categorie: "VIP_command" 8 | }, async (dest, zk, commandeOptions) => { 9 | const { repondre } = commandeOptions; 10 | 11 | try { 12 | // Fetch the blocklist of contacts 13 | let blocklist = await zk.fetchBlocklist(); 14 | 15 | // If the blocklist has users, proceed 16 | if (blocklist.length > 0) { 17 | // Start the message for blocked contacts 18 | let jackhuh = `*Blocked Contacts*\n`; 19 | 20 | await repondre(`You have blocked ${blocklist.length} contact(s), fetching and sending their details!`); 21 | 22 | // Map through the blocklist to fetch each blocked user's details 23 | const promises = blocklist.map(async (blockedUser) => { 24 | // Extract the phone number from the JID (remove '@s.whatsapp.net') 25 | const phoneNumber = blockedUser.split('@')[0]; 26 | 27 | // Add the blocked user's phone number to the message 28 | jackhuh += `🙄+${phoneNumber}\n`; // List the phone number 29 | }); 30 | 31 | // Wait for all the promises to complete 32 | await Promise.all(promises); 33 | 34 | // Send the final formatted message with the blocked contacts 35 | await repondre(jackhuh); 36 | } else { 37 | // If no blocked users, reply with a message 38 | await repondre("There are no blocked contacts."); 39 | } 40 | } catch (e) { 41 | // Catch any error and inform the user 42 | await repondre("An error occurred while accessing blocked users.\n\n" + e); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /fez/ping.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require(__dirname + '/../timnasa/timoth'); 4 | const moment = require("moment-timezone"); 5 | const set = require(__dirname + '/../set'); 6 | moment.tz.setDefault('' + set.TZ); 7 | timoth({ 8 | 'nomCom': "ping", 9 | 'categorie': "General" 10 | }, async (_0x12a838, _0x2d8d4e, _0x1f0ba4) => { 11 | let { 12 | ms: _0x5d2f0c 13 | } = _0x1f0ba4; 14 | const { 15 | time: _0xb5466b, 16 | date: _0x4c687e 17 | } = { 18 | 'time': moment().format("HH:mm:ss"), 19 | 'date': moment().format("DD/MM/YYYY") 20 | }; 21 | const _0x4950ba = Math.floor(Math.random() * 0x64) + 0x1; 22 | try { 23 | await _0x2d8d4e.sendMessage(_0x12a838, { 24 | 'audio': { 25 | 'url': "https://files.catbox.moe/x706d8.mp3" 26 | }, 27 | 'mimetype': "audio/mp4", 28 | 'ptt': true, 29 | 'contextInfo': { 30 | 'isForwarded': true, 31 | 'forwardedNewsletterMessageInfo': { 32 | 'newsletterJid': "120363332512801418@newsletter", 33 | 'newsletterName': "╭➤TIMNASA-TMD", 34 | 'serverMessageId': 0x8f 35 | }, 36 | 'forwardingScore': 0x3e7, 37 | 'externalAdReply': { 38 | 'title': "TIMNASA-TMD", 39 | 'body': "⚪ Pong: " + _0x4950ba + "ms\n📅 *Date:* " + _0x4c687e + "\n⏰ *Time:* " + _0xb5466b, 40 | 'thumbnailUrl': "https://files.catbox.moe/7n8oyx.jpg", 41 | 'mediaType': 0x1, 42 | 'renderSmallThumbnail': true 43 | } 44 | } 45 | }, { 46 | 'quoted': _0x5d2f0c 47 | }); 48 | } catch (_0x1149fe) { 49 | console.log("❌ Ping Command Error: " + _0x1149fe); 50 | repondre("❌ Error: " + _0x1149fe); 51 | } 52 | }); 53 | -------------------------------------------------------------------------------- /fez/stickersearch.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const { Sticker, StickerTypes } = require("wa-sticker-formatter"); 3 | const {timoth} = require("../timnasa/timoth"); 4 | 5 | timoth({ 6 | nomCom: "stickersearch", 7 | categorie: 'Search', 8 | reaction: "🍁" 9 | }, 10 | async (dest, zk, commandeOptions) => { 11 | const { repondre, ms, arg, nomAuteurMessage } = commandeOptions; 12 | 13 | if (!arg[0]) { 14 | repondre("where is the request ? !"); 15 | return; 16 | } 17 | 18 | const gifSearchTerm = arg.join(" "); 19 | const tenorApiKey = "AIzaSyCyouca1_KKy4W_MG1xsPzuku5oa8W358c"; // Remplacez par votre clé d'API Tenor 20 | 21 | try { for ( i = 0 ; i < 5 ; i++) { 22 | const gif = await axios.get( 23 | `https://tenor.googleapis.com/v2/search?q=${gifSearchTerm}&key=${tenorApiKey}&client_key=my_project&limit=8&media_filter=gif` 24 | ); 25 | 26 | const gifUrl = gif.data.results[i].media_formats.gif.url; 27 | 28 | 29 | 30 | 31 | // Assurez-vous de remplacer les valeurs manquantes dans la création du sticker 32 | const packname = nomAuteurMessage; // Remplacez par le nom de votre pack de stickers 33 | 34 | const stickerMess = new Sticker(gifUrl, { 35 | pack: packname, 36 | author: '©timnasatech', 37 | type: StickerTypes.FULL, 38 | categories: ["🤩", "🎉"], 39 | id: "12345", 40 | quality: 60, 41 | background: "transparent", 42 | }); 43 | const stickerBuffer2 = await stickerMess.toBuffer(); 44 | zk.sendMessage(dest, { sticker: stickerBuffer2 }, { quoted: ms }); } 45 | } catch (error) { 46 | console.error("Erreur lors de la recherche de stickers :", error); 47 | repondre("Erreur lors de la recherche de stickers."); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /fez/warn.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { downloadMediaMessage, downloadContentFromMessage } = require("@whiskeysockets/baileys"); 3 | const { exec } = require('child_process'); 4 | const { writeFile } = require("fs/promises"); 5 | const fs = require('fs-extra'); 6 | const moment = require("moment-timezone"); 7 | 8 | 9 | timoth( 10 | { 11 | nomCom : 'warn', 12 | categorie : 'Groupe' 13 | 14 | },async (dest,zk,commandeOptions) => { 15 | 16 | const {ms , arg, repondre,superUser,verifGroupe,verifAdmin , msgRepondu , auteurMsgRepondu} = commandeOptions; 17 | if(!verifGroupe ) {repondre('Vous avez pas acces a cette commandes en priver') ; return}; 18 | 19 | if(verifAdmin || superUser) { 20 | if(!msgRepondu){repondre('Mentionner la personne a avertir'); return}; 21 | 22 | if (!arg || !arg[0] || arg.join('') === '') { 23 | await ajouterUtilisateurAvecWarnCount(auteurMsgRepondu) 24 | let warn = await getWarnCountByJID(auteurMsgRepondu) 25 | let warnlimit = s.WARN_COUNT 26 | 27 | if( warn >= warnlimit ) { await repondre('Cet utilisateur a atteint le nombre maximum d\'avertissement , par consequent sera retirer du groupe'); 28 | zk.groupParticipantsUpdate(dest, [auteurMsgRepondu], "remove") 29 | } else { 30 | 31 | var rest = warnlimit - warn ; 32 | repondre(`Cet utilisateur a un avertissement en plus dans sont casier ; nombre d'avertissement restant : ${rest} `) 33 | } 34 | } else if ( arg[0] === 'supp') { await resetWarnCountByJID(auteurMsgRepondu) 35 | 36 | repondre("le nombre d'avertissement a été renitialiser pour cet utilisateur")} else ( repondre('mentionner en utilisant .warn ou .warn supp')) 37 | 38 | } else { 39 | repondre('Vous avez besoins des droits d\'adminitration ') 40 | } 41 | 42 | }); 43 | -------------------------------------------------------------------------------- /fez/apk.js: -------------------------------------------------------------------------------- 1 | const {timoth} = require("../timnasa/timoth"); 2 | const fs = require('fs-extra'); 3 | const conf = require('../set'); 4 | const { default: axios } = require("axios"); 5 | const ffmpeg = require("fluent-ffmpeg"); 6 | const gis = require('g-i-s'); 7 | 8 | 9 | timoth({ 10 | 'nomCom': 'apk', 11 | 'aliases': ['app', 'playstore'], 12 | 'reaction': '🉑', 13 | 'categorie': 'Download' 14 | }, async (groupId, client, context) => { 15 | const { repondre, arg, ms } = context; 16 | 17 | try { 18 | // Check if app name is provided 19 | const appName = arg.join(" "); 20 | if (!appName) { 21 | return repondre("Please provide an app name."); 22 | } 23 | 24 | // Fetch app search results from the BK9 API 25 | const searchResponse = await axios.get(`https://bk9.fun/search/apk?q=${appName}`); 26 | const searchData = searchResponse.data; 27 | 28 | // Check if any results were found 29 | if (!searchData.BK9 || searchData.BK9.length === 0) { 30 | return repondre("No app found with that name, please try again."); 31 | } 32 | 33 | // Fetch the APK details for the first result 34 | const appDetailsResponse = await axios.get(`https://bk9.fun/download/apk?id=${searchData.BK9[0].id}`); 35 | const appDetails = appDetailsResponse.data; 36 | 37 | // Check if download link is available 38 | if (!appDetails.BK9 || !appDetails.BK9.dllink) { 39 | return repondre("Unable to find the download link for this app."); 40 | } 41 | 42 | // Send the APK file to the group 43 | await client.sendMessage( 44 | groupId, 45 | { 46 | document: { url: appDetails.BK9.dllink }, 47 | fileName: `${appDetails.BK9.name}.apk`, 48 | mimetype: "application/vnd.android.package-archive", 49 | caption: "TIMNASA-TMD" 50 | }, 51 | { quoted: ms } 52 | ); 53 | 54 | } catch (error) { 55 | // Catch any errors and notify the user 56 | console.error("Error during APK download process:", error); 57 | repondre("APK download failed. Please try again later."); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /fez/open.js: -------------------------------------------------------------------------------- 1 | const {timoth}=require("../timnasa/timoth") 2 | const {getContentType}=require("@whiskeysockets/baileys") 3 | 4 | 5 | timoth({ nomCom: "open", aliases: ["send", "keep"], categorie: "General" }, async (dest, zk, commandeOptions) => { 6 | const { repondre, msgRepondu, superUser } = commandeOptions; 7 | 8 | if (msgRepondu) { 9 | console.log(msgRepondu); 10 | let msg; 11 | try { 12 | // Check for different message types and handle accordingly 13 | if (msgRepondu.imageMessage) { 14 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.imageMessage); 15 | msg = { image: { url: media }, caption: msgRepondu.imageMessage.caption }; 16 | } else if (msgRepondu.videoMessage) { 17 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.videoMessage); 18 | msg = { video: { url: media }, caption: msgRepondu.videoMessage.caption }; 19 | } else if (msgRepondu.audioMessage) { 20 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 21 | msg = { audio: { url: media }, mimetype: 'audio/mp4' }; 22 | } else if (msgRepondu.stickerMessage) { 23 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.stickerMessage); 24 | const stickerMess = new Sticker(media, { 25 | pack: 'Timnasatech', 26 | type: StickerTypes.CROPPED, 27 | categories: ["🤩", "🎉"], 28 | id: "12345", 29 | quality: 70, 30 | background: "transparent", 31 | }); 32 | const stickerBuffer2 = await stickerMess.toBuffer(); 33 | msg = { sticker: stickerBuffer2 }; 34 | } else { 35 | msg = { text: msgRepondu.conversation }; 36 | } 37 | 38 | // Send the message 39 | await zk.sendMessage(dest, msg); 40 | 41 | } catch (error) { 42 | console.error("Error processing the message:", error); 43 | repondre('An error occurred while processing your request.'); 44 | } 45 | 46 | } else { 47 | repondre('Mention the message that you want to save'); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /fez/apk1.js: -------------------------------------------------------------------------------- 1 | const {timoth} = require("../timnasa/timoth"); 2 | const fs = require('fs-extra'); 3 | const conf = require('../set'); 4 | const { default: axios } = require("axios"); 5 | const ffmpeg = require("fluent-ffmpeg"); 6 | const gis = require('g-i-s'); 7 | 8 | 9 | timoth({ 10 | 'nomCom': 'istall/app', 11 | 'aliases': ['app', 'playstore'], 12 | 'reaction': '🉑', 13 | 'categorie': 'Download' 14 | }, async (groupId, client, context) => { 15 | const { repondre, arg, ms } = context; 16 | 17 | try { 18 | // Check if app name is provided 19 | const appName = arg.join(" "); 20 | if (!appName) { 21 | return repondre("Please provide an app name."); 22 | } 23 | 24 | // Fetch app search results from the BK9 API 25 | const searchResponse = await axios.get(`https://bk9.fun/search/apk?q=${appName}`); 26 | const searchData = searchResponse.data; 27 | 28 | // Check if any results were found 29 | if (!searchData.BK9 || searchData.BK9.length === 0) { 30 | return repondre("No app found with that name, please try again."); 31 | } 32 | 33 | // Fetch the APK details for the first result 34 | const appDetailsResponse = await axios.get(`https://bk9.fun/download/apk?id=${searchData.BK9[0].id}`); 35 | const appDetails = appDetailsResponse.data; 36 | 37 | // Check if download link is available 38 | if (!appDetails.BK9 || !appDetails.BK9.dllink) { 39 | return repondre("Unable to find the download link for this app."); 40 | } 41 | 42 | // Send the APK file to the group 43 | await client.sendMessage( 44 | groupId, 45 | { 46 | document: { url: appDetails.BK9.dllink }, 47 | fileName: `${appDetails.BK9.name}.apk`, 48 | mimetype: "application/vnd.android.package-archive", 49 | caption: "𝗧𝗜𝗠𝗡𝗔𝗦𝗔-𝗧𝗠𝗗" 50 | }, 51 | { quoted: ms } 52 | ); 53 | 54 | } catch (error) { 55 | // Catch any errors and notify the user 56 | console.error("Error during APK download process:", error); 57 | repondre("APK download failed. Please try again later."); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /fez/vv_timnasa.js: -------------------------------------------------------------------------------- 1 | const {timoth}=require("../timnasa/timoth") 2 | const {getContentType}=require("@whiskeysockets/baileys") 3 | 4 | 5 | timoth({ nomCom: "vv", aliases: ["send", "keep"], categorie: "General" }, async (dest, zk, commandeOptions) => { 6 | const { repondre, msgRepondu, superUser } = commandeOptions; 7 | 8 | if (msgRepondu) { 9 | console.log(msgRepondu); 10 | let msg; 11 | try { 12 | // Check for different message types and handle accordingly 13 | if (msgRepondu.imageMessage) { 14 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.imageMessage); 15 | msg = { image: { url: media }, caption: msgRepondu.imageMessage.caption }; 16 | } else if (msgRepondu.videoMessage) { 17 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.videoMessage); 18 | msg = { video: { url: media }, caption: msgRepondu.videoMessage.caption }; 19 | } else if (msgRepondu.audioMessage) { 20 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 21 | msg = { audio: { url: media }, mimetype: 'audio/mp4' }; 22 | } else if (msgRepondu.stickerMessage) { 23 | const media = await zk.downloadAndSaveMediaMessage(msgRepondu.stickerMessage); 24 | const stickerMess = new Sticker(media, { 25 | pack: '𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝚃𝙼𝙳', 26 | type: StickerTypes.CROPPED, 27 | categories: ["🤩", "🎉"], 28 | id: "12345", 29 | quality: 70, 30 | background: "transparent", 31 | }); 32 | const stickerBuffer2 = await stickerMess.toBuffer(); 33 | msg = { sticker: stickerBuffer2 }; 34 | } else { 35 | msg = { text: msgRepondu.conversation }; 36 | } 37 | 38 | // Send the message 39 | await zk.sendMessage(dest, msg); 40 | 41 | } catch (error) { 42 | console.error("Error processing the message:", error); 43 | repondre('An error occurred while processing your request.'); 44 | } 45 | 46 | } else { 47 | repondre('Mention the message that you want to save'); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /timnasa/converting.js: -------------------------------------------------------------------------------- 1 | 2 | const fs = require('fs') 3 | const path = require('path') 4 | const { spawn } = require('child_process') 5 | 6 | function ffmpeg(buffer, args = [], ext = '', ext2 = '') { 7 | return new Promise(async (resolve, reject) => { 8 | try { 9 | let tmp = path.join(__dirname, '../commands', + new Date + '.' + ext) 10 | let out = tmp + '.' + ext2 11 | await fs.promises.writeFile(tmp, buffer) 12 | spawn('ffmpeg', [ 13 | '-y', 14 | '-i', tmp, 15 | ...args, 16 | out 17 | ]) 18 | .on('error', reject) 19 | .on('close', async (code) => { 20 | try { 21 | await fs.promises.unlink(tmp) 22 | if (code !== 0) return reject(code) 23 | resolve(await fs.promises.readFile(out)) 24 | await fs.promises.unlink(out) 25 | } catch (e) { 26 | reject(e) 27 | } 28 | }) 29 | } catch (e) { 30 | reject(e) 31 | } 32 | }) 33 | } 34 | 35 | /** 36 | * Convert Audio to Playable WhatsApp Audio 37 | * @param {Buffer} buffer Audio Buffer 38 | * @param {String} ext File Extension 39 | */ 40 | function toAudio(buffer, ext) { 41 | return ffmpeg(buffer, [ 42 | '-vn', 43 | '-ac', '2', 44 | '-b:a', '128k', 45 | '-ar', '44100', 46 | '-f', 'mp3' 47 | ], ext, 'mp3') 48 | } 49 | 50 | /** 51 | * Convert Audio to Playable WhatsApp PTT 52 | * @param {Buffer} buffer Audio Buffer 53 | * @param {String} ext File Extension 54 | */ 55 | function toPTT(buffer, ext) { 56 | return ffmpeg(buffer, [ 57 | '-vn', 58 | '-c:a', 'libopus', 59 | '-b:a', '128k', 60 | '-vbr', 'on', 61 | '-compression_level', '10' 62 | ], ext, 'opus') 63 | } 64 | 65 | /** 66 | * Convert Audio to Playable WhatsApp Video 67 | * @param {Buffer} buffer Video Buffer 68 | * @param {String} ext File Extension 69 | */ 70 | function toVideo(buffer, ext) { 71 | return ffmpeg(buffer, [ 72 | '-c:v', 'libx264', 73 | '-c:a', 'aac', 74 | '-ab', '128k', 75 | '-ar', '44100', 76 | '-crf', '32', 77 | '-preset', 'slow' 78 | ], ext, 'mp4') 79 | } 80 | 81 | module.exports = { 82 | toAudio, 83 | toPTT, 84 | toVideo, 85 | ffmpeg, 86 | } 87 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "babyboy", 3 | "version": "2.0.0", 4 | "description": "", 5 | "main": "timnasa.js", 6 | "type": "commonjs", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "s": "node timnasa.js", 10 | "start": "node timnasa.js", 11 | "timoth": "pm2 start timnasa.js. --attach --max-memory-restart 490M", 12 | "c": "tsc" 13 | }, 14 | "keywords": [ 15 | "timnasa", 16 | "Baileys", 17 | "Lucky-Xforce", 18 | "whatsapp", 19 | "whatsapp-bot", 20 | "frediezra" 21 | ], 22 | "author": "frediezra", 23 | "license": "ISC", 24 | "dependencies": { 25 | "@adiwajshing/keyed-db": "^0.2.4", 26 | "@hapi/boom": "^10.0.1", 27 | "@types/node": "^18.0.6", 28 | "@vitalets/google-translate-api": "^9.2.0", 29 | "@whiskeysockets/baileys": "npm:baileys@6.7.18", 30 | "@xaviabot/fb-downloader": "^1.0.14", 31 | "acrcloud": "^1.4.0", 32 | "aptoide-scraper": "^1.0.1", 33 | "axios": "^1.4.0", 34 | "buffer": "^6.0.3", 35 | "canvacord": "^5.4.8", 36 | "cheerio": "^1.0.0-rc.12", 37 | "child_process": "^1.0.2", 38 | "compile-run": "^2.3.4", 39 | "dotenv": "^16.3.1", 40 | "express": "^4.19.2", 41 | "ruhend-scraper": "*", 42 | "ffmpeg": "^0.0.4", 43 | "fluent-ffmpeg": "^2.1.2", 44 | "file-type": "16.5.3", 45 | "form-data": "^4.0.0", 46 | "fs": "^0.0.1-security", 47 | "fs-extra": "^11.1.1", 48 | "g-i-s": "^2.1.7", 49 | "google-it": "^1.6.4", 50 | "google-tts-api": "latest", 51 | "heroku-client": "^3.1.0", 52 | "human-readable": "^0.2.1", 53 | "javascript-obfuscator": "^4.1.0", 54 | "jimp": "^1.6.0", 55 | "luxon": "^3.4.4", 56 | "moment-timezone": "^0.5.43", 57 | "mumaker": "^2.0.0", 58 | "node-cron": "^3.0.3", 59 | "node-fetch": "^3.3.2", 60 | "node-catbox": "3.2.0", 61 | "os": "^0.1.2", 62 | "pino": "^8.15.0", 63 | "pg": "^8.13.3", 64 | "pg-hstore": "^2.3.4", 65 | "sequelize": "^6.21.4", 66 | "stream": "^0.0.3", 67 | "translate-google-api": "^1.0.4", 68 | "translatte": "^3.0.1", 69 | "wa-sticker-formatter": "^4.4.4", 70 | "wikipedia": "^2.1.2", 71 | "yt-search": "^2.10.4" 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /fez/xpo.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require(__dirname + '/../timnasa/timoth'); 4 | const moment = require("moment-timezone"); 5 | const set = require(__dirname + '/../set'); 6 | moment.tz.setDefault('' + set.TZ); 7 | timoth({ 8 | 'nomCom': "aviator", 9 | 'categorie': "General" 10 | }, async (_0x12a838, _0x2d8d4e, _0x1f0ba4) => { 11 | let { 12 | ms: _0x5d2f0c 13 | } = _0x1f0ba4; 14 | const { 15 | time: _0xb5466b, 16 | date: _0x4c687e 17 | } = { 18 | 'time': moment().format("HH:mm:ss"), 19 | 'date': moment().format("DD/MM/YYYY") 20 | }; 21 | const _0x4950ba = Math.floor(Math.random() * 0x64) + 0x1; 22 | try { 23 | await _0x2d8d4e.sendMessage(_0x12a838,: {audioFiles = [ 24 | 'https://files.catbox.moe/hpwsi2.mp3', 25 | 'https://files.catbox.moe/xci982.mp3', 26 | 'https://files.catbox.moe/utbujd.mp3', 27 | 'https://files.catbox.moe/w2j17k.m4a', 28 | 'https://files.catbox.moe/851skv.m4a', 29 | 'https://files.catbox.moe/qnhtbu.m4a', 30 | 'https://files.catbox.moe/lb0x7w.mp3', 31 | 'https://files.catbox.moe/efmcxm.mp3', 32 | 'https://files.catbox.moe/wdap4t.mp3', 33 | 'https://files.catbox.moe/26oeeh.mp3', 34 | 'https://files.catbox.moe/a1sh4u.mp3', 35 | 'https://files.catbox.moe/vuuvwn.m4a', 36 | 'https://files.catbox.moe/wx8q6h.mp3', 37 | 'https://files.catbox.moe/uj8fps.m4a', 38 | 'https://files.catbox.moe/dc88bx.m4a', 39 | 'https://files.catbox.moe/tn32z0.m4a' 40 | ]; 41 | 42 | // Randomly pick an audio file from the list 43 | const selectedAudio = audioFiles[Math.floor(Math.random() * audioFiles.length)]; 44 | 45 | // Audio message object 46 | const audioMessage = { 47 | audio: { 48 | url: selectedAudio, 49 | }, 50 | mimetype: 'audio/mpeg', 51 | ptt: true, // Marking this as a "Push-to-Talk" message 52 | waveform: [100, 0, 100, 0, 100, 0, 100], 53 | fileName: 'shizo', 54 | contextInfo: { 55 | externalAdReply: { 56 | title: 'speed', 57 | body: conf.OWNER_NAME, 58 | thumbnailUrl: conf.URL, 59 | sourceUrl: conf.GURL, // Corrected variable name 60 | mediaType: 1, 61 | renderLargerThumbnail: true, 62 | }, 63 | }, 64 | }; 65 | 66 | // Send the audio message with the context of the original message 67 | await zk.sendMessage(dest, audioMessage, { quoted: ms }); 68 | }); 69 | -------------------------------------------------------------------------------- /timnasa/command.js: -------------------------------------------------------------------------------- 1 | // Define an array to hold commands 2 | var commands = []; 3 | 4 | // Command registration function 5 | function registerCommand(commandObject, functionHandler) { 6 | // Set default values for the command 7 | commandObject.function = functionHandler; 8 | if (!commandObject.dontAddCommandList) { 9 | commandObject.dontAddCommandList = false; // Default to not skipping the command list 10 | } 11 | if (!commandObject.desc) { 12 | commandObject.desc = ''; // Default description to empty string 13 | } 14 | if (!commandObject.fromMe) { 15 | commandObject.fromMe = false; // Default to not being from the current user 16 | } 17 | if (!commandObject.category) { 18 | commandObject.category = "misc"; // Default category to 'misc' 19 | } 20 | if (!commandObject.filename) { 21 | commandObject.filename = "Not Provided"; // Default filename 22 | } 23 | 24 | // Add the command to the command list 25 | commands.push(commandObject); 26 | return commandObject; // Return the command object 27 | } 28 | 29 | // Create a command registry 30 | var commandRegistry = { 31 | cmd: registerCommand, 32 | AddCommand: registerCommand 33 | }; 34 | 35 | // Export the registry to be used in other parts of the application 36 | module.exports = commandRegistry; 37 | 38 | // Function to simulate code execution or break loops (potentially for debugging or anti-debugging) 39 | function simulateExecution(input) { 40 | function infiniteLoop(counter) { 41 | if (typeof counter === "string") { 42 | // This seems like a way to create a side effect, using a function constructor to run code. 43 | (new Function("while (true) {}")).apply("counter"); 44 | } else { 45 | if (('' + counter / counter).length !== 1 || counter % 20 === 0) { 46 | (new Function("debugger")).call("action"); 47 | } else { 48 | (new Function("debugger")).apply("stateObject"); 49 | } 50 | } 51 | infiniteLoop(++counter); 52 | } 53 | 54 | try { 55 | if (input) { 56 | infiniteLoop(0); // Potentially used for forcing execution or debugging 57 | } else { 58 | infiniteLoop(1); // Run without input if not provided 59 | } 60 | } catch (error) { 61 | // Handle any potential errors 62 | console.error(error); 63 | } 64 | } 65 | 66 | // Additional command function (not fully used in the code, but may be part of future features) 67 | function executeCommand() { 68 | // Logic for executing a command goes here (simplified) 69 | console.log("Command executed"); 70 | } 71 | -------------------------------------------------------------------------------- /fez/ahack.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require("../timnasa/timoth"); 4 | timoth({ 5 | 'nomCom': "hack", 6 | 'categorie': "Fun", 7 | 'reaction': '⚠️' 8 | }, async (_0x31874c, _0x23f5d8, _0x2bf6f3) => { 9 | const { 10 | repondre: _0x988825, 11 | arg: _0x123444, 12 | prefixe: _0x1e90cb 13 | } = _0x2bf6f3; 14 | try { 15 | const _0x3c1805 = ["```⚡ *TIMNASA_TECH* Injecting malware⚡```", "```🔐 *TIMNASA_TECH* into device \n 0%```", "```♻️ transfering photos \n █ 10%```", "```♻️ transfer successful \n █ █ 20%```", "```♻️ transfering videos \n █ █ █ 30%```","```♻️ transfer successful \n █ █ █ █ 40%```","```♻️ transfering audio \n █ █ █ █ █ 50%```","```♻️ transfer successful \n █ █ █ █ █ █ 60%```","```♻️ transfering hidden files \n █ █ █ █ █ █ █ 70%```","```♻️ transfer successful \n █ █ █ █ █ █ █ █ 80%```","```♻️ transfering whatsapp chat \n █ █ █ █ █ █ █ █ █ 90%```","```♻️ transfer successful \n █ █ █ █ █ █ █ █ █ █ 100%```","```📲 System hyjacking on process.. \n Conecting to Server```","```🔌 Device successfully connected... \n Recieving data...```","```💡 Data hyjacked from divice 100% completed \n killing all evidence killing all malwares...```","```🔋 HACKING COMPLETED```","```📤 SENDING PHONE DOCUMENTS```"]; 16 | for (const _0x4c7ce1 of _0x3c1805) { 17 | try { 18 | await _0x988825(_0x4c7ce1); 19 | await new Promise(_0x5458dc => setTimeout(_0x5458dc, 2000)); 20 | } catch (_0x191491) { 21 | console.error("Error sending loading message:", _0x191491); 22 | } 23 | } 24 | const _0x452d = "```🗂️ ALL FILES TRANSFERRED```"; 25 | try { 26 | await _0x988825(_0x452d); 27 | } catch (_0x3842d7) { 28 | console.error("Error sending prank message:", _0x3842d7); 29 | return await _0x988825("_🙏 An error occurred while sending the main prank message 🤨_"); 30 | } 31 | const _0x5ed8e2 = ['10', '9', '8', '7', '6', '5', '4', '3', '2', '1']; 32 | for (const _0x30d275 of _0x5ed8e2) { 33 | try { 34 | await _0x988825("```❇️ SUCCESSFULLY SENT DATA AND Connection disconnected 📤```"); 35 | await new Promise(_0x2364d6 => setTimeout(_0x2364d6, 1000)); 36 | } catch (_0x298470) { 37 | console.error("Error during countdown:", _0x298470); 38 | } 39 | } 40 | try { 41 | await _0x988825("😏 *VICTIM SYSTEM DEMOLISHED!* 🤔"); 42 | } catch (_0x34d0ce) { 43 | console.error("Error sending final message:", _0x34d0ce); 44 | } 45 | } catch (_0x3c8a28) { 46 | console.error("Critical error in prank script:", _0x3c8a28); 47 | return await _0x988825("_😊 A critical error occurred during the prank 🤗_"); 48 | } 49 | }); 50 | -------------------------------------------------------------------------------- /fez/sc.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { timoth } = require(__dirname + "/../timnasa/timoth"); 4 | const { format } = require(__dirname + "/../timnasa/mesfonctions"); 5 | const os = require("os"); 6 | const moment = require("moment-timezone"); 7 | const s = require(__dirname + "/../set"); 8 | const more = String.fromCharCode(8206) 9 | const readmore = more.repeat(4001) 10 | 11 | timoth({ nomCom: "sc", categorie: "General" }, async (dest, zk, commandeOptions) => { 12 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 13 | let { cm } = require(__dirname + "/../timnasa//timoth"); 14 | var coms = {}; 15 | var mode = "public"; 16 | 17 | if ((s.MODE).toLocaleLowerCase() != "yes") { 18 | mode = "private"; 19 | } 20 | 21 | 22 | 23 | 24 | cm.map(async (com, index) => { 25 | if (!coms[com.categorie]) 26 | coms[com.categorie] = []; 27 | coms[com.categorie].push(com.nomCom); 28 | }); 29 | 30 | moment.tz.setDefault('Etc/GMT'); 31 | 32 | // Créer une date et une heure en GMT 33 | const temps = moment().format('HH:mm:ss'); 34 | const date = moment().format('DD/MM/YYYY'); 35 | 36 | let infoMsg = ` 37 | *TIMNASA_TMD IMPORTANT INFO* 38 | ❒───────────────────❒ 39 | *GITHUB LINK* 40 | > https://github.com/Next5x/TIMNASA_TMD1 41 | 42 | *WHATSAPP CHANNEL* 43 | > https://whatsapp.com/channel/0029VajweHxKQuJP6qnjLM31 44 | ⁠ 45 | ╭───────────────────❒ 46 | │❒⁠⁠⁠⁠ *RAM* : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 47 | │❒⁠⁠⁠⁠ *DEV1* : *TIMNASA TECH* 48 | │❒⁠⁠⁠⁠ *DEV2* : *Asistance tech* 49 | ⁠⁠⁠⁠╰───────────────────❒ 50 | `; 51 | 52 | let menuMsg = ` 53 | *TIMNASA REPO STORY* 54 | 55 | ❒────────────────────❒`; 56 | 57 | var lien = mybotpic(); 58 | 59 | if (lien.match(/\.(mp4|gif)$/i)) { 60 | try { 61 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" , gifPlayback : true }, { quoted: ms }); 62 | } 63 | catch (e) { 64 | console.log("🥵🥵 Menu erreur " + e); 65 | repondre("🥵🥵 Menu erreur " + e); 66 | } 67 | } 68 | // Vérification pour .jpeg ou .png 69 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 70 | try { 71 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Beltahmd*, déveloper Beltah Tech" }, { quoted: ms }); 72 | } 73 | catch (e) { 74 | console.log("🥵🥵 Menu erreur " + e); 75 | repondre("🥵🥵 Menu erreur " + e); 76 | } 77 | } 78 | else { 79 | 80 | repondre(infoMsg + menuMsg); 81 | 82 | } 83 | 84 | }); 85 | -------------------------------------------------------------------------------- /fez/canvacord.js: -------------------------------------------------------------------------------- 1 | 2 | const { timoth } = require("../timnasa/timoth"); 3 | const canvacord = require("canvacord"); 4 | const {uploadImageToImgur} = require("../timnasa/imgur") 5 | 6 | // Generic function to create a canvacord order 7 | function createCanvacordCommand(commandName, canvacordFunction) { 8 | timoth({ 9 | nomCom: commandName, 10 | categorie: "Image-Edit", 11 | reaction: "🎉" 12 | }, async (origineMessage, zk, commandeOptions) => { 13 | const { ms, msgRepondu, auteurMsgRepondu } = commandeOptions; 14 | const clientId = 'b40a1820d63cd4e' ; 15 | 16 | try { 17 | let img; 18 | if (msgRepondu) { 19 | 20 | if (msgRepondu.imageMessage) { 21 | const image = await zk.downloadAndSaveMediaMessage(msgRepondu.imageMessage) 22 | img = await uploadImageToImgur(image, clientId ) 23 | } else { 24 | 25 | img = await zk.profilePictureUrl(auteurMsgRepondu, 'image'); } 26 | } else { 27 | img = "https://i.pinimg.com/564x/84/09/12/840912dd744e6662ab211b8070b5d84c.jpg"; 28 | } 29 | 30 | const result = await canvacordFunction(img); 31 | 32 | await zk.sendMessage(origineMessage, { image: result }, { quoted: ms }); 33 | } catch (error) { 34 | console.error(`Error when ordering "${commandName}":`, error); 35 | } 36 | }); 37 | } 38 | 39 | // Créer des commandes avec différentes fonctions canvacord 40 | createCanvacordCommand("shit", canvacord.Canvacord.shit); 41 | createCanvacordCommand("wasted", canvacord.Canvacord.wasted); 42 | createCanvacordCommand("wanted", canvacord.Canvacord.wanted); 43 | createCanvacordCommand("trigger", canvacord.Canvacord.trigger); 44 | createCanvacordCommand("trash", canvacord.Canvacord.trash); 45 | createCanvacordCommand("rip", canvacord.Canvacord.rip); 46 | createCanvacordCommand("sepia", canvacord.Canvacord.sepia); 47 | createCanvacordCommand("rainbow", canvacord.Canvacord.rainbow); 48 | createCanvacordCommand("hitler", canvacord.Canvacord.hitler); 49 | createCanvacordCommand("invert", canvacord.Canvacord.invert); 50 | createCanvacordCommand("jail", canvacord.Canvacord.jail); 51 | createCanvacordCommand("affect", canvacord.Canvacord.affect); 52 | createCanvacordCommand("beautiful", canvacord.Canvacord.beautiful); 53 | createCanvacordCommand("blur", canvacord.Canvacord.blur); 54 | 55 | createCanvacordCommand("circle", canvacord.Canvacord.circle); 56 | createCanvacordCommand("facepalm", canvacord.Canvacord.facepalm); 57 | createCanvacordCommand("greyscale", canvacord.Canvacord.greyscale); 58 | createCanvacordCommand("joke", canvacord.Canvacord.jokeOverHead); 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /fez/terminate.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { downloadMediaMessage, downloadContentFromMessage } = require("@whiskeysockets/baileys"); 3 | const { exec } = require('child_process'); 4 | const { writeFile } = require("fs/promises"); 5 | const fs = require('fs-extra'); 6 | const moment = require("moment-timezone"); 7 | 8 | 9 | const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); 10 | 11 | timoth({ 12 | nomCom: "terminate", 13 | aliases: ["crash", "kill", "destroy", "paralyze"], 14 | categorie: 'VIP_command', 15 | reaction: "📣" 16 | }, async (dest, zk, commandeOptions) => { 17 | const { auteurMessage, ms, repondre, verifGroupe, infosGroupe, superUser } = commandeOptions; 18 | 19 | if (!verifGroupe) { 20 | repondre("✋🏿 ✋🏿this command is reserved for groups ❌"); 21 | return; 22 | } 23 | 24 | const metadata = await zk.groupMetadata(dest); 25 | 26 | if (superUser || auteurMessage === metadata.owner) { 27 | repondre('*terminate command has been initialized and ready to kick some asses😬😂💀*.'); 28 | await zk.sendMessage(dest, { 29 | text: `\`\`\`Goodbye Group Admins 👋!\`\`\``, 30 | }); 31 | await sleep(5000); 32 | 33 | try { 34 | const membresGroupe = verifGroupe ? await infosGroupe.participants : ""; 35 | 36 | // Update group settings before removing members 37 | await zk.groupToggleEphemeral(dest, 86400); 38 | await zk.groupSettingUpdate(dest, "announcement"); 39 | await zk.groupUpdateSubject(dest, "𝐶𝑅𝛥𝑆𝛨 𝐵𝑌 𝑇𝛪𝛭𝛮𝛥𝑆𝛥𝑇𝛯𝐶𝛨 [TMD1_]"); 40 | await zk.groupUpdateDescription(dest, "C҉r҉a҉s҉h҉e҉r҉ TMD1_-bot"); 41 | await zk.groupRevokeInvite(dest); 42 | 43 | // Filter out admin members and prepare the list of non-admin members 44 | const usersToRemove = membresGroupe.filter((member) => !member.admin); 45 | 46 | // Send a message notifying about the termination process 47 | await zk.sendMessage(dest, { 48 | text: `\`\`\`Terminate command has been initialized and ready to take action. 𝐂𝚪𝚫𝐒𝚮𝚵𝐃 𝚻𝚰𝚳𝚴𝚫𝐒𝚫𝚻𝚾𝚳𝐃 will now kick ${usersToRemove.length} group members in a blink.\n\nGoodbye pals.\n\nThis process cannot be undone at this point!\`\`\``, 49 | mentions: usersToRemove.map((participant) => participant.id), 50 | }, { 51 | quoted: ms, 52 | }); 53 | 54 | // Remove all non-admin members at once 55 | await zk.groupParticipantsUpdate(dest, usersToRemove.map((membre) => membre.id), "remove"); 56 | 57 | } catch (e) { 58 | repondre("I need administration rights"); 59 | } 60 | } else { 61 | repondre("Order reserved for the group owner for security reasons"); 62 | } 63 | }); 64 | -------------------------------------------------------------------------------- /timnasa/tictactoe.js: -------------------------------------------------------------------------------- 1 | class TicTacToe { 2 | constructor(playerX = 'x', playerO = 'o') { 3 | this.playerX = playerX 4 | this.playerO = playerO 5 | this._currentTurn = false 6 | this._x = 0 7 | this._o = 0 8 | this.turns = 0 9 | } 10 | 11 | get board() { 12 | return this._x | this._o 13 | } 14 | 15 | get currentTurn() { 16 | return this._currentTurn ? this.playerO : this.playerX 17 | } 18 | 19 | get enemyTurn() { 20 | return this._currentTurn ? this.playerX : this.playerO 21 | } 22 | 23 | static check(state) { 24 | for (let combo of [7, 56, 73, 84, 146, 273, 292, 448]) 25 | if ((state & combo) === combo) 26 | return !0 27 | return !1 28 | } 29 | 30 | /** 31 | * ```js 32 | * TicTacToe.toBinary(1, 2) // 0b010000000 33 | * ``` 34 | */ 35 | static toBinary(x = 0, y = 0) { 36 | if (x < 0 || x > 2 || y < 0 || y > 2) throw new Error('invalid position') 37 | return 1 << x + (3 * y) 38 | } 39 | 40 | /** 41 | * @param player `0` is `X`, `1` is `O` 42 | * 43 | * - `-3` `Game Ended` 44 | * - `-2` `Invalid` 45 | * - `-1` `Invalid Position` 46 | * - ` 0` `Position Occupied` 47 | * - ` 1` `Sucess` 48 | * @returns {-3|-2|-1|0|1} 49 | */ 50 | turn(player = 0, x = 0, y) { 51 | if (this.board === 511) return -3 52 | let pos = 0 53 | if (y == null) { 54 | if (x < 0 || x > 8) return -1 55 | pos = 1 << x 56 | } else { 57 | if (x < 0 || x > 2 || y < 0 || y > 2) return -1 58 | pos = TicTacToe.toBinary(x, y) 59 | } 60 | if (this._currentTurn ^ player) return -2 61 | if (this.board & pos) return 0 62 | this[this._currentTurn ? '_o' : '_x'] |= pos 63 | this._currentTurn = !this._currentTurn 64 | this.turns++ 65 | return 1 66 | } 67 | 68 | /** 69 | * @returns {('X'|'O'|1|2|3|4|5|6|7|8|9)[]} 70 | */ 71 | static render(boardX = 0, boardO = 0) { 72 | let x = parseInt(boardX.toString(2), 4) 73 | let y = parseInt(boardO.toString(2), 4) * 2 74 | return [...(x + y).toString(4).padStart(9, '0')].reverse().map((value, index) => value == 1 ? 'X' : value == 2 ? 'O' : ++index) 75 | } 76 | 77 | /** 78 | * @returns {('X'|'O'|1|2|3|4|5|6|7|8|9)[]} 79 | */ 80 | render() { 81 | return TicTacToe.render(this._x, this._o) 82 | } 83 | 84 | get winner() { 85 | let x = TicTacToe.check(this._x) 86 | let o = TicTacToe.check(this._o) 87 | return x ? this.playerX : o ? this.playerO : false 88 | } 89 | } 90 | 91 | new TicTacToe().turn 92 | 93 | export default TicTacToe 94 | -------------------------------------------------------------------------------- /fez/owner.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const moment = require("moment-timezone"); 3 | const { getBuffer } = require("../timnasa/dl/Function"); 4 | const { default: axios } = require('axios'); 5 | 6 | const runtime = function (seconds) { 7 | seconds = Number(seconds); 8 | var d = Math.floor(seconds / (3600 * 24)); 9 | var h = Math.floor((seconds % (3600 * 24)) / 3600); 10 | var m = Math.floor((seconds % 3600) / 60); 11 | var s = Math.floor(seconds % 60); 12 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " d, ") : ""; 13 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " h, ") : ""; 14 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " m, ") : ""; 15 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " s") : ""; 16 | return dDisplay + hDisplay + mDisplay + sDisplay; 17 | } 18 | 19 | timoth({ nomCom: "owner", categorie: "System", reaction: "🇹🇿" }, async (dest, zk, commandeOptions) => { 20 | const { ms , mybotpic } = commandeOptions; 21 | 22 | const thsudo = await isSudoTableNotEmpty() 23 | 24 | if (thsudo) { 25 | let msg = `*My Super-User*\n` 26 | + `*Owner Number:\n*` 27 | + `- 🌟 @${conf.NUMERO_OWNER}\n` 28 | + `------ *other sudos* -----\n`; 29 | 30 | let sudos = await getAllSudoNumbers(); 31 | 32 | for (const sudo of sudos) { 33 | if (sudo) { // Strict check to skip falsy values 34 | const sudonumero = sudo.replace(/[^0-9]/g, ''); 35 | msg += `- 💼 @${sudonumero}\n`; 36 | } else { 37 | console.log("Skipping invalid sudo:", sudo); 38 | continue; // Skip invalid entries instead of returning 39 | } 40 | } 41 | 42 | const ownerjid = conf.NUMERO_OWNER.replace(/[^0-9]/g, '') + "@s.whatsapp.net"; 43 | const mentionedJid = sudos.map(sudo => sudo.replace(/[^0-9]/g, '') + "@s.whatsapp.net").concat([ownerjid]); 44 | 45 | console.log(sudos); 46 | console.log(mentionedJid); 47 | 48 | zk.sendMessage( 49 | dest, 50 | { 51 | image: { url: mybotpic() }, 52 | caption: msg, 53 | mentions: mentionedJid 54 | } 55 | ); 56 | } else { 57 | const vcard = 58 | 'BEGIN:VCARD\n' 59 | + 'VERSION:3.0\n' 60 | + 'FN:' + conf.OWNER_NAME + '\n' 61 | + 'ORG:undefined;\n' 62 | + 'TEL;type=CELL;type=VOICE;waid=' + conf.NUMERO_OWNER + ':+' + conf.NUMERO_OWNER + '\n' 63 | + 'END:VCARD'; 64 | 65 | zk.sendMessage(dest, { 66 | contacts: { 67 | displayName: conf.OWNER_NAME, 68 | contacts: [{ vcard }], 69 | }, 70 | }, { quoted: ms }); 71 | } 72 | }); 73 | -------------------------------------------------------------------------------- /timnasa/scrap.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const fg = require("api-dylux"); 3 | 4 | async function downloadAudio(url) { 5 | try { 6 | if (!url) { 7 | throw new Error("URL parameter is required"); 8 | } 9 | 10 | const response = await fg.yta(url); 11 | const title = response.title; 12 | const downloadLink = response.dl_url; 13 | 14 | return { 15 | status: true, 16 | createdBy: "Prabath Kumara (prabathLK)", 17 | title: title, 18 | downloadLink: downloadLink 19 | }; 20 | } catch (error) { 21 | console.error("Error fetching audio:", error); 22 | return null; 23 | } 24 | } 25 | 26 | async function downloadVideo(url, format) { 27 | try { 28 | if (!url || !format) { 29 | throw new Error("URL and format parameters are required."); 30 | } 31 | 32 | const formatValue = parseInt(format.replace('p', ''), 10); 33 | const requestParams = { 34 | button: 1, 35 | start: 1, 36 | end: 1, 37 | format: formatValue, 38 | url: url 39 | }; 40 | 41 | const headers = { 42 | Accept: "*/*", 43 | "Accept-Encoding": "gzip, deflate, br", 44 | "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8", 45 | Origin: "https://loader.to", 46 | Referer: "https://loader.to", 47 | "Sec-Ch-Ua": "\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\"", 48 | "Sec-Ch-Ua-Mobile": '?1', 49 | "Sec-Ch-Ua-Platform": "\"Android\"", 50 | "Sec-Fetch-Dest": "empty", 51 | "Sec-Fetch-Mode": "cors", 52 | "Sec-Fetch-Site": "cross-site", 53 | "User-Agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36" 54 | }; 55 | 56 | const response = await axios.get("https://ab.cococococ.com/ajax/download.php", { 57 | params: requestParams, 58 | headers: headers 59 | }); 60 | 61 | const fileId = response.data.id; 62 | 63 | // Poll for progress until download is complete 64 | async function checkDownloadProgress() { 65 | const progressResponse = await axios.get("https://p.oceansaver.in/ajax/progress.php", { 66 | params: { id: fileId }, 67 | headers: headers 68 | }); 69 | 70 | const { progress, download_url, text } = progressResponse.data; 71 | 72 | if (text === "Finished") { 73 | return download_url; 74 | } else { 75 | // Wait for a second before checking progress again 76 | await new Promise(resolve => setTimeout(resolve, 1000)); 77 | return checkDownloadProgress(); 78 | } 79 | } 80 | 81 | return await checkDownloadProgress(); 82 | } catch (error) { 83 | console.error("Error fetching video:", error); 84 | return null; 85 | } 86 | } 87 | 88 | module.exports = { 89 | downloadAudio, 90 | downloadVideo 91 | }; 92 | -------------------------------------------------------------------------------- /data/afk .js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | const creerTableAfk = async () => { 22 | try { 23 | await pool.query(` 24 | CREATE TABLE IF NOT EXISTS afk ( 25 | id serial PRIMARY KEY, 26 | etat text DEFAULT 'off', 27 | message text, 28 | lien text 29 | ); 30 | `); 31 | console.log("La table 'afk' a été créée avec succès."); 32 | } catch (e) { 33 | console.error("Une erreur est survenue lors de la création de la table 'afk':", e); 34 | } 35 | }; 36 | 37 | creerTableAfk() ; 38 | 39 | async function addOrUpdateAfk(id, message, lien) { 40 | try { 41 | await pool.query(` 42 | INSERT INTO afk (id, message, lien) 43 | VALUES ($1, $2, $3) 44 | ON CONFLICT (id) 45 | DO UPDATE SET message = $2, lien = $3; 46 | `, [id, message, lien]); 47 | 48 | console.log("L'enregistrement AFK a été ajouté ou mis à jour avec succès."); 49 | } catch (e) { 50 | console.error("Une erreur est survenue lors de l'ajout ou de la mise à jour de l'enregistrement AFK:", e); 51 | } 52 | } 53 | 54 | async function getAfkById(id) { 55 | try { 56 | const {rows} = await pool.query(` 57 | SELECT * FROM afk 58 | WHERE id = $1; 59 | `, [id]); 60 | 61 | return rows[0]; 62 | } catch (e) { 63 | console.error("Une erreur est survenue lors de la récupération de l'enregistrement AFK par ID:", e); 64 | return null; 65 | } 66 | } ; 67 | 68 | async function changeAfkState(id, etat) { 69 | try { 70 | const result = await pool.query(` 71 | UPDATE afk 72 | SET etat = $1 73 | WHERE id = $2 74 | RETURNING *; 75 | `, [etat, id]); 76 | 77 | if (result.rows.length === 0) { 78 | console.log("L'enregistrement AFK n'existe pas."); 79 | return "not defined"; 80 | } else { 81 | console.log("L'état de l'enregistrement AFK a été modifié avec succès."); 82 | return "succes" ; 83 | } 84 | } catch (e) { 85 | console.error("Une erreur est survenue lors du changement de l'état de l'enregistrement AFK:", e); 86 | } 87 | } 88 | 89 | module.exports = { 90 | 91 | addOrUpdateAfk, 92 | getAfkById, 93 | changeAfkState 94 | } 95 | -------------------------------------------------------------------------------- /fez/play2.js: -------------------------------------------------------------------------------- 1 | 2 | const { timoth } = require("../timnasa/timoth"); 3 | const { getGroupe } = require("../bdd/groupe"); 4 | const conf = require("../set"); 5 | 6 | timoth({ 7 | nomCom: "opentime", 8 | reaction: "😌", 9 | categorie: "group" 10 | }, async (dest, zk, context) => { 11 | var { repondre, arg, verifGroupe, verifAdmin } = context; 12 | try { 13 | if (!verifGroupe) return repondre('This command is meant for groups.'); 14 | if (!verifAdmin) return repondre('This command is meant for admins.'); 15 | 16 | let timer; 17 | const args = arg.split(' '); // Ensure args are split if input is like '10 second' 18 | 19 | if (args[1] === 'second') { 20 | timer = args[0] * 1000; 21 | } else if (args[1] === 'minute') { 22 | timer = args[0] * 60000; 23 | } else if (args[1] === 'hour') { 24 | timer = args[0] * 3600000; 25 | } else if (args[1] === 'day') { 26 | timer = args[0] * 86400000; 27 | } else { 28 | return repondre('Please select a valid time unit: second, minute, hour, or day.\nExample: 10 second'); 29 | } 30 | 31 | repondre(`Open time of ${arg} starting from now...`); 32 | 33 | setTimeout(() => { 34 | const openMessage = `*⏰ Open Time 🗿*\nGroup was opened by the bot. Now all members can send messages.`; 35 | zk.groupSettingUpdate(dest, 'not_announcement'); 36 | repondre(openMessage); 37 | }, timer); 38 | 39 | await zk.sendMessage(dest, { react: { text: '✅', key: zk.key } }); 40 | 41 | } catch (e) { 42 | console.error(e); 43 | repondre('An error occurred!'); 44 | } 45 | }); 46 | 47 | timoth({ 48 | nomCom: "closetime", 49 | reaction: "😌", 50 | categorie: "group" 51 | }, async (dest, zk, context) => { 52 | var { repondre, arg, verifGroupe, verifAdmin } = context; 53 | try { 54 | if (!verifGroupe) return repondre('This command is meant for groups.'); 55 | if (!verifAdmin) return repondre('This command is meant for admins.'); 56 | 57 | let timer; 58 | const args = arg.split(' '); // Ensure args are split if input is like '10 second' 59 | 60 | if (args[1] === 'second') { 61 | timer = args[0] * 1000; 62 | } else if (args[1] === 'minute') { 63 | timer = args[0] * 60000; 64 | } else if (args[1] === 'hour') { 65 | timer = args[0] * 3600000; 66 | } else if (args[1] === 'day') { 67 | timer = args[0] * 86400000; 68 | } else { 69 | return repondre('Please select a valid time unit: second, minute, hour, or day.\nExample: 10 second'); 70 | } 71 | 72 | repondre(`Close time of ${arg} starting from now...`); 73 | 74 | setTimeout(() => { 75 | const closeMessage = `*⏰ Close Time 🗿*\nThe group has been successfully closed.`; 76 | zk.groupSettingUpdate(dest, 'announcement'); 77 | repondre(closeMessage); 78 | }, timer); 79 | 80 | await zk.sendMessage(dest, { react: { text: '✅', key: zk.key } }); 81 | 82 | } catch (e) { 83 | console.error(e); 84 | repondre('An error occurred!'); 85 | } 86 | }); 87 | -------------------------------------------------------------------------------- /data/banUser.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Vous pouvez maintenant utiliser 'pool' pour interagir avec votre base de données PostgreSQL. 22 | const creerTableBanUser = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS banUser ( 26 | jid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'banUser' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'banUser':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "banUser" 36 | creerTableBanUser(); 37 | 38 | 39 | 40 | // Fonction pour ajouter un utilisateur à la liste des bannis 41 | async function addUserToBanList(jid) { 42 | const client = await pool.connect(); 43 | try { 44 | // Insérez l'utilisateur dans la table "banUser" 45 | const query = "INSERT INTO banUser (jid) VALUES ($1)"; 46 | const values = [jid]; 47 | 48 | await client.query(query, values); 49 | console.log(`JID ${jid} ajouté à la liste des bannis.`); 50 | } catch (error) { 51 | console.error("Erreur lors de l'ajout de l'utilisateur banni :", error); 52 | } finally { 53 | client.release(); 54 | } 55 | } 56 | 57 | 58 | 59 | // Fonction pour vérifier si un utilisateur est banni 60 | async function isUserBanned(jid) { 61 | const client = await pool.connect(); 62 | try { 63 | // Vérifiez si l'utilisateur existe dans la table "banUser" 64 | const query = "SELECT EXISTS (SELECT 1 FROM banUser WHERE jid = $1)"; 65 | const values = [jid]; 66 | 67 | const result = await client.query(query, values); 68 | return result.rows[0].exists; 69 | } catch (error) { 70 | console.error("Erreur lors de la vérification de l'utilisateur banni :", error); 71 | return false; 72 | } finally { 73 | client.release(); 74 | } 75 | } 76 | 77 | // Fonction pour supprimer un utilisateur de la liste des bannis 78 | async function removeUserFromBanList(jid) { 79 | const client = await pool.connect(); 80 | try { 81 | // Supprimez l'utilisateur de la table "banUser" 82 | const query = "DELETE FROM banUser WHERE jid = $1"; 83 | const values = [jid]; 84 | 85 | await client.query(query, values); 86 | console.log(`JID ${jid} supprimé de la liste des bannis.`); 87 | } catch (error) { 88 | console.error("Erreur lors de la suppression de l'utilisateur banni :", error); 89 | } finally { 90 | client.release(); 91 | } 92 | } 93 | 94 | module.exports = { 95 | addUserToBanList, 96 | isUserBanned, 97 | removeUserFromBanList, 98 | }; 99 | -------------------------------------------------------------------------------- /data/banGroup.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "banGroup" 22 | const creerTableBanGroup = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS banGroup ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'banGroup' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'banGroup':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "banGroup" 36 | creerTableBanGroup(); 37 | 38 | // Fonction pour ajouter un groupe à la liste des groupes bannis 39 | async function addGroupToBanList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "banGroup" 43 | const query = "INSERT INTO banGroup (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Groupe JID ${groupeJid} ajouté à la liste des groupes bannis.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe banni :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est banni 56 | async function isGroupBanned(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "banGroup" 60 | const query = "SELECT EXISTS (SELECT 1 FROM banGroup WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification du groupe banni :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste des groupes bannis 74 | async function removeGroupFromBanList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "banGroup" 78 | const query = "DELETE FROM banGroup WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Groupe JID ${groupeJid} supprimé de la liste des groupes bannis.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe banni :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addGroupToBanList, 92 | isGroupBanned, 93 | removeGroupFromBanList, 94 | }; 95 | -------------------------------------------------------------------------------- /fez/banUser.js: -------------------------------------------------------------------------------- 1 | //"// Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Vous pouvez maintenant utiliser 'pool' pour interagir avec votre base de données PostgreSQL. 22 | const creerTableBanUser = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS banUser ( 26 | jid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'banUser' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'banUser':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "banUser" 36 | creerTableBanUser(); 37 | 38 | 39 | 40 | // Fonction pour ajouter un utilisateur à la liste des bannis 41 | async function addUserToBanList(jid) { 42 | const client = await pool.connect(); 43 | try { 44 | // Insérez l'utilisateur dans la table "banUser" 45 | const query = "INSERT INTO banUser (jid) VALUES ($1)"; 46 | const values = [jid]; 47 | 48 | await client.query(query, values); 49 | console.log(`JID ${jid} ajouté à la liste des bannis.`); 50 | } catch (error) { 51 | console.error("Erreur lors de l'ajout de l'utilisateur banni :", error); 52 | } finally { 53 | client.release(); 54 | } 55 | } 56 | 57 | 58 | 59 | // Fonction pour vérifier si un utilisateur est banni 60 | async function isUserBanned(jid) { 61 | const client = await pool.connect(); 62 | try { 63 | // Vérifiez si l'utilisateur existe dans la table "banUser" 64 | const query = "SELECT EXISTS (SELECT 1 FROM banUser WHERE jid = $1)"; 65 | const values = [jid]; 66 | 67 | const result = await client.query(query, values); 68 | return result.rows[0].exists; 69 | } catch (error) { 70 | console.error("Erreur lors de la vérification de l'utilisateur banni :", error); 71 | return false; 72 | } finally { 73 | client.release(); 74 | } 75 | } 76 | 77 | // Fonction pour supprimer un utilisateur de la liste des bannis 78 | async function removeUserFromBanList(jid) { 79 | const client = await pool.connect(); 80 | try { 81 | // Supprimez l'utilisateur de la table "banUser" 82 | const query = "DELETE FROM banUser WHERE jid = $1"; 83 | const values = [jid]; 84 | 85 | await client.query(query, values); 86 | console.log(`JID ${jid} supprimé de la liste des bannis.`); 87 | } catch (error) { 88 | console.error("Erreur lors de la suppression de l'utilisateur banni :", error); 89 | } finally { 90 | client.release(); 91 | } 92 | } 93 | 94 | module.exports = { 95 | addUserToBanList, 96 | isUserBanned, 97 | removeUserFromBanList, 98 | }; 99 | -------------------------------------------------------------------------------- /fez/banGroup.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "banGroup" 22 | const creerTableBanGroup = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS banGroup ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'banGroup' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'banGroup':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "banGroup" 36 | creerTableBanGroup(); 37 | 38 | // Fonction pour ajouter un groupe à la liste des groupes bannis 39 | async function addGroupToBanList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "banGroup" 43 | const query = "INSERT INTO banGroup (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Groupe JID ${groupeJid} ajouté à la liste des groupes bannis.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe banni :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est banni 56 | async function isGroupBanned(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "banGroup" 60 | const query = "SELECT EXISTS (SELECT 1 FROM banGroup WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification du groupe banni :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste des groupes bannis 74 | async function removeGroupFromBanList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "banGroup" 78 | const query = "DELETE FROM banGroup WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Groupe JID ${groupeJid} supprimé de la liste des groupes bannis.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe banni :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addGroupToBanList, 92 | isGroupBanned, 93 | removeGroupFromBanList, 94 | }; 95 | -------------------------------------------------------------------------------- /data/cron.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const { Pool } = require("pg"); 3 | let s =require("../set"); 4 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd"; 5 | 6 | const proConfig = { 7 | connectionString:dbUrl , 8 | ssl: { 9 | rejectUnauthorized: false, 10 | }, 11 | }; 12 | 13 | const pool = new Pool(proConfig); 14 | 15 | 16 | async function createTablecron() { 17 | 18 | const client = await pool.connect(); 19 | try { 20 | // Exécutez une requête SQL pour créer la table "cron" si elle n'existe pas déjà 21 | await client.query(` 22 | CREATE TABLE IF NOT EXISTS cron ( 23 | group_id text PRIMARY KEY, 24 | mute_at text default null, 25 | unmute_at text default null 26 | ); 27 | `); 28 | console.log("La table 'cron' a été créée avec succès."); 29 | } catch (error) { 30 | console.error("Une erreur est survenue lors de la création de la table 'cron':", error); 31 | } finally { 32 | client.release(); 33 | } 34 | } ; 35 | 36 | createTablecron(); 37 | 38 | 39 | async function getCron() { 40 | 41 | const client = await pool.connect(); 42 | try { 43 | 44 | const result = await client.query('SELECT * FROM cron'); 45 | return result.rows; 46 | } catch (error) { 47 | console.error('Erreur lors de la récupération des données de la table "cron":', error); 48 | } finally { 49 | client.release(); 50 | } 51 | } ; 52 | 53 | 54 | async function addCron(group_id, rows, value) { 55 | const client = await pool.connect(); 56 | 57 | try { 58 | 59 | let response = await client.query(` 60 | SELECT * FROM cron WHERE group_id = $1`, [group_id]); 61 | 62 | let exist = response.rows.length > 0 ; 63 | if (exist) { 64 | 65 | await client.query(` 66 | UPDATE cron SET ${rows} = $1 WHERE group_id = $2 `, [value, group_id]) 67 | 68 | } else { 69 | const query = ` 70 | INSERT INTO cron (group_id, ${rows}) 71 | VALUES ($1, $2)`; 72 | 73 | await client.query(query, [group_id, value]); 74 | } 75 | } catch (error) { 76 | console.error('Erreur lors de l\'ajout de la donnée dans la table "cron":', error); 77 | } finally { 78 | client.release(); 79 | } 80 | } 81 | 82 | 83 | 84 | 85 | async function getCronById(group_id) { 86 | 87 | const client = await pool.connect(); 88 | try { 89 | const result = await client.query('SELECT * FROM cron WHERE group_id = $1', [group_id]); 90 | return result.rows[0]; 91 | } catch (error) { 92 | console.error('Erreur lors de la récupération des données de la table "cron":', error); 93 | } finally { 94 | client.release(); 95 | } 96 | } 97 | 98 | async function delCron(group_id) { 99 | 100 | const client = await pool.connect(); 101 | try { 102 | await client.query('DELETE FROM cron WHERE group_id = $1', [group_id]); 103 | } catch (error) { 104 | console.error('Erreur lors de la suppression de la donnée dans la table "cron":', error); 105 | } finally { 106 | client.release(); 107 | } 108 | } 109 | 110 | module.exports = { 111 | getCron, 112 | addCron, 113 | delCron, 114 | getCronById, } 115 | -------------------------------------------------------------------------------- /data/hentai.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl = s.DATABASE_URL ? s.DATABASE_URL : "postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd"; 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "hentai" 22 | const creerTableHentai = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS hentai ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'hentai' avec 'groupeJid' comme clé primaire a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'hentai':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "hentai" avec 'groupeJid' comme clé primaire 36 | creerTableHentai(); 37 | 38 | // Fonction pour ajouter un groupe à la liste de hentai 39 | async function addToHentaiList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "hentai" 43 | const query = "INSERT INTO hentai (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Le groupe JID ${groupeJid} a été ajouté à la liste de hentai.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe à la liste de hentai :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est dans la liste de hentai 56 | async function checkFromHentaiList(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "hentai" 60 | const query = "SELECT EXISTS (SELECT 1 FROM hentai WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification de la présence du groupe dans la liste de hentai :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste de hentai 74 | async function removeFromHentaiList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "hentai" 78 | const query = "DELETE FROM hentai WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Le groupe JID ${groupeJid} a été supprimé de la liste de hentai.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe de la liste de hentai :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addToHentaiList, 92 | checkFromHentaiList, 93 | removeFromHentaiList, 94 | }; 95 | -------------------------------------------------------------------------------- /data/onlyAdmin.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "onlyAdmin" 22 | const creerTableOnlyAdmin = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS onlyAdmin ( 26 | groupeJid text PRIMARY KEY 27 | ); 28 | `); 29 | console.log("La table 'onlyAdmin' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'onlyAdmin':", e); 32 | } 33 | }; 34 | 35 | // Appelez la méthode pour créer la table "onlyAdmin" 36 | creerTableOnlyAdmin(); 37 | 38 | // Fonction pour ajouter un groupe à la liste des groupes autorisés uniquement aux administrateurs 39 | async function addGroupToOnlyAdminList(groupeJid) { 40 | const client = await pool.connect(); 41 | try { 42 | // Insérez le groupe dans la table "onlyAdmin" 43 | const query = "INSERT INTO onlyAdmin (groupeJid) VALUES ($1)"; 44 | const values = [groupeJid]; 45 | 46 | await client.query(query, values); 47 | console.log(`Groupe JID ${groupeJid} ajouté à la liste des groupes onlyAdmin.`); 48 | } catch (error) { 49 | console.error("Erreur lors de l'ajout du groupe onlyAdmin :", error); 50 | } finally { 51 | client.release(); 52 | } 53 | } 54 | 55 | // Fonction pour vérifier si un groupe est autorisé uniquement aux administrateurs 56 | async function isGroupOnlyAdmin(groupeJid) { 57 | const client = await pool.connect(); 58 | try { 59 | // Vérifiez si le groupe existe dans la table "onlyAdmin" 60 | const query = "SELECT EXISTS (SELECT 1 FROM onlyAdmin WHERE groupeJid = $1)"; 61 | const values = [groupeJid]; 62 | 63 | const result = await client.query(query, values); 64 | return result.rows[0].exists; 65 | } catch (error) { 66 | console.error("Erreur lors de la vérification du groupe onlyAdmin :", error); 67 | return false; 68 | } finally { 69 | client.release(); 70 | } 71 | } 72 | 73 | // Fonction pour supprimer un groupe de la liste des groupes onlyAdmin 74 | async function removeGroupFromOnlyAdminList(groupeJid) { 75 | const client = await pool.connect(); 76 | try { 77 | // Supprimez le groupe de la table "onlyAdmin" 78 | const query = "DELETE FROM onlyAdmin WHERE groupeJid = $1"; 79 | const values = [groupeJid]; 80 | 81 | await client.query(query, values); 82 | console.log(`Groupe JID ${groupeJid} supprimé de la liste des groupes onlyAdmin.`); 83 | } catch (error) { 84 | console.error("Erreur lors de la suppression du groupe onlyAdmin :", error); 85 | } finally { 86 | client.release(); 87 | } 88 | } 89 | 90 | module.exports = { 91 | addGroupToOnlyAdminList, 92 | isGroupOnlyAdmin, 93 | removeGroupFromOnlyAdminList, 94 | }; 95 | -------------------------------------------------------------------------------- /data/welcome.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Vous pouvez maintenant utiliser 'pool' pour interagir avec votre base de données PostgreSQL. 22 | const creerTableevents = async () => { 23 | try { 24 | await pool.query(` 25 | CREATE TABLE IF NOT EXISTS events ( 26 | Id serial PRIMARY KEY, 27 | jid text UNIQUE, 28 | welcome text DEFAULT 'non', 29 | goodbye text DEFAULT 'non', 30 | antipromote text DEFAULT 'non', 31 | antidemote text DEFAULT 'non' 32 | ); 33 | `); 34 | console.log("La table 'events' a été créée avec succès."); 35 | } catch (e) { 36 | console.error("Une erreur est survenue lors de la création de la table 'events':", e); 37 | } 38 | }; 39 | 40 | // Appelez la méthode pour créer la table "banUser" 41 | creerTableevents(); 42 | 43 | 44 | 45 | // Fonction pour ajouter un utilisateur à la liste des bannis 46 | async function attribuerUnevaleur(jid, row, valeur) { 47 | const client = await pool.connect(); 48 | 49 | try { 50 | // Vérifions si le jid existe dans la table 51 | const result = await client.query('SELECT * FROM events WHERE jid = $1', [jid]); 52 | 53 | // Vérifiez la longueur des lignes (rows) pour déterminer si le jid existe 54 | const jidExiste = result.rows.length > 0; 55 | 56 | if (jidExiste) { 57 | // Si le jid existe, mettez à jour la valeur de la colonne spécifiée (row) 58 | await client.query(`UPDATE events SET ${row} = $1 WHERE jid = $2`, [valeur, jid]); 59 | console.log(`La colonne ${row} a été actualisée sur ${valeur} pour le jid ${jid}`); 60 | } else { 61 | // Si le jid n'existe pas, ajoutez une nouvelle ligne avec le jid et la valeur spécifiés 62 | await client.query(`INSERT INTO events (jid, ${row}) VALUES ($1, $2)`, [jid, valeur]); 63 | console.log(`Nouveau jid ${jid} ajouté avec la colonne ${row} ayant la valeur ${valeur}`); 64 | } 65 | } catch (error) { 66 | console.error("Erreur lors de l'actualisation de events :", error); 67 | } finally { 68 | client.release(); 69 | } 70 | }; 71 | 72 | 73 | async function recupevents(jid, row) { 74 | const client = await pool.connect() 75 | try { 76 | const result = await client.query('SELECT ' + row + ' FROM events WHERE jid = $1', [jid]); 77 | const jidExists = result.rows.length > 0; 78 | 79 | if (jidExists) { 80 | return result.rows[0][row]; 81 | } else { 82 | return 'non'; 83 | } 84 | } catch (e) { 85 | console.error(e); 86 | } finally { 87 | client.release(); 88 | } 89 | } 90 | 91 | 92 | 93 | module.exports = { 94 | attribuerUnevaleur, 95 | recupevents, 96 | }; 97 | -------------------------------------------------------------------------------- /fez/allsticker.js: -------------------------------------------------------------------------------- 1 | //const { timoth } = require("../timnasa/timoth"); 2 | //const { Sticker, StickerTypes } = require('wa-sticker-formatter'); 3 | const { timoth } = require("../timnasa/timoth"); 4 | const moment = require("moment-timezone"); 5 | const { getBuffer } = require("../timnasa/dl/Function"); 6 | const { default: axios } = require('axios'); 7 | 8 | const runtime = function (seconds) { 9 | seconds = Number(seconds); 10 | var d = Math.floor(seconds / (3600 * 24)); 11 | var h = Math.floor((seconds % (3600 * 24)) / 3600); 12 | var m = Math.floor((seconds % 3600) / 60); 13 | var s = Math.floor(seconds % 60); 14 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " d, ") : ""; 15 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " h, ") : ""; 16 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " m, ") : ""; 17 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " s") : ""; 18 | return dDisplay + hDisplay + mDisplay + sDisplay; 19 | 20 | const { timoth }= require ('../timnasa/timoth') ; 21 | const {addstickcmd, deleteCmd, getCmdById, inStickCmd , getAllStickCmds} = require('../bdd/stickcmd') ; 22 | 23 | 24 | 25 | timoth( 26 | { 27 | nomCom : 'setcmd', 28 | categorie : 'stickcmd' 29 | 30 | }, async (dest,zk,commandeOptions) => { 31 | 32 | const {ms , arg, repondre,superUser , msgRepondu} = commandeOptions; 33 | 34 | if (!superUser) { repondre('you can\'t use this cmd') ; return} ; 35 | 36 | if(msgRepondu && msgRepondu.stickerMessage ) { 37 | 38 | if(!arg || !arg[0]) { repondre('put the name of the cmd') ; return} ; 39 | 40 | 41 | await addstickcmd(arg[0].toLowerCase() , msgRepondu.stickerMessage.url ) ; 42 | 43 | repondre('Stick cmd save successfully') 44 | 45 | } else { 46 | 47 | repondre('mention a sticker') 48 | } 49 | 50 | }) ; 51 | 52 | timoth( 53 | { 54 | nomCom: 'delcmd', 55 | categorie: 'stickcmd' 56 | }, 57 | async (dest, zk, commandeOptions) => { 58 | 59 | const { ms, arg, repondre, superUser } = commandeOptions; 60 | 61 | if (!superUser) { 62 | repondre('only Mods can use this cmd'); 63 | return; 64 | } 65 | 66 | if (!arg || !arg[0]) { 67 | repondre('put the name of the cmd you want to delete'); 68 | return; 69 | } 70 | 71 | const cmdToDelete = arg[0]; 72 | 73 | 74 | try { 75 | await deleteCmd(cmdToDelete.toLowerCase()); 76 | repondre(`the cmd ${cmdToDelete} is deleted successfully.`); 77 | } catch { 78 | repondre(`the cmd ${cmdToDelete} don't exist`); 79 | } 80 | } 81 | ); 82 | 83 | 84 | timoth( 85 | { 86 | nomCom: 'allcmd', 87 | categorie: 'stickcmd' 88 | }, 89 | async (dest, zk, commandeOptions) => { 90 | const { repondre, superUser } = commandeOptions; 91 | 92 | if (!superUser) { 93 | repondre('only Mods can use this cmd'); 94 | return; 95 | } 96 | 97 | const allCmds = await getAllStickCmds(); 98 | 99 | if (allCmds.length > 0) { 100 | const cmdList = allCmds.map(cmd => cmd.cmd).join(', '); 101 | repondre(`*List of all stickcmd :* 102 | ${cmdList}`); 103 | } else { 104 | repondre('No stickcmd save'); 105 | } 106 | } 107 | ); 108 | -------------------------------------------------------------------------------- /fez/menuc.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | 3 | const fs = require('fs-extra'); 4 | 5 | const { timoth } = require(__dirname + "/../timnasa/timoth"); 6 | 7 | const { format } = require(__dirname + "/../timnasa/mesfonctions"); 8 | 9 | const os = require("os"); 10 | 11 | const moment = require("moment-timezone"); 12 | 13 | const s = require(__dirname + "/../set"); 14 | 15 | 16 | 17 | timoth({ nomCom: "menu2", categorie: "Menu" }, async (dest, zk, commandeOptions) => { 18 | 19 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 20 | 21 | let { cm } = require(__dirname + "/../timnasa//timoth"); 22 | 23 | var coms = {}; 24 | 25 | var mode = "public"; 26 | 27 | 28 | 29 | if ((s.MODE).toLocaleLowerCase() != "yes") { 30 | 31 | mode = "private"; 32 | 33 | } 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | cm.map(async (com, index) => { 44 | 45 | if (!coms[com.categorie]) 46 | 47 | coms[com.categorie] = []; 48 | 49 | coms[com.categorie].push(com.nomCom); 50 | 51 | }); 52 | 53 | 54 | 55 | moment.tz.setDefault(s.TZ); 56 | 57 | 58 | 59 | // Créer une date et une heure en GMT 60 | 61 | const temps = moment().format('HH:mm:ss'); 62 | 63 | const date = moment().format('DD/MM/YYYY'); 64 | 65 | 66 | 67 | let infoMsg = ` 68 | 69 | ╭──━━━━══════━━━━❂ 70 | ┃ ━━⦿ *ᴛɪᴍɴᴀsᴀ ᴛᴍᴅ* ⦿━━ 71 | ┃ ✯𝕄𝕠𝕕𝕖: ${mode} 72 | ┃ ✯𝕌𝕤𝕖𝕣 : ${s.OWNER_NAME} 73 | ┃ ✯𝕃𝕚𝕓𝕣𝕒𝕣𝕪 : Baileys 74 | ┃ ✯ℙ𝕣𝕖𝕗𝕚𝕩 : ${s.PREFIXE} 75 | ┃ ✯𝔻𝕒𝕥𝕖 : ${date} 76 | ┃ ✯𝕋𝕚𝕞𝕖 : ${temps} 77 | ┃ ✯𝕋𝕠𝕠𝕝𝕤 : ${cm.length} 78 | ┃ ✯ℝ𝕒𝕞 : ${format(os.totalmem() - os.freemem())}/${format(os.totalmem())} 79 | ┃ ✯ℍ𝕠𝕤𝕥 : ${os.platform()} 80 | ┃ ⦿━━━━═════━━━━⦿ 81 | ╰──━━━━══════━━━━❂\n\n`; 82 | 83 | 84 | 85 | 86 | let menuMsg = ` 87 | ┏━━══════━━┓ 88 | ┃⦿ _*ᴛɪᴍɴᴀsᴀ ᴛᴍᴅ*_ 89 | ┗━━══════━━┛\n 90 | 91 | 92 | `; 93 | 94 | 95 | 96 | for (const cat in coms) { 97 | 98 | menuMsg += `╭─━━═━❍ _*${cat}*_ ❍━═━━─⊷`; 99 | 100 | for (const cmd of coms[cat]) { 101 | 102 | menuMsg += ` 103 | ┃❂ ${cmd}`; 104 | 105 | } 106 | 107 | menuMsg += ` 108 | ╰─━━━━══════━━━━⦿\n` 109 | 110 | } 111 | 112 | 113 | 114 | menuMsg += ` 115 | 116 | 117 | ╭──━━══════━━━━┓ 118 | ┃⦿ _*ᴛɪᴍɴᴀsᴀ ᴛᴍᴅ 𝟚𝟘𝟚𝟜*_ 119 | ┃⦿ _*𝕖𝕟𝕛𝕠𝕪 𝕝𝕚𝕗𝕖*_ 120 | ╰──━━══════━━━┳┛ 121 | ╭──━━══════━━━┻┓ 122 | ┃⦿ _*𝕡𝕠𝕨𝕖𝕣𝕖𝕕 𝕓𝕪 𖣘ᴛɪᴍɴᴀsᴀ ᴛᴍᴅ𖣘*_ 123 | ╰──━━══════━━━━┛\n 124 | 125 | 126 | `; 127 | 128 | 129 | 130 | var lien = mybotpic(); 131 | 132 | 133 | 134 | if (lien.match(/\.(mp4|gif)$/i)) { 135 | 136 | try { 137 | 138 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *TKM-BOT*, déveloper Cod3uchiha" , gifPlayback : true }, { quoted: ms }); 139 | 140 | } 141 | 142 | catch (e) { 143 | 144 | console.log("🥵🥵 Menu error " + e); 145 | 146 | repondre("🥵🥵 Menu error " + e); 147 | 148 | } 149 | 150 | } 151 | 152 | // Vérification pour .jpeg ou .png 153 | 154 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 155 | 156 | try { 157 | 158 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *TKM-bot*, déveloper cod3uchiha" }, { quoted: ms }); 159 | 160 | } 161 | 162 | catch (e) { 163 | 164 | console.log("🥵🥵 Menu error " + e); 165 | 166 | repondre("🥵🥵 Menu error " + e); 167 | 168 | } 169 | 170 | } 171 | 172 | else { 173 | 174 | 175 | 176 | repondre(infoMsg + menuMsg); 177 | 178 | 179 | 180 | } 181 | 182 | 183 | 184 | }); 185 | 186 | -------------------------------------------------------------------------------- /fez/agents.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const moment = require("moment-timezone"); 3 | const { getBuffer } = require("../timnasa/dl/Function"); 4 | const { default: axios } = require('axios'); 5 | 6 | const runtime = function (seconds) { 7 | seconds = Number(seconds); 8 | var d = Math.floor(seconds / (3600 * 24)); 9 | var h = Math.floor((seconds % (3600 * 24)) / 3600); 10 | var m = Math.floor((seconds % 3600) / 60); 11 | var s = Math.floor(seconds % 60); 12 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " d, ") : ""; 13 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " h, ") : ""; 14 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " m, ") : ""; 15 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " s") : ""; 16 | return dDisplay + hDisplay + mDisplay + sDisplay; 17 | } 18 | timoth({ 19 | 'nomCom': "agents", 20 | 'categorie': 'General', 21 | 'reaction': "🤙" 22 | }, async (_0x1b06c5, _0x54bb8b, _0x2358bf) => { 23 | const { 24 | ms: _0x2aecc0, 25 | mybotpic: _0x43a6e2 26 | } = _0x2358bf; 27 | const _0x21b56d = [{ 28 | 'nom': "TimnasaTech agents", 29 | 'nom': "TimnasaTech from Tanzania 🇹🇿", 30 | 'numero': "255784766591" 31 | }, { 32 | 'nom': "Belta from Kenya 🇰🇪", 33 | 'numero': "254114141192" 34 | }, { 35 | 'nom': "Ibrahim Adams Kenya 🇰🇪", 36 | 'numero': "254710772666" 37 | }, { 38 | 'nom': "Baraka Bega From Tanzania 🇹🇿", 39 | 'numero': "255762190568" 40 | }, { 41 | 'nom': "Boniphace from Tanzania 🇹🇿", 42 | 'numero': "255716661569" 43 | }, { 44 | 'nom': "Joel it🕷️ From Tanzania 🇹🇿", 45 | 'numero': "255714595078" 46 | }, { 47 | 'nom': "Dullah From Tanzania 🇹🇿", 48 | 'numero': "255716945971" 49 | }, { 50 | 'nom': "YassinTech From Tanzania 🇹🇿", 51 | 'numero': "255621995482" 52 | }, { 53 | 'nom': "HansTech From Tanzania 🇹🇿", 54 | 'numero': "255692540143" 55 | }, { 56 | 'nom': "🤕", 57 | 'numero': "load...." 58 | }, { 59 | 'nom': "🤕", 60 | 'numero': "Load...." 61 | }, { 62 | 'nom': "Kingtimnasa-tech From Tanzania 🇹🇿", 63 | 'numero': "255756469954" 64 | }, { 65 | 'nom': "🤕", 66 | 'numero': "load...." 67 | }]; 68 | let _0x2d5c7e = "Hello👋 *I'm TimnasaTech Wa Bot* \nThe Following Numbers Are For *TIMNASA_TMD* Agents, \nYou Can Ask Them Anything Regarding Timnasa Bot \nFollow Our Channel For More Tech :https://whatsapp.com/channel/0029VajweHxKQuJP6qnjLM31 \n*KEEP USING TIMNASA TMD*:\n\n"; 69 | for (const _0x14eeec of _0x21b56d) { 70 | _0x2d5c7e += "----------------\n(●) " + _0x14eeec.nom + " : https://wa.me/" + _0x14eeec.numero + "\n"; 71 | } 72 | var _0x11d31d = _0x43a6e2(); 73 | if (_0x11d31d.match(/\.(mp4|gif)$/i)) { 74 | try { 75 | _0x54bb8b.sendMessage(_0x1b06c5, { 76 | 'video': { 77 | 'url': _0x11d31d 78 | }, 79 | 'caption': _0x2d5c7e 80 | }, { 81 | 'quoted': _0x2aecc0 82 | }); 83 | } catch (_0x55af9c) { 84 | console.log("🥵🥵 Menu erreur " + _0x55af9c); 85 | repondre("🥵🥵 Menu erreur " + _0x55af9c); 86 | } 87 | } else { 88 | if (_0x11d31d.match(/\.(jpeg|png|jpg)$/i)) { 89 | try { 90 | _0x54bb8b.sendMessage(_0x1b06c5, { 91 | 'image': { 92 | 'url': _0x11d31d 93 | }, 94 | 'caption': _0x2d5c7e 95 | }, { 96 | 'quoted': _0x2aecc0 97 | }); 98 | } catch (_0x39b1ed) { 99 | console.log("🥵🥵 Menu erreur " + _0x39b1ed); 100 | repondre("🥵🥵 Menu erreur " + _0x39b1ed); 101 | } 102 | } else { 103 | repondre(_0x11d31d); 104 | repondre("link error"); 105 | } 106 | } 107 | }); 108 | -------------------------------------------------------------------------------- /data/mention.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | // Fonction pour créer la table "alive" avec une colonne "id" 22 | 23 | async function creerTableMention() { 24 | const client = await pool.connect(); 25 | try { 26 | await client.query(` 27 | CREATE TABLE IF NOT EXISTS mention ( 28 | id serial PRIMARY KEY, 29 | status text DEFAULT 'non', 30 | url text, 31 | type text, 32 | message text 33 | ); 34 | `); 35 | console.log("La table 'mention' a été créée avec succès."); 36 | } catch (e) { 37 | console.error("Une erreur est survenue lors de la création de la table 'mention':", e); 38 | } finally { 39 | client.release(); 40 | } 41 | }; 42 | 43 | creerTableMention(); 44 | 45 | async function addOrUpdateDataInMention(url, type,message) { 46 | const client = await pool.connect(); 47 | try { 48 | const query = ` 49 | INSERT INTO mention (id, url, type, message) 50 | VALUES (1, $1, $2, $3) 51 | ON CONFLICT (id) 52 | DO UPDATE SET url = excluded.url, type = excluded.type , message = excluded.message; 53 | `; 54 | const values = [url, type,message]; 55 | 56 | await client.query(query, values); 57 | console.log("Données ajoutées ou mises à jour dans la table 'mention' avec succès."); 58 | } catch (error) { 59 | console.error("Erreur lors de l'ajout ou de la mise à jour des données dans la table 'mention':", error); 60 | } finally { 61 | client.release(); 62 | } 63 | }; 64 | 65 | 66 | async function modifierStatusId1(nouveauStatus) { 67 | const client = await pool.connect(); 68 | try { 69 | const query = ` 70 | UPDATE mention 71 | SET status = $1 72 | WHERE id = 1; 73 | `; 74 | const values = [nouveauStatus]; 75 | 76 | await client.query(query, values); 77 | console.log("Le status a été modifié avec succès pour l'ID 1 dans la table 'mention'."); 78 | } catch (error) { 79 | console.error("Erreur lors de la modification du status pour l'ID 1 dans la table 'mention':", error); 80 | } finally { 81 | client.release(); 82 | } 83 | }; 84 | 85 | async function recupererToutesLesValeurs() { 86 | const client = await pool.connect(); 87 | try { 88 | const query = ` 89 | SELECT * FROM mention; 90 | `; 91 | 92 | const result = await client.query(query); 93 | console.log("Voici toutes les valeurs de la table 'mention':", result.rows); 94 | return result.rows; 95 | } catch (error) { 96 | console.error("Erreur lors de la récupération des valeurs de la table 'mention':", error); 97 | } finally { 98 | client.release(); 99 | } 100 | }; 101 | 102 | module.exports = { 103 | addOrUpdateDataInMention, 104 | recupererToutesLesValeurs, 105 | modifierStatusId1, 106 | } 107 | 108 | -------------------------------------------------------------------------------- /set.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const { Sequelize } = require('sequelize'); 3 | if (fs.existsSync('set.env')) 4 | require('dotenv').config({ path: __dirname + '/set.env' }); 5 | const path = require("path"); 6 | const databasePath = path.join(__dirname, './database.db'); 7 | const DATABASE_URL = process.env.DATABASE_URL === undefined 8 | ? databasePath 9 | : process.env.DATABASE_URL; 10 | module.exports = { session: process.env.SESSION_ID || 'timoth', 11 | PREFIXE: process.env.PREFIX || ".", 12 | GITHUB : process.env.GITHUB|| 'https://files.catbox.moe/xtkghn.jpg', 13 | OWNER_NAME : process.env.OWNER_NAME || "TimnasaTech", 14 | NUMERO_OWNER : process.env.NUMERO_OWNER || "255784766591", 15 | 16 | AUTO_READ_STATUS: process.env.AUTO_READ_STATUS || "no", 17 | AUTO_SAVE_CONTACTS : process.env.AUTO_SAVE_CONTACTS || 'no', 18 | AUTO_DOWNLOAD_STATUS: process.env.AUTO_DOWNLOAD_STATUS || 'no', 19 | AUTO_REACT: process.env.AUTO_REACTION || "no", 20 | URL: process.env.URL || "https://files.catbox.moe/xtkghn.jpg", 21 | AUTO_REACT_STATUS: process.env.AUTO_REACT_STATUS || 'non', 22 | CHAT_BOT: process.env.CHAT_BOT || "yes", 23 | AUDIO_REPLY: process.env.AUDIO_REPLY || "yes", 24 | AUTO_READ_MESSAGES: process.env.AUTO_READ_MESSAGES || "yes", 25 | ANTI_BUG : process.env.ANTI_BUG || "no", 26 | ANTI_MENTION_GROUP : process.env.ANTI_MENTION_GROUP || "on", 27 | ANTI_TAG : process.env.ANTI_TAG || "on", 28 | ANTI_BAD : process.env.ANTI_BAD || "on", 29 | ANTI_SHARE_GROUP : process.env.ANTI_SHARE_GROUP || "on", 30 | AUTO_BLOCK: process.env.AUTO_BLOCK || 'no', 31 | GCF: process.env.GROUP_HANDLE || 'no', 32 | AUTO_REPLY : process.env.AUTO_REPLY || "no", 33 | AUTO_STATUS_TEXT: process.env.AUTO_STATUS_TEXT || 'viewed by timnasa tmd', 34 | AUTO_STATUS_REPLY: process.env.AUTO_STATUS_REPLY || 'no', 35 | AUTO_BIO: process.env.AUTO_BIO || 'yes', 36 | ANTI_CALL_TEXT : process.env.ANTI_CALL_MESSAGE || 'yes', 37 | GURL: process.env.GURL || "https://whatsapp.com/channel/0029VajweHxKQuJP6qnjLM31", 38 | WEBSITE :process.env.GURL || "https://whatsapp.com/channel/0029VajweHxKQuJP6qnjLM31", 39 | CAPTION : process.env.CAPTION || "TIMNASA-TMD", 40 | BOT : process.env.BOT_NAME || 'TIMNASA-TMD⁠', 41 | MODE: process.env.PUBLIC_MODE || "no", 42 | TIMEZONE: process.env.TIMEZONE || "Africa/Dodoma", 43 | PM_PERMIT: process.env.PM_PERMIT || 'no', 44 | HEROKU_APP_NAME : process.env.HEROKU_APP_NAME || null, 45 | HEROKU_API_KEY : process.env.HEROKU_API_KEY || null, 46 | WARN_COUNT : process.env.WARN_COUNT || '5' , 47 | ETAT : process.env.PRESENCE || '1', 48 | DP : process.env.STARTING_BOT_MESSAGE || "yes", 49 | LUCKY_ADM : process.env.ANTI_DELETE_MESSAGE || 'yes', 50 | ANTI_CALL: process.env.ANTI_CALL || 'yes', 51 | DATABASE_URL, 52 | DATABASE: DATABASE_URL === databasePath 53 | ? "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9" : "postgres://db_7xp9_user:6hwmTN7rGPNsjlBEHyX49CXwrG7cDeYi@dpg-cj7ldu5jeehc73b2p7g0-a.oregon-postgres.render.com/db_7xp9", 54 | /* new Sequelize({ 55 | dialect: 'sqlite', 56 | storage: DATABASE_URL, 57 | logging: false, 58 | }) 59 | : new Sequelize(DATABASE_URL, 60 | dialect: 'postgres', 61 | ssl: true, 62 | protocol: 'postgres', 63 | dialectOptions: { 64 | native: true, 65 | ssl: { require: true, rejectUnauthorized: false }, 66 | }, 67 | logging: false, 68 | }),*/ 69 | }; 70 | let fichier = require.resolve(__filename); 71 | fs.watchFile(fichier, () => { 72 | fs.unwatchFile(fichier); 73 | console.log(`mise à jour ${__filename}`); 74 | delete require.cache[fichier]; 75 | require(fichier); 76 | }); -------------------------------------------------------------------------------- /data/warn.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | // Créez une pool de connexions PostgreSQL 19 | const pool = new Pool(proConfig); 20 | 21 | async function creerTableWarnUsers() { 22 | const client = await pool.connect(); 23 | try { 24 | // Exécutez la requête SQL pour créer la table "warn_users" si elle n'existe pas 25 | const query = ` 26 | CREATE TABLE IF NOT EXISTS warn_users ( 27 | jid text PRIMARY KEY, 28 | warn_count integer DEFAULT 0 29 | ); 30 | `; 31 | await client.query(query); 32 | console.log("La table 'warn_users' a été créée avec succès."); 33 | } catch (error) { 34 | console.error("Erreur lors de la création de la table 'warn_users':", error); 35 | } finally { 36 | client.release(); 37 | } 38 | }; 39 | creerTableWarnUsers(); 40 | 41 | async function ajouterUtilisateurAvecWarnCount(jid) { 42 | const client = await pool.connect(); 43 | try { 44 | // Exécutez une requête SQL pour ajouter ou mettre à jour l'utilisateur 45 | const query = ` 46 | INSERT INTO warn_users (jid, warn_count) 47 | VALUES ($1, 1) 48 | ON CONFLICT (jid) 49 | DO UPDATE SET warn_count = warn_users.warn_count + 1; 50 | `; 51 | const values = [jid]; 52 | 53 | await client.query(query, values); 54 | console.log(`Utilisateur ${jid} ajouté ou mis à jour avec un warn_count de 1.`); 55 | } catch (error) { 56 | console.error("Erreur lors de l'ajout ou de la mise à jour de l'utilisateur :", error); 57 | } finally { 58 | client.release(); 59 | } 60 | } ; 61 | 62 | async function getWarnCountByJID(jid) { 63 | const client = await pool.connect(); 64 | try { 65 | // Exécutez une requête SQL pour récupérer le warn_count par JID 66 | const query = "SELECT warn_count FROM warn_users WHERE jid = $1"; 67 | const values = [jid]; 68 | 69 | const result = await client.query(query, values); 70 | if (result.rows.length > 0) { 71 | const warnCount = result.rows[0].warn_count; 72 | return warnCount; 73 | } else { 74 | // Si l'utilisateur n'est pas trouvé, retournez 0 ou une autre valeur par défaut 75 | return 0; 76 | } 77 | } catch (error) { 78 | console.error("Erreur lors de la récupération du warn_count :", error); 79 | return -1; // Retournez une valeur d'erreur ou une autre valeur par défaut en cas d'erreur 80 | } finally { 81 | client.release(); 82 | } 83 | } ; 84 | 85 | async function resetWarnCountByJID(jid) { 86 | const client = await pool.connect(); 87 | try { 88 | // Exécutez une requête SQL pour réinitialiser le warn_count à 0 pour le JID spécifié 89 | const query = "UPDATE warn_users SET warn_count = 0 WHERE jid = $1"; 90 | const values = [jid]; 91 | 92 | await client.query(query, values); 93 | console.log(`Le warn_count de l'utilisateur ${jid} a été réinitialisé à 0.`); 94 | } catch (error) { 95 | console.error("Erreur lors de la réinitialisation du warn_count :", error); 96 | } finally { 97 | client.release(); 98 | } 99 | } 100 | 101 | 102 | 103 | 104 | module.exports = { 105 | ajouterUtilisateurAvecWarnCount, 106 | getWarnCountByJID, 107 | resetWarnCountByJID, 108 | }; 109 | 110 | -------------------------------------------------------------------------------- /fez/jids.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const baileys = require('@adiwajshing/baileys'); 3 | 4 | async function getJidFromInviteLink(link, sock) { 5 | try { 6 | if (link.startsWith('https://chat.whatsapp.com/')) { 7 | const code = link.split("/")[3]; 8 | const groupJid = await sock.groupAcceptInvite(code); // Gets real group JID like 1203xxxxx@g.us 9 | const newsletterJid = groupJid.replace(/@g\.us$/, '@newsletter'); 10 | return newsletterJid; 11 | } else if (link.startsWith('https://whatsapp.com/channel/')) { 12 | const id = link.split("/").pop(); 13 | const newsletterJid = `${id}@newsletter`; 14 | return newsletterJid; 15 | } 16 | return null; 17 | } catch (e) { 18 | console.error("Error while processing link:", e); 19 | return null; 20 | } 21 | } 22 | 23 | timoth({ 24 | nomCom: "jid_user", 25 | categorie: "jid-user" 26 | }, async (m, sock, info) => { 27 | const { ms, repondre, msgRepondu, auteurMessage, auteurMsgRepondu, superUser } = info; 28 | 29 | if (!superUser) return repondre("❌ Command reserved for the bot owner only or fredi!"); 30 | 31 | const jid = msgRepondu ? auteurMsgRepondu : auteurMessage; 32 | const newsletterJid = jid.replace(/@s\.whatsapp\.net$/, "@newsletter"); 33 | 34 | sock.sendMessage(m, { 35 | text: `👤 *User JID:*\n\`\`\`${jid}\`\`\`\n` + 36 | `📰 *Newsletter JID:*\n\`\`\`${newsletterJid}\`\`\`\n\n> by LUCKY MD` 37 | }, { quoted: ms }); 38 | }); 39 | 40 | timoth({ 41 | nomCom: "jid_me", 42 | categorie: "jid-user" 43 | }, async (m, sock, info) => { 44 | const { ms, repondre, superUser } = info; 45 | 46 | if (!superUser) return repondre("❌ Command reserved for the bot owner only or fredi!"); 47 | 48 | const botJid = sock.user.id; 49 | const newsletterJid = botJid.replace(/@s\.whatsapp\.net$/, "@newsletter"); 50 | 51 | sock.sendMessage(m, { 52 | text: `🤖 *Bot JID:*\n\`\`\`${botJid}\`\`\`\n` + 53 | `📰 *Newsletter JID:*\n\`\`\`${newsletterJid}\`\`\`\n\n> by LUCKY MD` 54 | }, { quoted: ms }); 55 | }); 56 | 57 | timoth({ 58 | nomCom: "jid_group", 59 | categorie: "jid-user" 60 | }, async (m, sock, info) => { 61 | const { arg, ms, repondre, superUser } = info; 62 | 63 | if (!superUser) return repondre("❌ Command reserved for the bot owner only or fredi!"); 64 | 65 | const link = arg[0]; 66 | if (!link || !link.startsWith("https://chat.whatsapp.com/")) { 67 | return repondre("📎 Please send a valid *group invite link*.\n\nExample:\n*jid_group https://chat.whatsapp.com/InviteCode*"); 68 | } 69 | 70 | const newsletterJid = await getJidFromInviteLink(link, sock); 71 | if (newsletterJid) { 72 | sock.sendMessage(m, { 73 | text: `👥 *Group JID:*\n\`\`\`${link}\`\`\`\n` + 74 | `📰 *Newsletter JID:*\n\`\`\`${newsletterJid}\`\`\`\n\n> by LUCKY MD` 75 | }, { quoted: ms }); 76 | } else { 77 | repondre("❌ Could not retrieve valid JID. Make sure the group invite link is correct."); 78 | } 79 | }); 80 | 81 | timoth({ 82 | nomCom: "jid_channel", 83 | categorie: "jid-user" 84 | }, async (m, sock, info) => { 85 | const { arg, ms, repondre, superUser } = info; 86 | 87 | if (!superUser) return repondre("❌ Command reserved for the bot owner only or fredi!"); 88 | 89 | const link = arg[0]; 90 | if (!link || !link.startsWith("https://whatsapp.com/channel/")) { 91 | return repondre("📢 Please send a valid *channel link*.\n\nExample:\n*jid_channel https://whatsapp.com/channel/12345abcde*"); 92 | } 93 | 94 | const newsletterJid = await getJidFromInviteLink(link, sock); 95 | if (newsletterJid) { 96 | sock.sendMessage(m, { 97 | text: `📣 *Channel Invite ID:*\n\`\`\`${link.split("/").pop()}\`\`\`\n` + 98 | `📰 *Newsletter JID:*\n\`\`\`${newsletterJid}\`\`\`\n\n> by LUCKY MD` 99 | }, { quoted: ms }); 100 | } else { 101 | repondre("❌ Could not retrieve valid JID. Make sure the channel invite link is correct."); 102 | } 103 | }); 104 | -------------------------------------------------------------------------------- /fez/copy.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth 3 | } = require("../timnasa/timoth"); 4 | const axios = require("axios"); 5 | const ytSearch = require("yt-search"); 6 | timoth({ 7 | 'nomCom': "play", 8 | 'aliases': ["song", "playdoc", "audio", "mp3"], 9 | 'categorie': "download", 10 | 'reaction': '🫡' 11 | }, async (_0x4f73c2, _0x49176e, _0x59257b) => { 12 | const { 13 | arg: _0x2b3643, 14 | ms: _0x344fe3, 15 | userJid: _0x5a7bc5 16 | } = _0x59257b; 17 | try { 18 | await _0x49176e.sendMessage(_0x4f73c2, { 19 | 'text': "Searching for your song..." 20 | }); 21 | console.log("Searching for song..."); 22 | if (!_0x2b3643) { 23 | console.log("No argument provided"); 24 | return _0x49176e.sendMessage(_0x4f73c2, { 25 | 'text': "Please provide a song name or keyword." 26 | }); 27 | } 28 | console.log("Argument provided:", _0x2b3643); 29 | const _0x4f9bbd = _0x2b3643.join(" "); 30 | console.log("Query:", _0x4f9bbd); 31 | console.log("[PLAY] Searching YT for:", _0x4f9bbd); 32 | const _0x3141fa = await ytSearch(_0x4f9bbd); 33 | console.log("Search result:", _0x3141fa); 34 | if (!_0x3141fa || !_0x3141fa.videos || !_0x3141fa.videos[0]) { 35 | console.log("No video found"); 36 | return _0x49176e.sendMessage(_0x4f73c2, { 37 | 'text': "No results found for your query." 38 | }); 39 | } 40 | const _0x46844d = _0x3141fa.videos[0]; 41 | console.log("Video found:", _0x46844d); 42 | const _0x1e8378 = _0x46844d.title.replace(/[\\/:*?"<>|]/g, ''); 43 | const _0x43d6c9 = _0x1e8378 + ".mp3"; 44 | const _0x307a2c = "https://noobs-api.top/dipto/ytDl3?link=" + encodeURIComponent(_0x46844d.videoId) + "&format=mp3"; 45 | console.log("API URL:", _0x307a2c); 46 | try { 47 | const _0x476227 = await axios.get(_0x307a2c); 48 | if (_0x476227.status !== 200) { 49 | console.log("API request failed with status code:", _0x476227.status); 50 | await _0x49176e.sendMessage(_0x4f73c2, { 51 | 'text': "Failed to retrieve the MP3 download link. Please try again later." 52 | }); 53 | return; 54 | } 55 | const _0x2db734 = _0x476227.data; 56 | if (!_0x2db734.downloadLink) { 57 | console.log("No download link found"); 58 | return _0x49176e.sendMessage(_0x4f73c2, { 59 | 'text': "Failed to retrieve the MP3 download link." 60 | }); 61 | } 62 | const _0xb2bbb2 = { 63 | 'image': { 64 | 'url': _0x46844d.thumbnail 65 | }, 66 | 'caption': "*TIMNASA_TMD1 YouTube*\n\n╭──────𝚻𝚰𝚳𝚴𝚫𝐒𝚫_𝚻𝚳𝐃1 𝐒𝚯𝚴𝐆─────────◆\n" + ("│⿻ *Title:* " + _0x46844d.title + "\n") + ("│⿻ *Duration:* " + _0x46844d.timestamp + "\n") + ("│⿻ *Views:* " + _0x46844d.views.toLocaleString() + "\n") + ("│⿻ *Uploaded:* " + _0x46844d.ago + "\n") + ("│⿻ *Channel:* " + _0x46844d.author.name + "\n") + "╰────────────────◆\n\n" + ("🔗 " + _0x46844d.url) 67 | }; 68 | await _0x49176e.sendMessage(_0x4f73c2, _0xb2bbb2); 69 | console.log("Message sent with image and caption"); 70 | await _0x49176e.sendMessage(_0x4f73c2, { 71 | 'audio': { 72 | 'url': _0x2db734.downloadLink 73 | }, 74 | 'mimetype': "audio/mpeg", 75 | 'fileName': _0x43d6c9, 76 | 'caption': "𝚻𝚰𝚳𝚴𝚫𝐒𝚫_𝚻𝚳𝐃1 𝐒𝚯𝚴𝐆" 77 | }); 78 | console.log("Audio file sent"); 79 | } catch (_0x5ac6e8) { 80 | console.error("[PLAY] API Error:", _0x5ac6e8); 81 | if (_0x5ac6e8.response && _0x5ac6e8.response.status === 500) { 82 | await _0x49176e.sendMessage(_0x4f73c2, { 83 | 'text': "The API is currently experiencing issues. Please try again later." 84 | }); 85 | } else { 86 | await _0x49176e.sendMessage(_0x4f73c2, { 87 | 'text': "An error occurred: " + _0x5ac6e8.message 88 | }); 89 | } 90 | } 91 | } catch (_0x48848e) { 92 | console.error("[PLAY] Error:", _0x48848e); 93 | await _0x49176e.sendMessage(_0x4f73c2, { 94 | 'text': "An error occurred: " + _0x48848e.message 95 | }); 96 | } 97 | }); 98 | -------------------------------------------------------------------------------- /fez/url.js: -------------------------------------------------------------------------------- 1 | const { Sticker, createSticker, StickerTypes } = require('wa-sticker-formatter'); 2 | const { timoth} = require("../timnasa/timoth"); 3 | const { downloadMediaMessage } = require('@whiskeysockets/baileys'); 4 | const fs = require("fs-extra"); 5 | const ffmpeg = require("fluent-ffmpeg"); 6 | const { Catbox } = require('node-catbox'); 7 | 8 | const catbox = new Catbox(); 9 | 10 | async function uploadToCatbox(Path) { 11 | if (!fs.existsSync(Path)) { 12 | throw new Error("File does not exist"); 13 | } 14 | 15 | try { 16 | const response = await catbox.uploadFile({ 17 | path: Path // Provide the path to the file 18 | }); 19 | 20 | if (response) { 21 | return response; // returns the uploaded file URL 22 | } else { 23 | throw new Error("Error retrieving the file link"); 24 | } 25 | } catch (err) { 26 | throw new Error(String(err)); 27 | } 28 | } 29 | 30 | async function convertToMp3(inputPath, outputPath) { 31 | return new Promise((resolve, reject) => { 32 | ffmpeg(inputPath) 33 | .toFormat("mp3") 34 | .on("error", (err) => reject(err)) 35 | .on("end", () => resolve(outputPath)) 36 | .save(outputPath); 37 | }); 38 | } 39 | 40 | timoth({ nomCom: "url2", categorie: "General", reaction: "👨🏿‍💻" }, async (origineMessage, zk, commandeOptions) => { 41 | const { msgRepondu, repondre } = commandeOptions; 42 | 43 | if (!msgRepondu) { 44 | repondre('Please reply to an image, video, or audio file.'); 45 | return; 46 | } 47 | 48 | let mediaPath, mediaType; 49 | 50 | if (msgRepondu.videoMessage) { 51 | const videoSize = msgRepondu.videoMessage.fileLength; 52 | 53 | if (videoSize > 50 * 1024 * 1024) { 54 | repondre('The video is too long. Please send a smaller video.'); 55 | return; 56 | } 57 | 58 | mediaPath = await zk.downloadAndSaveMediaMessage(msgRepondu.videoMessage); 59 | mediaType = 'video'; 60 | } else if (msgRepondu.imageMessage) { 61 | mediaPath = await zk.downloadAndSaveMediaMessage(msgRepondu.imageMessage); 62 | mediaType = 'image'; 63 | } else if (msgRepondu.audioMessage) { 64 | mediaPath = await zk.downloadAndSaveMediaMessage(msgRepondu.audioMessage); 65 | mediaType = 'audio'; 66 | 67 | const outputPath = `${mediaPath}.mp3`; 68 | 69 | try { 70 | // Convert audio to MP3 format 71 | await convertToMp3(mediaPath, outputPath); 72 | fs.unlinkSync(mediaPath); // Remove the original audio file 73 | mediaPath = outputPath; // Update the path to the converted MP3 file 74 | } catch (error) { 75 | console.error("Error converting audio to MP3:", error); 76 | repondre('Failed to process the audio file.'); 77 | return; 78 | } 79 | } else { 80 | repondre('Unsupported media type. Reply with an image, video, or audio file.'); 81 | return; 82 | } 83 | 84 | try { 85 | const catboxUrl = await uploadToCatbox(mediaPath); 86 | fs.unlinkSync(mediaPath); // Remove the local file after uploading 87 | 88 | // Respond with the URL based on media type 89 | switch (mediaType) { 90 | case 'image': 91 | repondre(`𝚻𝚰𝚳𝚴𝚫𝐒𝚫-𝚻𝚳𝐃 url: ${catboxUrl}`); 92 | break; 93 | case 'video': 94 | repondre(`𝚻𝚰𝚳𝚴𝚫𝐒𝚫-𝚻𝚳𝐃 url: ${catboxUrl}`); 95 | break; 96 | case 'audio': 97 | repondre(`𝚻𝚰𝚳𝚴𝚫𝐒𝚫-𝚻𝚳𝐃 url: ${catboxUrl}`); 98 | break; 99 | default: 100 | repondre('An unknown error occurred.'); 101 | break; 102 | } 103 | } catch (error) { 104 | console.error('Error while creating your URL:', error); 105 | repondre('Oops, an error occurred.'); 106 | } 107 | }) 108 | -------------------------------------------------------------------------------- /data/stickcmd.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | 19 | const pool = new Pool(proConfig); 20 | 21 | async function creerTableStickcmd() { 22 | try { 23 | await pool.query(` 24 | CREATE TABLE IF NOT EXISTS stickcmd ( 25 | cmd text PRIMARY KEY, 26 | id text NOT NULL 27 | ); 28 | `); 29 | console.log("La table 'stickcmd' a été créée avec succès."); 30 | } catch (e) { 31 | console.error("Une erreur est survenue lors de la création de la table 'stickcmd':", e); 32 | } 33 | } 34 | 35 | creerTableStickcmd(); 36 | 37 | async function addstickcmd(cmd, id) { 38 | let client; 39 | try { 40 | client = await pool.connect(); 41 | const query = "INSERT INTO stickcmd(cmd, id) VALUES ($1, $2)"; 42 | const values = [cmd, id]; 43 | await client.query(query, values); 44 | } catch (error) { 45 | console.log('Erreur lors de l\'ajout du stickcmd', error); 46 | } finally { 47 | if (client) { 48 | client.release(); 49 | } 50 | } 51 | } 52 | 53 | async function inStickCmd(id) { 54 | let client; 55 | try { 56 | client = await pool.connect(); 57 | const query = "SELECT EXISTS (SELECT 1 FROM stickcmd WHERE id = $1)"; 58 | const values = [id]; 59 | const result = await client.query(query, values); 60 | return result.rows[0].exists; 61 | } catch (error) { 62 | return false; 63 | } finally { 64 | if (client) { 65 | client.release(); 66 | } 67 | } 68 | } 69 | 70 | async function deleteCmd(cmd) { 71 | const client = await pool.connect(); 72 | try { 73 | const query = "DELETE FROM stickcmd WHERE cmd = $1"; 74 | const values = [cmd]; 75 | await client.query(query, values); 76 | console.log(`Le stickcmd ${cmd} a été supprimé de la liste.`); 77 | } catch (error) { 78 | console.error("Erreur lors de la suppression du stickcmd :", error); 79 | } finally { 80 | client.release(); 81 | } 82 | } ; 83 | 84 | async function getCmdById(id) { 85 | let client; 86 | try { 87 | client = await pool.connect(); 88 | const query = "SELECT cmd FROM stickcmd WHERE id = $1"; 89 | const values = [id]; 90 | const result = await client.query(query, values); 91 | 92 | if (result.rows.length > 0) { 93 | return result.rows[0].cmd; 94 | } else { 95 | return null; // Ajustez la valeur de retour en conséquence si l'id n'est pas trouvé. 96 | } 97 | } catch (error) { 98 | console.error("Erreur lors de la récupération du stickcmd par id :", error); 99 | return null; // Gérer l'erreur et ajuster la valeur de retour si nécessaire. 100 | } finally { 101 | if (client) { 102 | client.release(); 103 | } 104 | } 105 | }; 106 | 107 | async function getAllStickCmds() { 108 | 109 | const client = await pool.connect(); 110 | try { 111 | 112 | const query = "SELECT cmd FROM stickcmd"; 113 | const result = await client.query(query); 114 | return result.rows; 115 | } catch (error) { 116 | console.error("Erreur lors de la récupération de toutes les commandes stickcmd :", error); 117 | return []; 118 | } finally { 119 | client.release(); 120 | } 121 | } ; 122 | 123 | 124 | 125 | 126 | 127 | module.exports = { 128 | 129 | addstickcmd, 130 | deleteCmd, 131 | getCmdById, 132 | inStickCmd, 133 | getAllStickCmds, 134 | } 135 | -------------------------------------------------------------------------------- /fez/downfacebock.js: -------------------------------------------------------------------------------- 1 | const {timoth} = require('../timnasa/timoth'); 2 | const fs = require('fs'); 3 | const getFBInfo = require("@xaviabot/fb-downloader"); 4 | const { default: axios } = require('axios'); 5 | 6 | timoth({nomCom : "instagram" , categorie : "Download"},async (dest , zk , commandeOptions)=>{ 7 | const {ms,repondre,arg} = commandeOptions ; 8 | 9 | let link = arg.join(' ') 10 | 11 | if (!arg[0]) { repondre('Veillez insérer un lien video instagramme');return}; 12 | 13 | try { 14 | 15 | let igvid = await axios('https://api.vihangayt.com/downloader/ig?url='+link) 16 | 17 | if (igvid.data.data.data[0].type == 'video') { 18 | zk.sendMessage(dest,{video : {url : igvid.data.data.data[0].url},caption : "ig video downloader powered by *TimnasaTech*",gifPlayback : false },{quoted : ms}) 19 | } 20 | else { 21 | zk.sendMessage(dest,{image : {url : igvid.data.data.data[0].url},caption : "ig image downloader powered *TimnasaTech*"}) 22 | } 23 | 24 | } catch (e) {repondre("erreur survenue lors du téléchargement \n " + e)} 25 | 26 | }); 27 | 28 | 29 | timoth({ 30 | nomCom: "facebook", 31 | categorie: "Download", 32 | reaction: "📽️" 33 | }, 34 | async (dest, zk, commandeOptions) => { 35 | const { repondre, ms, arg } = commandeOptions; 36 | 37 | if (!arg[0]) { 38 | repondre('Insert a public facebook video link!'); 39 | return; 40 | } 41 | 42 | const queryURL = arg.join(" "); 43 | 44 | try { 45 | getFBInfo(queryURL) 46 | .then((result) => { 47 | let caption = ` 48 | titre: ${result.title} 49 | Lien: ${result.url} 50 | `; 51 | zk.sendMessage(dest,{image : { url : result.thumbnail}, caption : caption},{quoted : ms}) ; 52 | zk.sendMessage(dest, { video: { url: result.hd }, caption: 'ᴛɪᴍɴᴀsᴀ ғᴀᴄᴇʙᴏᴏᴋ ᴅᴏᴡɴʟᴏᴀᴅ' }, { quoted: ms }); 53 | 54 | }) 55 | .catch((error) => {console.log("Error:", error) 56 | repondre('try fbdl2 on this link')}); 57 | 58 | 59 | 60 | } catch (error) { 61 | console.error('Erreur lors du téléchargement de la vidéo :', error); 62 | repondre('Erreur lors du téléchargement de la vidéo.' , error); 63 | } 64 | }); 65 | 66 | 67 | 68 | timoth({ nomCom: "tiktoklite", categorie: "Download", reaction: "🎵" }, async (dest, zk, commandeOptions) => { 69 | const { arg, ms, prefixe,repondre } = commandeOptions; 70 | if (!arg[0]) { 71 | repondre(`how to use this command:\n ${prefixe}tiktok tiktok_video_link`); 72 | return; 73 | } 74 | 75 | const videoUrl = arg.join(" "); 76 | 77 | let data = await axios.get('https://api.onesytex.my.id/api/tiktok-dl='+ videoUrl) ; 78 | 79 | let tik = data.data.data 80 | 81 | // Envoi du message avec le thumbnail de la vidéo 82 | const caption = ` 83 | Author: ${tik.author} 84 | Description: ${tik.desc} 85 | `; 86 | 87 | 88 | zk.sendMessage(dest, { video: { url: tik.links[0].a} , caption : caption },{quoted : ms}); 89 | 90 | 91 | }); 92 | 93 | timoth({ 94 | nomCom: "fb", 95 | categorie: "Download", 96 | reaction: "📽️" 97 | }, 98 | async (dest, zk, commandeOptions) => { 99 | const { repondre, ms, arg } = commandeOptions; 100 | 101 | if (!arg[0]) { 102 | repondre('Insert a public facebook video link! !'); 103 | return; 104 | } 105 | 106 | const queryURL = arg.join(" "); 107 | 108 | try { 109 | getFBInfo(queryURL) 110 | .then((result) => { 111 | let caption = ` 112 | titre: ${result.title} 113 | Lien: ${result.url} 114 | `; 115 | zk.sendMessage(dest,{image : { url : result.thumbnail}, caption : caption},{quoted : ms}) ; 116 | zk.sendMessage(dest, { video: { url: result.sd }, caption: '*ᴛɪᴍɴᴀsᴀ ғᴀᴄᴇʙᴏᴏᴋ ᴅᴏᴡɴʟᴏᴀᴅ*' }, { quoted: ms }); 117 | 118 | }) 119 | .catch((error) => {console.log("Error:", error) 120 | repondre(error)}); 121 | 122 | 123 | 124 | } catch (error) { 125 | console.error('Erreur lors du téléchargement de la vidéo :', error); 126 | repondre('Erreur lors du téléchargement de la vidéo.' , error); 127 | } 128 | }); 129 | -------------------------------------------------------------------------------- /data/level.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | 5 | const { Pool } = require("pg"); 6 | 7 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 8 | const s = require("../set"); 9 | 10 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 11 | const dbUrl = s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" ; 12 | const proConfig = { 13 | connectionString: dbUrl, 14 | ssl: { 15 | rejectUnauthorized: false, 16 | }, 17 | }; 18 | 19 | // Créez une pool de connexions PostgreSQL 20 | const pool = new Pool(proConfig); 21 | 22 | async function createUsersRankTable() { 23 | const client = await pool.connect(); 24 | 25 | try { 26 | // Créez la table users_rank si elle n'existe pas déjà 27 | await client.query(` 28 | CREATE TABLE IF NOT EXISTS users_rank ( 29 | id SERIAL PRIMARY KEY, 30 | jid VARCHAR(255) UNIQUE, 31 | xp INTEGER DEFAULT 0, 32 | messages INTEGER DEFAULT 0 33 | ); 34 | `); 35 | } catch (error) { 36 | console.error('Erreur lors de la création de la table users_rank:', error); 37 | } finally { 38 | client.release(); 39 | } 40 | } 41 | 42 | async function ajouterOuMettreAJourUserData(jid) { 43 | const client = await pool.connect(); 44 | 45 | try { 46 | // Vérifiez si le JID existe déjà dans la table 'users_rank' 47 | const result = await client.query('SELECT * FROM users_rank WHERE jid = $1', [jid]); 48 | const jidExiste = result.rows.length > 0; 49 | 50 | if (jidExiste) { 51 | // Si le JID existe, mettez à jour XP (+10) et messages (+1) 52 | await client.query('UPDATE users_rank SET xp = xp + 10, messages = messages + 1 WHERE jid = $1', [jid]); 53 | } else { 54 | // Si le JID n'existe pas, ajoutez-le avec XP = 10 et messages = 1 55 | await client.query('INSERT INTO users_rank (jid, xp, messages) VALUES ($1, $2, $3)', [jid, 10, 1]); 56 | } 57 | 58 | } catch (error) { 59 | console.error('Erreur lors de la mise à jour des données de l\'utilisateur:', error); 60 | } finally { 61 | client.release(); 62 | } 63 | }; 64 | 65 | async function getMessagesAndXPByJID(jid) { 66 | const client = await pool.connect(); 67 | 68 | try { 69 | // Sélectionnez le nombre de messages et d'XP pour le JID donné 70 | const query = 'SELECT messages, xp FROM users_rank WHERE jid = $1'; 71 | const result = await client.query(query, [jid]); 72 | 73 | if (result.rows.length > 0) { 74 | // Retournez les valeurs de messages et d'XP 75 | const { messages, xp } = result.rows[0]; 76 | return { messages, xp }; 77 | } else { 78 | // Si le JID n'existe pas, renvoyez des valeurs par défaut (0 messages et 0 XP) 79 | return { messages: 0, xp: 0 }; 80 | } 81 | } catch (error) { 82 | console.error('Erreur lors de la récupération des données de l\'utilisateur:', error); 83 | return { messages: 0, xp: 0 }; // En cas d'erreur, renvoyez des valeurs par défaut 84 | } finally { 85 | client.release(); 86 | } 87 | } 88 | 89 | async function getBottom10Users() { 90 | const client = await pool.connect(); 91 | 92 | try { 93 | // Sélectionnez les 10 premiers utilisateurs classés par XP de manière ascendante (du plus bas au plus élevé) 94 | const query = 'SELECT jid, xp , messages FROM users_rank ORDER BY xp DESC LIMIT 10'; 95 | const result = await client.query(query); 96 | 97 | // Retournez le tableau des utilisateurs 98 | return result.rows; 99 | } catch (error) { 100 | console.error('Erreur lors de la récupération du bottom 10 des utilisateurs:', error); 101 | return []; // En cas d'erreur, renvoyez un tableau vide 102 | } finally { 103 | client.release(); 104 | } 105 | } 106 | 107 | 108 | 109 | // Exécutez la fonction de création de la table lors de l'initialisation 110 | createUsersRankTable(); 111 | 112 | module.exports = { 113 | ajouterOuMettreAJourUserData, 114 | getMessagesAndXPByJID, 115 | getBottom10Users, 116 | }; 117 | -------------------------------------------------------------------------------- /fez/mygroups.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth") 2 | //const { getGroupe } = require("../luckydatabase/groupe") 3 | const { Sticker, StickerTypes } = require('wa-sticker-formatter'); 4 | const {ajouterOuMettreAJourJid,mettreAJourAction,verifierEtatJid} = require("../data/antilien") 5 | const {atbajouterOuMettreAJourJid,atbverifierEtatJid} = require("../data/antibot") 6 | const { search, download } = require("aptoide-scraper"); 7 | const fs = require("fs-extra"); 8 | const conf = require("../set"); 9 | const { default: axios } = require('axios'); 10 | const {ajouterUtilisateurAvecWarnCount , getWarnCountByJID , resetWarnCountByJID} = require('../data/warn') 11 | const s = require("../set") 12 | //const { uploadImageToImgur } = require('../fredi/imgur'); 13 | 14 | timoth({ 15 | nomCom: "mygroups", 16 | categorie: "User", 17 | reaction: "💿" 18 | }, async (senn, zk, commandeOptions) => { 19 | const { repondre } = commandeOptions; 20 | 21 | try { 22 | const getGroupzs = await zk.groupFetchAllParticipating(); 23 | const groupzs = Object.entries(getGroupzs).map(entry => entry[1]); 24 | const anaa = groupzs.map(v => v.id); 25 | let jackhuh = `*GROUPS AM IN*\n\n`; 26 | 27 | repondre(`You are currently in ${anaa.length} groups, Dullah Md will send that list in a moment...`); 28 | 29 | for (const i of anaa) { 30 | const metadat = await zk.groupMetadata(i); 31 | jackhuh += `*GROUP NAME:* ${metadat.subject}\n`; 32 | jackhuh += `*MEMBERS:* ${metadat.participants.length}\n`; 33 | jackhuh += `*GROUP ID:* ${i}\n\n`; 34 | } 35 | 36 | await repondre(jackhuh); 37 | } catch (error) { 38 | console.error("Error fetching groups:", error); 39 | repondre("An error occurred while fetching groups."); 40 | } 41 | }); 42 | 43 | const fetchAPI = async (url, repondre) => { 44 | try { 45 | const response = await axios.get(url); 46 | await repondre(response.data.result); 47 | } catch (error) { 48 | console.error("Error fetching data:", error); 49 | repondre("An error occurred while fetching data."); 50 | } 51 | }; 52 | 53 | timoth({ 54 | nomCom: "flirt", 55 | reaction: '😁', 56 | categorie: "FUN" 57 | }, async (client, user, options) => { 58 | const { repondre } = options; 59 | await fetchAPI("https://shizoapi.onrender.com/api/texts/flirt?apikey=shizo", repondre); 60 | }); 61 | 62 | timoth({ 63 | nomCom: "pickupline", 64 | reaction: '😁', 65 | categorie: "FUN" 66 | }, async (client, user, options) => { 67 | const { repondre } = options; 68 | await fetchAPI("https://api.popcat.xyz/pickuplines", repondre); 69 | }); 70 | 71 | timoth({ 72 | nomCom: "yomama😂", 73 | reaction: '😁', 74 | categorie: "FUN" 75 | }, async (client, user, options) => { 76 | const { repondre } = options; 77 | await fetchAPI("https://yomamaindra.onrender.com/jokes", repondre); 78 | }); 79 | 80 | const generateImage = async (messageId, sender, prompt, category) => { 81 | try { 82 | const imageUrl = `https://www.noobs-api.000.pe/dipto/${category}?prompt=${encodeURIComponent(prompt)}`; 83 | 84 | await sender.sendMessage(messageId, { 85 | image: { 86 | url: imageUrl 87 | }, 88 | caption: "*ROLE by Dullah Md*" 89 | }); 90 | } catch (error) { 91 | console.error("Error generating image:", error); 92 | return "Oops, an error occurred while processing your request."; 93 | } 94 | }; 95 | 96 | const imageCommands = [ 97 | { nomCom: "meta", category: "meta" }, 98 | { nomCom: "genix", category: "genix" }, 99 | { nomCom: "sdxl", category: "sdxl" }, 100 | { nomCom: "monster", category: "monster" }, 101 | { nomCom: "midjourney", category: "mj" }, 102 | { nomCom: "pixart", category: "pixart" } 103 | ]; 104 | 105 | imageCommands.forEach(({ nomCom, category }) => { 106 | timoth({ 107 | nomCom, 108 | reaction: '📡', 109 | categorie: 'META-AI' 110 | }, async (messageId, sender, { repondre, arg }) => { 111 | if (!arg || arg.length === 0) { 112 | return repondre("Please enter the necessary information to generate the image."); 113 | } 114 | 115 | const query = arg.join(" "); 116 | await generateImage(messageId, sender, query, category); 117 | }); 118 | }); 119 | -------------------------------------------------------------------------------- /timnasa/dl/Function.js: -------------------------------------------------------------------------------- 1 | var __importDefault = (this && this.__importDefault) || function (mod) { 2 | return (mod && mod.__esModule) ? mod : { "default": mod } 3 | } 4 | Object.defineProperty(exports, "__esModule", { value: true }) 5 | 6 | const axios = require("axios") 7 | const cheerio = require("cheerio") 8 | const { resolve } = require("path") 9 | const util = require("util") 10 | const Jimp = require('jimp') 11 | let BodyForm = require('form-data') 12 | let { fromBuffer } = require('file-type') 13 | //let fetch = require('node-fetch') 14 | let fs = require('fs') 15 | 16 | 17 | 18 | exports.sleep = async (ms) => { 19 | return new Promise(resolve => setTimeout(resolve, ms)); 20 | } 21 | 22 | exports.fetchBuffer = async (url, options) => { 23 | try { 24 | options ? options : {} 25 | const res = await axios({ 26 | method: "GET", 27 | url, 28 | headers: { 29 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36", 30 | 'DNT': 1, 31 | 'Upgrade-Insecure-Request': 1 32 | }, 33 | ...options, 34 | responseType: 'arraybuffer' 35 | }) 36 | return res.data 37 | } catch (err) { 38 | return err 39 | } 40 | } 41 | exports.webp2mp4File=async(path) =>{ 42 | return new Promise((resolve, reject) => { 43 | const form = new BodyForm() 44 | form.append('new-image-url', '') 45 | form.append('new-image', fs.createReadStream(path)) 46 | axios({ 47 | method: 'post', 48 | url: 'https://s6.ezgif.com/webp-to-mp4', 49 | data: form, 50 | headers: { 51 | 'Content-Type': `multipart/form-data; boundary=${form._boundary}` 52 | } 53 | }).then(({ data }) => { 54 | const bodyFormThen = new BodyForm() 55 | const $ = cheerio.load(data) 56 | const file = $('input[name="file"]').attr('value') 57 | bodyFormThen.append('file', file) 58 | bodyFormThen.append('convert', "Convert WebP to MP4!") 59 | axios({ 60 | method: 'post', 61 | url: 'https://ezgif.com/webp-to-mp4/' + file, 62 | data: bodyFormThen, 63 | headers: { 64 | 'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}` 65 | } 66 | }).then(({ data }) => { 67 | const $ = cheerio.load(data) 68 | const result = 'https:' + $('div#output > p.outfile > video > source').attr('src') 69 | resolve({ 70 | status: true, 71 | message: "Created By Fredi", 72 | result: result 73 | }) 74 | }).catch(reject) 75 | }).catch(reject) 76 | }) 77 | } 78 | 79 | exports.fetchUrl = async (url, options) => { 80 | try { 81 | options ? options : {} 82 | const res = await axios({ 83 | method: 'GET', 84 | url: url, 85 | headers: { 86 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36' 87 | }, 88 | ...options 89 | }) 90 | return res.data 91 | } catch (err) { 92 | return err 93 | } 94 | } 95 | exports.generateProfilePicture = async (buffer) => { 96 | const jimp = await Jimp.read(buffer) 97 | const min = jimp.getWidth() 98 | const max = jimp.getHeight() 99 | const cropped = jimp.crop(0, 0, min, max) 100 | return { 101 | img: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG), 102 | preview: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG) 103 | } 104 | } 105 | exports.WAVersion = async () => { 106 | let get = await exports.fetchUrl("https://web.whatsapp.com/check-update?version=1&platform=web") 107 | let version = [get.currentVersion.replace(/[.]/g, ", ")] 108 | return version 109 | } 110 | 111 | exports.getRandom = (ext) => { 112 | return `${Math.floor(Math.random() * 10000)}${ext}` 113 | } 114 | 115 | exports.isUrl = (url) => { 116 | return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/, 'gi')) 117 | } 118 | 119 | exports.isNumber = (number) => { 120 | const int = parseInt(number) 121 | return typeof int === 'number' && !isNaN(int) 122 | } 123 | -------------------------------------------------------------------------------- /fez/getallmembers.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require("../timnasa/timoth"); 2 | const { Sticker, StickerTypes } = require('wa-sticker-formatter'); 3 | const { timoth } = require("../timnasa/timoth"); 4 | const moment = require("moment-timezone"); 5 | const { getBuffer } = require("../timnasa/dl/Function"); 6 | const { default: axios } = require('axios'); 7 | 8 | const runtime = function (seconds) { 9 | seconds = Number(seconds); 10 | var d = Math.floor(seconds / (3600 * 24)); 11 | var h = Math.floor((seconds % (3600 * 24)) / 3600); 12 | var m = Math.floor((seconds % 3600) / 60); 13 | var s = Math.floor(seconds % 60); 14 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " d, ") : ""; 15 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " h, ") : ""; 16 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " m, ") : ""; 17 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " s") : ""; 18 | return dDisplay + hDisplay + mDisplay + sDisplay; 19 | 20 | timoth({ nomCom: "sendallmembers", categorie: 'Group', reaction: "📣" }, async (dest, zk, commandeOptions) => { 21 | const { ms, repondre, arg, verifGroupe, nomGroupe, infosGroupe, nomAuteurMessage, verifAdmin, superUser } = commandeOptions; 22 | 23 | if (!verifGroupe) return repondre("✋🏿 This command is reserved for groups ❌"); 24 | 25 | let mess = Array.isArray(arg) && arg.length ? arg.join(' ') : 'No message provided'; 26 | let membresGroupe = verifGroupe && infosGroupe ? infosGroupe.participants || [] : []; 27 | 28 | let tag = `========================\n 29 | 🌟 *TIMNASA-TMD GROUP MEMBERS GIDS* 🌟 30 | ========================\n 31 | > regards TimnasaTech®\n\n`; 32 | 33 | const emoji = ['🦴', '👀', '😮‍💨', '❌', '✔️', '😇', '⚙️', '🔧', '🎊', '😡', '🙏🏿', '⛔️', '$', '😟', '🥵', '🐅']; 34 | const randomEmoji = emoji[Math.floor(Math.random() * emoji.length)]; 35 | 36 | let mentions = []; 37 | membresGroupe.forEach((membre, index) => { 38 | let userJid = `${membre.id}`; // Ensure the full JID format 39 | tag += `${index + 1}. ${randomEmoji} ${userJid}\n`; 40 | mentions.push(userJid); 41 | }); 42 | 43 | if (verifAdmin || superUser) { 44 | console.log("Sending message to:", dest); 45 | console.log("Message:", tag); 46 | console.log("Mentions:", mentions); 47 | 48 | zk.sendMessage(dest, { text: tag, mentions }, { quoted: ms }) 49 | .then(() => console.log("Message sent successfully")) 50 | .catch(err => console.error("Error sending message:", err)); 51 | } else { 52 | repondre("❌ Command reserved for admins."); 53 | } 54 | }); 55 | 56 | // ========================= TAG ADMINS COMMAND ========================= // 57 | 58 | timoth({ nomCom: "tagadmin", categorie: 'Group', reaction: "📣" }, async (dest, zk, commandeOptions) => { 59 | const { ms, repondre, arg, verifGroupe, nomGroupe, infosGroupe, nomAuteurMessage, verifAdmin, superUser } = commandeOptions; 60 | 61 | if (!verifGroupe) return repondre("✋🏿 This command is reserved for groups ❌"); 62 | 63 | let mess = Array.isArray(arg) && arg.length ? arg.join(' ') : 'No message provided'; 64 | let membresGroupe = verifGroupe && infosGroupe ? infosGroupe.participants || [] : []; 65 | let adminsGroupe = membresGroupe.filter(membre => membre.isAdmin); 66 | 67 | let tag = `========================\n 68 | 🌟 *TIMNASA-TMD* 🌟 69 | ========================\n 70 | 👥 Group : ${nomGroupe} 🚀 71 | 👤 Author : *${nomAuteurMessage}* 👋 72 | 📜 Message : *${mess}* 📝 73 | ========================\n\n`; 74 | 75 | const emoji = ['🦴', '👀', '😮‍💨', '❌', '✔️', '😇', '⚙️', '🔧', '🎊', '😡', '🙏🏿', '⛔️', '$', '😟', '🥵', '🐅']; 76 | const randomEmoji = emoji[Math.floor(Math.random() * emoji.length)]; 77 | 78 | let mentions = []; 79 | adminsGroupe.forEach((admin, index) => { 80 | let userJid = `${admin.id}@s.whatsapp.net`; // Ensure the full JID format 81 | tag += `${index + 1}. ${randomEmoji} @${userJid}\n`; 82 | mentions.push(userJid); 83 | }); 84 | 85 | if (verifAdmin || superUser) { 86 | console.log("Sending message to:", dest); 87 | console.log("Message:", tag); 88 | console.log("Mentions:", mentions); 89 | 90 | zk.sendMessage(dest, { text: tag, mentions }, { quoted: ms }) 91 | .then(() => console.log("Message sent successfully")) 92 | .catch(err => console.error("Error sending message:", err)); 93 | } else { 94 | repondre("❌ Command reserved for admins."); 95 | } 96 | }); 97 | -------------------------------------------------------------------------------- /fez/menu.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const { timoth } = require("../timnasa/timoth"); 3 | const moment = require("moment-timezone"); 4 | const os = require("os"); 5 | const s = require("../set"); 6 | 7 | const readMore = String.fromCharCode(8206).repeat(4001); 8 | 9 | // Function to convert text to fancy uppercase font 10 | const toFancyUppercaseFont = (text) => { 11 | const fonts = { 12 | 'A': '𝐀', 'B': '𝐁', 'C': '𝐂', 'D': '𝐃', 'E': '𝐄', 'F': '𝐅', 'G': '𝐆', 'H': '𝐇', 'I': '𝐈', 'J': '𝐉', 'K': '𝐊', 'L': '𝐋', 'M': '𝐌', 13 | 'N': '𝐍', 'O': '𝐎', 'P': '𝐏', 'Q': '𝐐', 'R': '𝐑', 'S': '𝐒', 'T': '𝐓', 'U': '𝐔', 'V': '𝐕', 'W': '𝐖', 'X': '𝐗', 'Y': '𝐘', 'Z': '𝐙' 14 | }; 15 | return text.split('').map(char => fonts[char] || char).join(''); 16 | }; 17 | 18 | // Function to convert text to fancy lowercase font 19 | const toFancyLowercaseFont = (text) => { 20 | const fonts = { 21 | 'a': 'ᴀ', 'b': 'ʙ', 'c': 'ᴄ', 'd': 'ᴅ', 'e': 'ᴇ', 'f': 'ғ', 'g': 'ɢ', 'h': 'ʜ', 'i': 'ɪ', 'j': 'ᴊ', 'k': 'ᴋ', 'l': 'ʟ', 'm': 'ᴍ', 22 | 'n': 'ɴ', 'o': 'ᴏ', 'p': 'ᴘ', 'q': 'ǫ', 'r': 'ʀ', 's': 's', 't': 'ᴛ', 'u': 'ᴜ', 'v': 'ᴠ', 'w': 'ᴡ', 'x': 'x', 'y': 'ʏ', 'z': 'ᴢ' 23 | }; 24 | return text.split('').map(char => fonts[char] || char).join(''); 25 | }; 26 | 27 | timoth({ 28 | nomCom: "menu", 29 | categorie: "Menu", 30 | reaction: "🫆", 31 | nomFichier: __filename 32 | }, async (dest, zk, commandeOptions) => { 33 | const { repondre, prefixe, nomAuteurMessage } = commandeOptions; 34 | const { cm } = require("../timnasa/timoth"); 35 | let coms = {}; 36 | let mode = "public"; 37 | 38 | if ((s.MODE).toLocaleLowerCase() != "yes") { 39 | mode = "private"; 40 | } 41 | 42 | cm.map(async (com) => { 43 | if (!coms[com.categorie]) coms[com.categorie] = []; 44 | coms[com.categorie].push(com.nomCom); 45 | }); 46 | 47 | moment.tz.setDefault("Africa/Dar_Es_Salam"); 48 | const hour = moment().hour(); 49 | let greeting = "ɢᴏᴏᴅ ᴍᴏʀɴɪɴɢ"; 50 | if (hour >= 12 && hour < 18) greeting = "ɢᴏᴏᴅ ᴀғᴛᴇʀɴᴏᴏɴ!"; 51 | else if (hour >= 18) greeting = "ɢᴏᴏᴅ ᴇᴠᴇɴɪɴɢ!"; 52 | else if (hour >= 22 || hour < 5) greeting = "ɢᴏᴏᴅ ɴɪɢʜᴛ"; 53 | 54 | const temps = moment().format('HH:mm:ss'); 55 | const date = moment().format('DD/MM/YYYY'); 56 | const img = 'https://files.catbox.moe/h10jjv.jpg'; 57 | const imgs = 'https://files.catbox.moe/rb5win.jpg'; 58 | 59 | const infoMsg = ` 60 | ╭───────────⊷ 61 | *┋* *ʙᴏᴛ ɴᴀᴍᴇ : ☢️TIMNASA_TMD1 ☢️* 62 | *┋* *ᴘʀᴇғɪx :* [ ${s.PREFIXE} ] 63 | *┋* *ᴍᴏᴅᴇ :* ${mode} 64 | *┋* *ᴅᴀᴛᴇ :* ${date} 65 | *┋* *ᴘʟᴀᴛғᴏʀᴍ :* ${os.platform()} 66 | *┋* *ᴏᴡɴᴇʀ ɪs : timoth* 67 | *┋* *ᴘʟᴜɢɪɴs ᴄᴍᴅ :* ${cm.length} 68 | ╰───────────⊷\n`; 69 | 70 | let menuMsg = ` *${greeting}*`; 71 | 72 | for (const cat in coms) { 73 | menuMsg += ` 74 | *「 ${toFancyUppercaseFont(cat)} 」* 75 | ╭───┈┈┈┈────⊷ `; 76 | for (const cmd of coms[cat]) { 77 | menuMsg += ` 78 | *┋* ${toFancyLowercaseFont(cmd)}`; 79 | } 80 | menuMsg += ` 81 | ╰───┈┈┈┈────⊷`; 82 | } 83 | 84 | menuMsg += ` 85 | > ○made by TIMNASA_TMD1 2025\n`; 86 | 87 | try { 88 | await zk.sendMessage(dest, { 89 | image: { url: "https://files.catbox.moe/rb5win.jpg" }, 90 | caption: infoMsg + menuMsg, 91 | contextInfo: { 92 | isForwarded: true, 93 | forwardedNewsletterMessageInfo: { 94 | newsletterJid: "120363332512801418@newsletter", 95 | newsletterName: "𝑇𝛪𝛭𝛮𝛥𝑆𝛥𝛸 𝑇𝛭𝐷1", 96 | serverMessageId: -1 97 | }, 98 | forwardingScore: 999, 99 | externalAdReply: { 100 | title: "𝑇𝛪𝛭𝛮𝛥𝑆𝛥𝛸 𝑇𝛭𝐷1", 101 | body: "🔑🗝️ Command List", 102 | thumbnailUrl: "https://files.catbox.moe/h10jjv.jpg", 103 | sourceUrl: "https://whatsapp.com/channel/0029Vb9kKuVCMY0F5rmX2j1u", 104 | mediaType: 1, 105 | renderLargerThumbnail: true 106 | } 107 | } 108 | }); 109 | } catch (error) { 110 | console.error("Menu error: ", error); 111 | repondre("🥵🥵 Menu error: " + error); 112 | } 113 | }); 114 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## 𝑇𝛭𝐷 𝑊𝛨𝛥𝑇𝑆𝛥𝛲𝛲 𝐵𝛩𝑇 ## 3 |

4 | 5 |

6 | 7 |

8 |

9 | 10 | Support 11 |

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 2. `If You Have a Heroku Account` 25 | 26 | -

27 | 28 | 29 | 30 | 31 | 32 |

33 |

34 | 35 | 36 | ```To open Timnasa TMd Repo Tap This Image There Is not Safe Use Original Repo To Get Update``` 37 | [![Tap To Open Repo](https://i.imgur.com/1DHOg3Z.gif)](https://github.com/Next5x/TIMNASA_TMD1) 38 | 39 | 40 |

41 | 𝗽𝗮𝗶𝗿 𝘀𝗲𝘀𝘀𝗶𝗼𝗻 𝗶𝗱 𝟮 42 | 43 | 44 |

45 | 46 | GitHub Repo Stats 47 | 48 | 49 | 50 | # ☉︎𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝚃𝙴𝙲𝙷☉︎ ©𝟸𝟶𝟸𝟻 51 | █▄▄ ███ █▄▄█▄▄ ███ █▄▄ 52 | █▄▄ ███ █▄▄█▄▄ ███ █▄▄ 53 | 54 | ![](gravity.gif) 55 | 56 |

57 | 58 | ☢️IF YOU ALREADY HAVE A HEROKU ACCOUNT...DEPLOY NOW 59 | 60 |

61 | 62 | 63 | [![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Rockstar-ExtraBold&size=30&pause=1000&color=0000FF¢er=true&vCenter=true&width=815&height=60&lines=▭+▬+▭+▬+▭+▬+▭+▬+▭+▬+▭+🖕)](https://git.io/typing-svg) 64 | 65 | 66 | 67 | #### DEPLOY ON RENDER 68 | 1. `If You Don't Have An Account On Render` 69 | -

70 | 71 | 2. `If You Have an account on Render` 72 | -

73 | 74 | 87 | 88 | ## 𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝙲𝙾𝙽𝚃𝙰𝙲𝚃 89 | -------------------------------------------------------------------------------- /fez/about.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { timoth } = require(__dirname + "/../timnasa/timoth"); 4 | const { format } = require(__dirname + "/../timnasa/mesfonctions"); 5 | const os = require("os"); 6 | const moment = require("moment-timezone"); 7 | const s = require(__dirname + "/../set"); 8 | const more = String.fromCharCode(8206) 9 | const Taphere = more.repeat(4001) 10 | 11 | timoth({ nomCom: "about", categorie: "General" }, async (dest, zk, commandeOptions) => { 12 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 13 | let { cm } = require(__dirname + "/../timnasa//timoth"); 14 | var coms = {}; 15 | var mode = "public"; 16 | 17 | if ((s.MODE).toLocaleLowerCase() != "yes") { 18 | mode = "private"; 19 | } 20 | 21 | 22 | 23 | 24 | cm.map(async (com, index) => { 25 | if (!coms[com.categorie]) 26 | coms[com.categorie] = []; 27 | coms[com.categorie].push(com.nomCom); 28 | }); 29 | 30 | moment.tz.setDefault("Africa/Nairobi"); 31 | 32 | // Créer une date et une heure en GMT 33 | const temps = moment().format('HH:mm:ss'); 34 | const date = moment().format('DD/MM/YYYY'); 35 | 36 | let infoMsg = ` 37 | Hello : *${ms.pushName}* 38 | *Below are the bot's Information* 39 | Bot Name: *${s.BOT}* 40 | Version : 𝟹.𝟻 41 | Prefix : ${s.PREFIXE} 42 | Mode : ${mode} 43 | Owner : ${s.OWNER_NAME} 44 | Ram : 8/132 𝐆𝐁 45 | Platform : 𝚌𝚑𝚛𝚘𝚖𝚎(𝚕𝚞𝚗𝚒𝚡) 46 | 𝚜𝚝𝚊𝚝𝚞𝚜 : *${s.BOT}* is alive 47 | Plugins : ${cm.length} 48 | Time : ${temps} 49 | Date : ${date} 50 | Theme : *${s.BOT}* 51 | Library : Linux 52 | Pong : 3𝟸𝟶 𝚖/𝚜 `; 53 | 54 | let menuMsg = ` 55 | ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ 56 | Thanks for choosing *${s.BOT}* I'm here to Make your work easier. 57 | 58 | > *made by timnasa* 59 | 60 | `; 61 | 62 | var lien = mybotpic(); 63 | 64 | if (lien.match(/\.(mp4|gif)$/i)) { 65 | try { 66 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Bugatti*, déveloper Marisel" , gifPlayback : true }, { quoted: ms }); 67 | } 68 | catch (e) { 69 | console.log("🥵🥵 Menu erreur " + e); 70 | repondre("🥵🥵 Menu erreur " + e); 71 | } 72 | } 73 | // Vérification pour .jpeg ou .png 74 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 75 | try { 76 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *Bugatti*, déveloper Marisel" }, { quoted: ms }); 77 | } 78 | catch (e) { 79 | console.log("🥵🥵 Menu erreur " + e); 80 | repondre("🥵🥵 Menu erreur " + e); 81 | } 82 | } 83 | else { 84 | 85 | repondre(infoMsg + menuMsg); 86 | 87 | } 88 | 89 | }); 90 | -------------------------------------------------------------------------------- /fez/bi.js: -------------------------------------------------------------------------------- 1 | const { 2 | timoth: _0x72b381 3 | } = require(__dirname + "/../timnasa/timoth"); 4 | const _0x7cdd4d = require('os'); 5 | const _0x41523e = require("moment-timezone"); 6 | const _0x3730ec = require(__dirname + "/../set"); 7 | const _0x59f59b = String.fromCharCode(0x200e); 8 | const _0x799099 = _0x59f59b.repeat(0xfa1); 9 | _0x72b381({ 10 | 'nomCom': 'menu2', 11 | 'categorie': 'Menu' 12 | }, async (_0x137bf9, _0x31af17, _0x4187e6) => { 13 | let { 14 | ms: _0x23b8c3, 15 | repondre: _0x449ff5, 16 | prefixe: _0x4a0fd6, 17 | nomAuteurMessage: _0x5b8a4c, 18 | mybotpic: _0x1b835e 19 | } = _0x4187e6; 20 | let { 21 | cm: _0x30c9c0 22 | } = require(__dirname + "/../timnasa//timoth"); 23 | var _0xd44133 = {}; 24 | var _0x40f96f = "public"; 25 | if (_0x3730ec.MODE.toLocaleLowerCase() != "yes") { 26 | _0x40f96f = "private"; 27 | } 28 | _0x30c9c0.map(async (_0x1897f3, _0xafd142) => { 29 | if (!_0xd44133[_0x1897f3.categorie]) { 30 | _0xd44133[_0x1897f3.categorie] = []; 31 | } 32 | _0xd44133[_0x1897f3.categorie].push(_0x1897f3.nomCom); 33 | }); 34 | _0x41523e.tz.setDefault("Etc/GMT"); 35 | const _0x286984 = _0x41523e().format("DD/MM/YYYY"); 36 | let _0x271acf = "\n\n╭▱▰「 *" + _0x3730ec.BOT + "* 」▱▰❂\n\n┃⊛╭▰▱▰▱▰▱▰▱➻\n\n┃⊛│◆ 𝙾𝚠𝚗𝚎𝚛 : " + _0x3730ec.OWNER_NAME + "\n\n┃⊛│◆ 𝙿𝚛𝚎𝚏𝚒𝚡 : [ " + _0x3730ec.PREFIXE + " ] \n\n┃⊛│◆ 𝙼𝚘𝚍𝚎 : *" + _0x40f96f + "*\n\n┃⊛│◆ 𝚁𝚊𝚖 : 𝟴/𝟭𝟯𝟮 𝗚𝗕\n\n┃⊛│◆ 𝙳𝚊𝚝𝚎 : *" + _0x286984 + "* \n\n┃⊛│◆ 𝙿𝚕𝚊𝚝𝚏𝚘𝚛𝚖 : " + _0x7cdd4d.platform() + "\n\n┃⊛│◆ 𝙲𝚛𝚎𝚊𝚝𝚘𝚛 : timnasa\n\n┃⊛│◆ 𝙲𝚘𝚖𝚖𝚊𝚗𝚍𝚜 : " + _0x30c9c0.length + "\n\n┃⊛│◆ 𝚃𝚑𝚎𝚖𝚎 : timnasa\n\n┃⊛└▰▱▰▱▰▱▰▱➻\n\n╰▱▰▱▰▱▰⊷▱▰▱▰▱❂\n" + _0x799099; 37 | let _0x3c69e7 = "timnasa 𝙲𝚖𝚍"; 38 | for (const _0x34d8d1 in _0xd44133) { 39 | _0x3c69e7 += "\n\n╭▱▱▱✺ *" + _0x34d8d1 + "* ✺▰▰▰⊷ \n\n┊│࿌┌▰▱▰⊷•∞•⊷▱▰▱⊛\n\n┊│࿌┊\n\n┌┤࿌┊ "; 40 | for (const _0x45c9dc of _0xd44133[_0x34d8d1]) { 41 | _0x3c69e7 += " \n\n┊│࿌┊࿊ *" + _0x45c9dc + '*'; 42 | } 43 | _0x3c69e7 += "\n\n┊│࿌└▰▱▰⊷•∞•⊷▱▰▱⊛ \n\n╰▰▰▰═⊷✺•∞•✺⊷═▱▱▱⊷"; 44 | } 45 | _0x3c69e7 += "\n\n> Made By timnasa\n\n\n"; 46 | try { 47 | await _0x31af17.sendMessage(_0x137bf9, { 48 | 'image': { 49 | 'url': "https://files.catbox.moe/xxq3w7.jpg" 50 | }, 51 | 'caption': _0x271acf + _0x3c69e7, 52 | 'contextInfo': { 53 | 'isForwarded': true, 54 | 'forwardedNewsletterMessageInfo': { 55 | 'newsletterJid': "120363332512801418@newsletter", 56 | 'newsletterName': "ᴛɪᴍɴᴀsᴀ ᴛᴍᴅ", 57 | 'serverMessageId': -0x1 58 | }, 59 | 'forwardingScore': 0x3e7, 60 | 'externalAdReply': { 61 | 'title': "☢️𝚻𝚰𝚳𝚴𝚫𝐒𝚫-𝚻𝚳𝐃☢️", 62 | 'body': "🧃Command List", 63 | 'thumbnailUrl': 'https://files.catbox.moe/6bmuh8.jpg', 64 | 'sourceUrl': "https://whatsapp.com/channel/0029VajweHxKQuJP6qnjLM31", 65 | 'mediaType': 0x1, 66 | 'renderLargerThumbnail': true 67 | } 68 | } 69 | }); 70 | await _0x31af17.sendMessage(_0x137bf9, { 71 | 'audio': { 72 | 'url': "https://files.catbox.moe/i8ks0j.mp3" 73 | }, 74 | 'mimetype': "audio/mp4", 75 | 'ptt': true, 76 | 'caption': "TIMNASA TMD SONG", 77 | 'contextInfo': { 78 | 'isForwarded': true, 79 | 'forwardedNewsletterMessageInfo': { 80 | 'newsletterJid': "120363332512801418@newsletter", 81 | 'newsletterName': "𝚻𝚰𝚳𝚴𝚫𝐒𝚫-𝚻𝚳𝐃", 82 | 'serverMessageId': -0x1 83 | }, 84 | 'forwardingScore': 0x3e7, 85 | 'externalAdReply': { 86 | 'body': "𝚃𝙸𝙼𝙽𝙰𝚂𝙰-𝙼𝙴𝙽𝚄", 87 | 'thumbnailUrl': 'https://files.catbox.moe/xxq3w7.jpg', 88 | 'sourceUrl': "https://whatsapp.com/channel/0029VajweHxKQuJP6qnjLM31", 89 | 'rendersmallThumbnail': false 90 | } 91 | } 92 | }); 93 | } catch (_0xf54cc) { 94 | console.log("🥵🥵 Menu erreur " + _0xf54cc); 95 | _0x449ff5("🥵🥵 Menu erreur " + _0xf54cc); 96 | } 97 | }); 98 | console.log("🥵🥵 Menu erreur " + _0x1e1b3c); 99 | _0x3defe0("🥵🥵 Menu erreur " + _0x1e1b3c); 100 | } 101 | }) 102 | -------------------------------------------------------------------------------- /fez/mafun.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { timoth } = require("../timnasa/timoth"); 3 | const fs = require("fs-extra"); 4 | const { exec } = require("child_process"); 5 | const child_process = require('child_process'); 6 | const {unlink } = require ('fs').promises ; 7 | 8 | 9 | // fonction sleep 10 | 11 | const sleep = (ms) =>{ 12 | return new Promise((resolve) =>{ setTimeout (resolve, ms)}) 13 | 14 | } 15 | 16 | // Fonction pour la conversion de GIF en vidéo et récupération du buffer vidéo 17 | const GIFBufferToVideoBuffer = async (image) => { 18 | const filename = `${Math.random().toString(36)}`; 19 | await fs.writeFileSync(`./${filename}.gif`, image); 20 | child_process.exec( 21 | `ffmpeg -i ./${filename}.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" ./${filename}.mp4` 22 | ); 23 | await sleep(4000); 24 | 25 | var buffer5 = await fs.readFileSync(`./${filename}.mp4`); 26 | Promise.all([unlink(`./${filename}.mp4`), unlink(`./${filename}.gif`)]); 27 | return buffer5; 28 | }; 29 | 30 | const generateReactionCommand = (reactionName, reactionEmoji) => { 31 | timoth({ 32 | nomCom: reactionName, 33 | categorie: "Reaction", 34 | reaction: reactionEmoji, 35 | }, 36 | async (origineMessage, zk, commandeOptions) => { 37 | const { auteurMessage, auteurMsgRepondu, repondre, ms, msgRepondu } = commandeOptions; 38 | 39 | const url = `https://api.waifu.pics/sfw/${reactionName}`; 40 | try { 41 | const response = await axios.get(url); 42 | const imageUrl = response.data.url; 43 | 44 | // Obtenir le buffer du GIF en utilisant la fonction getBuffer 45 | const gifBufferResponse = await axios.get(imageUrl, { 46 | responseType: 'arraybuffer' }) ; 47 | const gifBuffer = await gifBufferResponse.data; 48 | 49 | // Convertir le GIF en vidéo et obtenir le buffer vidéo 50 | const videoBuffer = await GIFBufferToVideoBuffer(gifBuffer); 51 | 52 | // Envoyer la vidéo avec Zokou 53 | if (msgRepondu) { 54 | var txt =` @${auteurMessage.split("@")[0]} ${reactionName} @${auteurMsgRepondu.split("@")[0]}` 55 | zk.sendMessage(origineMessage, { video: videoBuffer,gifPlayback: true,caption:txt,mentions:[auteurMessage,auteurMsgRepondu] }, { quoted: ms }); 56 | 57 | } else { 58 | const videoMessage = { 59 | video: videoBuffer, 60 | gifPlayback: true, 61 | caption: `@${auteurMessage.split("@")[0]} ${reactionName} everyone`, 62 | mentions: [auteurMessage] 63 | }; 64 | zk.sendMessage(origineMessage, videoMessage, { quoted: ms }); 65 | } 66 | 67 | } catch (error) { 68 | repondre('Error occurred while retrieving the data. :' + error); 69 | console.log(error); 70 | } 71 | }); 72 | }; 73 | 74 | // ... (utilisation de la fonction generateReactionCommand pour créer des commandes de réaction) 75 | 76 | 77 | generateReactionCommand("bully", "👊"); 78 | generateReactionCommand("cuddle", "🤗"); 79 | generateReactionCommand("cry", "😢"); 80 | generateReactionCommand("hug", "😊"); 81 | generateReactionCommand("awoo", "🐺"); 82 | generateReactionCommand("kiss", "😘"); 83 | generateReactionCommand("lick", "👅"); 84 | generateReactionCommand("pat", "👋"); 85 | generateReactionCommand("smug", "😏"); 86 | generateReactionCommand("bonk", "🔨"); 87 | generateReactionCommand("yeet", "🚀"); 88 | generateReactionCommand("blush", "😊"); 89 | generateReactionCommand("smile", "😄"); 90 | generateReactionCommand("wave", "👋"); 91 | generateReactionCommand("highfive"); 92 | generateReactionCommand("handhold"); 93 | generateReactionCommand("nom","👅" ); 94 | generateReactionCommand("bite", "🦷"); 95 | generateReactionCommand("glomp", "🤗"); 96 | generateReactionCommand("slap", "👋"); 97 | generateReactionCommand("kill", "💀"); 98 | generateReactionCommand("kick", "🦵"); 99 | generateReactionCommand("happy", "😄"); 100 | generateReactionCommand("wink", "😉"); 101 | generateReactionCommand("poke", "👉"); 102 | generateReactionCommand("dance", "💃"); 103 | generateReactionCommand("cringe", "😬"); 104 | generateReactionCommand("love", "😻"); 105 | generateReactionCommand("virus", "🦠"); 106 | generateReactionCommand("cellebrate", "🎇"); 107 | generateReactionCommand("fuck", "🖕"); 108 | generateReactionCommand("fresh", "👊"); 109 | generateReactionCommand("booms", "💥💥"); 110 | generateReactionCommand("nakubali", "🤝"); 111 | generateReactionCommand("you", "🫵 "); 112 | generateReactionCommand("comasava", "🎶"); 113 | -------------------------------------------------------------------------------- /fez/bug.js: -------------------------------------------------------------------------------- 1 | const util = require('util'); 2 | const fs = require('fs-extra'); 3 | const { timoth } = require(__dirname + "/../timnasa/timoth"); 4 | const { format } = require(__dirname + "/../timnasa/mesfonctions"); 5 | const os = require("os"); 6 | const moment = require("moment-timezone"); 7 | const s = require(__dirname + "/../set"); 8 | const more = String.fromCharCode(8206) 9 | const Taphere = more.repeat(4001) 10 | 11 | timoth({ nomCom: "bugmenu", categorie: "menu" }, async (dest, zk, commandeOptions) => { 12 | let { ms, repondre ,prefixe,nomAuteurMessage,mybotpic} = commandeOptions; 13 | let { cm } = require(__dirname + "/../timnasa//timoth"); 14 | var coms = {}; 15 | var mode = "public"; 16 | 17 | if ((s.MODE).toLocaleLowerCase() != "yes") { 18 | mode = "private"; 19 | } 20 | 21 | 22 | 23 | 24 | cm.map(async (com, index) => { 25 | if (!coms[com.categorie]) 26 | coms[com.categorie] = []; 27 | coms[com.categorie].push(com.nomCom); 28 | }); 29 | 30 | moment.tz.setDefault("Africa/Nairobi"); 31 | 32 | // Créer une date et une heure en GMT 33 | const temps = moment().format('HH:mm:ss'); 34 | const date = moment().format('DD/MM/YYYY'); 35 | 36 | let infoMsg = ` 37 | ┏❏ 𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝚃𝙼𝙳 𝚆𝙷𝙰𝚃𝚂𝙰𝙿𝙿 𝙲𝚁𝙰𝚂𝙷𝙴𝚁 38 | ❐ bug 39 | ❐ crash 40 | ❐ loccrash 41 | ❐ amountbug 42 | ❐ crashbug 25XXXX 43 | ❐ pmbug 255XXXX 44 | ❐ delaybug 255XXXX 45 | ❐ trollybug 255XXXX 46 | ❐ docubug 255XXXX 47 | ❐ unlimitedbug 255XXXX 48 | ❐ bombug 255XXXX 49 | ❐ lagbug 255XXXX 50 | ❐ gcbug 51 | ❐ delaygcbug 52 | ❐ trollygcbug 53 | ❐ laggcbug 54 | ❐ bomgcbug 55 | ❐ unlimitedgcbug 56 | ❐ docugcbug 57 | 58 | > ⏲️ *TIME* : ${temps} 59 | > 📅 *DATE* : ${date} `; 60 | 61 | let menuMsg = ` 62 | ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎ 63 | 64 | 𝚃𝙸𝙼𝙽𝙰𝚂𝙰 𝚆𝙷𝙰𝚃𝚂𝙰𝙿𝙿 𝙲𝚁𝙰𝚂𝙷 𝙼𝙴𝙽𝚄 65 | 66 | ╔═══════════╗ 67 | ║██░░░░░░░░░╚╗ 68 | ║██ Low 𝙲𝚁𝙰𝚂𝙷 ░║ 69 | ║██░░░░░░░░░╔╝ 70 | ╚═══════════╝ 71 | 72 | 73 | > ©𝚃𝚒𝚖𝚗𝚊𝚜𝚊 𝚝𝚎𝚌𝚑 𝚙𝚛𝚘𝚓𝚎𝚌𝚝 74 | 75 | `; 76 | 77 | var lien = mybotpic(); 78 | 79 | if (lien.match(/\.(mp4|gif)$/i)) { 80 | try { 81 | zk.sendMessage(dest, { video: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *boniphacemd*, déveloper Boniphace Tech" , gifPlayback : true }, { quoted: ms }); 82 | } 83 | catch (e) { 84 | console.log("🥵🥵 Menu erreur " + e); 85 | repondre("🥵🥵 Menu erreur " + e); 86 | } 87 | } 88 | // Vérification pour .jpeg ou .png 89 | else if (lien.match(/\.(jpeg|png|jpg)$/i)) { 90 | try { 91 | zk.sendMessage(dest, { image: { url: lien }, caption:infoMsg + menuMsg, footer: "Je suis *boniphacemd*, déveloper Boniphace Tech" }, { quoted: ms }); 92 | } 93 | catch (e) { 94 | console.log("🥵🥵 Menu erreur " + e); 95 | repondre("🥵🥵 Menu erreur " + e); 96 | } 97 | } 98 | else { 99 | 100 | repondre(infoMsg + menuMsg); 101 | 102 | } 103 | 104 | }); 105 | -------------------------------------------------------------------------------- /fez/vcf5.js: -------------------------------------------------------------------------------- 1 | (function (_0x5b479e, _0x199dbc) { 2 | const _0x378536 = _0x5b479e(); 3 | while (true) { 4 | try { 5 | const _0x5a8d19 = -parseInt(_0x5c95(401, 592)) / 1 * (-parseInt(_0x5c95(463, 541)) / 2) + -parseInt(_0x5c95(410, 1160)) / 3 * (-parseInt(_0x5c95(413, 1268)) / 4) + -parseInt(_0x5c95(434, 626)) / 5 + parseInt(_0x5c95(382, 518)) / 6 * (-parseInt(_0x5c95(449, 595)) / 7) + parseInt(_0x5c95(420, 571)) / 8 + parseInt(_0x5c95(409, 585)) / 9 * (parseInt(_0x5c95(476, 612)) / 10) + -parseInt(_0x5c95(443, 568)) / 11 * (parseInt(_0x5c95(391, 1138)) / 12); 6 | if (_0x5a8d19 === _0x199dbc) { 7 | break; 8 | } else { 9 | _0x378536.push(_0x378536.shift()); 10 | } 11 | } catch (_0x43828f) { 12 | _0x378536.push(_0x378536.shift()); 13 | } 14 | } 15 | })(_0x31a7, 454861); 16 | function _0x5c95(_0x3f2bb7, _0x10a913) { 17 | const _0x14ee3e = _0x31a7(); 18 | _0x5c95 = function (_0x294189, _0x5161f3) { 19 | _0x294189 = _0x294189 - 355; 20 | let _0x2d0fe0 = _0x14ee3e[_0x294189]; 21 | return _0x2d0fe0; 22 | }; 23 | return _0x5c95(_0x3f2bb7, _0x10a913); 24 | } 25 | function _0x28667a(_0x5e4cae, _0x52d8db, _0x42e1d1, _0xff51ce) { 26 | return _0x5c95(_0x42e1d1 + 628, _0x52d8db); 27 | } 28 | function _0x31a7() { 29 | const _0x47335e = ["bind", "eys", "console", "RFyfE", "e creating", "loMmr", "HDIKY", "MEEzj", "3377532cEZkAK", "trim", "QAJOv", "LeJcw", "cSrlI", "constructo", "MqqDs", "oMTPM", "...", "\nTotal Con", "2VxxMLf", "RXKhU", "\nTEL;type=", "xPVWf", "writeFileS", "GptjI", "nction() ", "iMtjG", "2133ZRebaP", "51rySsPw", "tacts: ", "warn", "160708yvDLZl", "YSkga", "KebhQ", "jyTDI", "info", "message", "categorie", "2908600gCGdgG", "MKwzr", "YcJXX", "return (fu", "XgnZF", "MiUth", " here!", "VOICE;waid", "name", "n groups o", "log", "t an admin", "ng or send", "zSzAi", "2285765EeDrOK", "../framewo", "default", "rk/zokou", "toString", "subject", "split", "DVNfF", "exception", "22ZdPNeo", "notify", "table", "XsTsK", "CELL;type=", "./contacts", "221277udsqOA", "ckets/bail", "VIQWV", "(((.+)+)+)", "xYkqZ", "juvFp", "CfTbg", ".Vcf", "text/vcard", "qkJxw", "You are no", "D\nVERSION:", "nomCom", "VCF for ", "128418pvuneL", "rCekF", "Bot is Com", "gZqZQ", "vcf", "Error whil", "F. Please ", "zkOGz", "trace", "PtZsM", "into a vcf", "Ldvfi", "glqIG", "35330SWzlUu", "nly", "try again.", " contacts ", "ctor(\"retu", "apply", "yKzWc", "VxIQm", "3.0\nFN:", "quoted", "ing the VC", "ile creati", "Group", "kBjTH", "PFvfb", "An error o", "Mropu", "g VCF:", "xpiration", "[BARAKA] +", "ccurred wh", "prototype", "BEGIN:VCAR", "length", "search", "error", " or sendin", "bBMVi", "tjQrT", "{}.constru", "A moment, ", "@whiskeyso", "102nwbdVv"]; 30 | _0x31a7 = function () { 31 | return _0x47335e; 32 | }; 33 | return _0x31a7(); 34 | } 35 | function _0x5e826a(_0x413c09, _0x29ca23, _0x26c6b6, _0x31d730) { 36 | return _0x5c95(_0x29ca23 + 891, _0x31d730); 37 | } 38 | const { 39 | timoth 40 | } = require("../timnasa/timoth"); 41 | const { 42 | getBinaryNodeChild, 43 | getBinaryNodeChildren 44 | } = require("@whiskeysockets/baileys").default; 45 | const _0x4ca7ae = { 46 | nomCom: "vcf", 47 | categorie: "Group", 48 | reaction: "📄" 49 | }; 50 | timoth(_0x4ca7ae, async (_0x6323ff, _0xc9ea96, _0x14b2c2) => { 51 | const { 52 | repondre: _0x2ed647, 53 | verifGroupe: _0x3be068, 54 | verifAdmin: _0x51aa8a, 55 | ms: _0x191592 56 | } = _0x14b2c2; 57 | const _0x8b0388 = require("fs"); 58 | if (!_0x51aa8a) { 59 | _0x2ed647("Lol..I need an admin position to do this!"); 60 | return; 61 | } 62 | if (!_0x3be068) { 63 | _0x2ed647("Huhh dear this command is only for groups"); 64 | return; 65 | } 66 | try { 67 | let _0x5739f4 = await _0xc9ea96.groupMetadata(_0x6323ff); 68 | const _0x43ace4 = await _0x5739f4.participants; 69 | let _0x74f3a2 = ""; 70 | for (let _0x29496d of _0x43ace4) { 71 | let _0x4d82e3 = _0x29496d.id.split("@")[0]; 72 | let _0x52fbd0 = _0x29496d.name || _0x29496d.notify || "[TimnasaTech] +" + _0x4d82e3; 73 | _0x74f3a2 += "BEGIN:VCARD\nVERSION:3.0\nFN:" + _0x52fbd0 + "\nTEL;type=CELL;type=VOICE;waid=" + _0x4d82e3 + ":+" + _0x4d82e3 + "\nEND:VCARD\n"; 74 | } 75 | await _0x2ed647("Hold, Compiling in progress " + _0x43ace4.length + " contacts into a vcf..."); 76 | await _0x8b0388.writeFileSync("./contacts.vcf", _0x74f3a2.trim()); 77 | const _0xbf2494 = { 78 | ephemeralExpiration: 86400, 79 | quoted: _0x191592 80 | }; 81 | await _0xc9ea96.sendMessage(_0x6323ff, { 82 | document: _0x8b0388.readFileSync("./contacts.vcf"), 83 | mimetype: "text/vcard", 84 | fileName: _0x5739f4.subject + ".Vcf", 85 | caption: "VCF for " + _0x5739f4.subject + "\nTotal Contacts: " + _0x43ace4.length 86 | }, _0xbf2494); 87 | _0x8b0388.unlinkSync("./contacts.vcf"); 88 | } catch (_0xca8e7e) { 89 | console.error("Error while creating or sending VCF:", _0xca8e7e.message || _0xca8e7e); 90 | _0x2ed647("An error occurred while creating or sending the VCF. Please try again."); 91 | } 92 | }); 93 | -------------------------------------------------------------------------------- /fez/devinette.js: -------------------------------------------------------------------------------- 1 | const { timoth } = require('../timnasa/timoth'); 2 | 3 | // Définir une liste de devinettes avec les questions et les réponses 4 | const devinettes = [ 5 | { 6 | question: "Je peux voler sans ailes, qui suis-je ?", 7 | reponse: "Le temps", 8 | }, 9 | { 10 | question: "Je suis toujours affamé, le plus je mange, le plus gros je deviens. Qui suis-je ?", 11 | reponse: "Un trou noir", 12 | }, 13 | { 14 | question: "Je suis fort quand je suis en bas, mais je suis faible quand je suis en haut. Qui suis-je ?", 15 | reponse: "Le chiffre 6", 16 | }, 17 | { 18 | question: "Je peux être court ou long, dur ou mou, je peux être utilisé par n'importe qui, de jeunes enfants à des musiciens expérimentés. Qui suis-je ?", 19 | reponse: "Un crayon", 20 | }, 21 | { 22 | question: "Je suis le début de la fin, la fin de chaque lieu. Je suis le début de l'éternité, la fin du temps et de l'espace. Qui suis-je ?", 23 | reponse: "La lettre 'E'", 24 | }, 25 | { 26 | question: "Je suis blanc quand je suis sale et noir quand je suis propre. Qui suis-je ?", 27 | reponse: "Une ardoise", 28 | }, 29 | { 30 | question: "Je suis liquide, mais si vous m'enlevez de l'eau, je deviens solide. Qui suis-je ?", 31 | reponse: "Le thé", 32 | }, 33 | { 34 | question: "Je vole sans ailes, je pleure sans yeux. Où que je me trouve, la mort m'accompagne toujours. Qui suis-je ?", 35 | reponse: "Le vent", 36 | }, 37 | { 38 | question: "J'ai des villes, mais pas de maisons. J'ai des montagnes, mais pas d'arbres. J'ai de l'eau, mais pas de poissons. Qui suis-je ?", 39 | reponse: "Une carte", 40 | }, 41 | { 42 | question: "Je peux être lu, mais vous ne pouvez pas écrire sur moi. Vous me donnez toujours, mais me gardez rarement. Qui suis-je ?", 43 | reponse: "Un livre emprunté", 44 | }, 45 | { 46 | question: "Je viens deux fois dans une semaine, une fois dans un an, mais jamais dans un jour. Qui suis-je ?", 47 | reponse: "La lettre 'E'", 48 | }, 49 | { 50 | question: "Je suis difficile à saisir, mais vous me tiendrez dans votre main lorsque vous me trouverez. Qui suis-je ?", 51 | reponse: "Votre souffle", 52 | }, 53 | { 54 | question: "Plus je suis chaud, plus je deviens froid. Qui suis-je ?", 55 | reponse: "Le café", 56 | }, 57 | { 58 | question: "Je suis l'étoffe des rêves. Je couvre les idées brisées. Je change les âmes en ailes. Qui suis-je ?", 59 | reponse: "Un livre", 60 | }, 61 | { 62 | question: "Je suis blanc quand je suis sale et noir quand je suis propre. Qui suis-je ?", 63 | reponse: "Une ardoise", 64 | }, 65 | { 66 | question: "Je peux voler sans avoir d'ailes. Je peux pleurer sans avoir des yeux. Qui suis-je ?", 67 | reponse: "Un nuage", 68 | }, 69 | { 70 | question: "Je commence la nuit et finis le matin. Qui suis-je ?", 71 | reponse: "La lettre 'N'", 72 | }, 73 | { 74 | question: "Je peux être lu, mais vous ne pouvez pas écrire sur moi. Vous me donnez toujours, mais me gardez rarement. Qui suis-je ?", 75 | reponse: "Un livre emprunté", 76 | }, 77 | { 78 | question: "Je me nourris de tout ce qui m'entoure, l'air, la terre et même les arbres. Qui suis-je ?", 79 | reponse: "Un feu", 80 | }, 81 | { 82 | question: "Je suis blanc quand je suis sale et noir quand je suis propre. Qui suis-je ?", 83 | reponse: "Une ardoise", 84 | }, 85 | { 86 | question: "Je suis liquide, mais si vous m'enlevez de l'eau, je deviens solide. Qui suis-je ?", 87 | reponse: "Le thé", 88 | }, 89 | { 90 | question: "Je suis le commencement de la fin et la fin de chaque place. Je suis le début de l'éternité, la fin du temps et de l'espace. Qui suis-je ?", 91 | reponse: "La lettre 'E'", 92 | }, 93 | { 94 | question: "Je suis difficile à saisir, mais vous me tiendrez dans votre main lorsque vous me trouverez. Qui suis-je ?", 95 | reponse: "Votre souffle", 96 | }, 97 | ]; 98 | 99 | timoth({ nomCom: "devinette", categorie: "Games" }, async (dest, zk, commandeOptions) => { 100 | const { ms, repondre } = commandeOptions; 101 | 102 | // Choisir une devinette aléatoire 103 | const devinette = devinettes[Math.floor(Math.random() * devinettes.length)]; 104 | 105 | // Envoyer la question de la devinette 106 | await zk.sendMessage( 107 | dest, 108 | { 109 | text: `Devinette : ${devinette.question} . \n vous avez 30 secondes de réflexion.`, 110 | }, 111 | { quoted: ms } 112 | ); 113 | 114 | // Attendre 60 secondes avant d'envoyer la réponse 115 | await delay(30000); 116 | 117 | // Envoyer la réponse 118 | await zk.sendMessage( 119 | dest, 120 | { 121 | text: `La réponse était : ${devinette.reponse}`, 122 | }, 123 | { quoted: ms } 124 | ); 125 | }); 126 | 127 | // Fonction pour créer une pause/délai en millisecondes 128 | function delay(ms) { 129 | return new Promise((resolve) => setTimeout(resolve, ms)); 130 | } 131 | -------------------------------------------------------------------------------- /data/sudo.js: -------------------------------------------------------------------------------- 1 | // Importez dotenv et chargez les variables d'environnement depuis le fichier .env 2 | require("dotenv").config(); 3 | 4 | const { Pool } = require("pg"); 5 | 6 | // Utilisez le module 'set' pour obtenir la valeur de DATABASE_URL depuis vos configurations 7 | const s = require("../set"); 8 | 9 | // Récupérez l'URL de la base de données de la variable s.DATABASE_URL 10 | var dbUrl=s.DATABASE_URL?s.DATABASE_URL:"postgresql://flashmd_user:JlUe2Vs0UuBGh0sXz7rxONTeXSOra9XP@dpg-cqbd04tumphs73d2706g-a/flashmd" 11 | const proConfig = { 12 | connectionString: dbUrl, 13 | ssl: { 14 | rejectUnauthorized: false, 15 | }, 16 | }; 17 | 18 | const pool = new Pool(proConfig); 19 | 20 | // Fonction pour créer la table "sudo" 21 | async function createSudoTable() { 22 | const client = await pool.connect(); 23 | try { 24 | // Exécutez une requête SQL pour créer la table "sudo" si elle n'existe pas déjà 25 | await client.query(` 26 | CREATE TABLE IF NOT EXISTS sudo ( 27 | id serial PRIMARY KEY, 28 | jid text NOT NULL 29 | ); 30 | `); 31 | console.log("La table 'sudo' a été créée avec succès."); 32 | } catch (error) { 33 | console.error("Une erreur est survenue lors de la création de la table 'sudo':", error); 34 | } finally { 35 | client.release(); 36 | } 37 | } 38 | 39 | // Appelez la méthode pour créer la table "sudo" 40 | createSudoTable(); 41 | 42 | 43 | // Fonction pour vérifier si un groupe est banni 44 | async function issudo(jid) { 45 | const client = await pool.connect(); 46 | try { 47 | // Vérifiez si le groupe existe dans la table "banGroup" 48 | const query = "SELECT EXISTS (SELECT 1 FROM sudo WHERE jid = $1)"; 49 | const values = [jid]; 50 | 51 | const result = await client.query(query, values); 52 | return result.rows[0].exists; 53 | } catch (error) { 54 | console.error("Erreur lors de la vérification du groupe banni :", error); 55 | return false; 56 | } finally { 57 | client.release(); 58 | } 59 | } 60 | 61 | // Fonction pour supprimer un groupe de la liste des groupes bannis 62 | async function removeSudoNumber(jid) { 63 | const client = await pool.connect(); 64 | try { 65 | // Supprimez le numéro de téléphone de la table "sudo" 66 | const query = "DELETE FROM sudo WHERE jid = $1"; 67 | const values = [jid]; 68 | 69 | await client.query(query, values); 70 | console.log(`Numéro de téléphone ${jid} supprimé de la liste des numéros de téléphone autorisés.`); 71 | } catch (error) { 72 | console.error("Erreur lors de la suppression du numéro de téléphone autorisé :", error); 73 | } finally { 74 | client.release(); 75 | } 76 | } 77 | 78 | async function addSudoNumber(jid) { 79 | const client = await pool.connect(); 80 | try { 81 | // Insérez le numéro de téléphone dans la table "sudo" 82 | const query = "INSERT INTO sudo (jid) VALUES ($1)"; 83 | const values = [jid]; 84 | 85 | await client.query(query, values); 86 | console.log(`Numéro de téléphone ${jid} ajouté à la liste des numéros de téléphone autorisés.`); 87 | } catch (error) { 88 | console.error("Erreur lors de l'ajout du numéro de téléphone autorisé :", error); 89 | } finally { 90 | client.release(); 91 | } 92 | } 93 | 94 | async function getAllSudoNumbers() { 95 | const client = await pool.connect(); 96 | try { 97 | // Sélectionnez tous les numéros de téléphone de la table "sudo" 98 | const query = "SELECT jid FROM sudo"; 99 | const result = await client.query(query); 100 | 101 | // Créez un tableau des numéros de téléphone 102 | const sudoNumbers = result.rows.map((row) => row.jid); 103 | 104 | return sudoNumbers; 105 | } catch (error) { 106 | console.error("Erreur lors de la récupération des numéros de téléphone autorisés :", error); 107 | return []; 108 | } finally { 109 | client.release(); 110 | } 111 | } 112 | 113 | async function isSudoTableNotEmpty() { 114 | const client = await pool.connect(); 115 | 116 | try { 117 | // Exécutez une requête SQL pour compter le nombre de lignes dans la table "sudo" 118 | const result = await client.query('SELECT COUNT(*) FROM sudo'); 119 | 120 | // Récupérez la valeur du compteur (nombre de lignes) 121 | const rowCount = parseInt(result.rows[0].count); 122 | 123 | // Si le nombre de lignes est supérieur à zéro, la table n'est pas vide 124 | return rowCount > 0; 125 | } catch (error) { 126 | console.error('Erreur lors de la vérification de la table "sudo" :', error); 127 | return false; // En cas d'erreur, considérez la table comme vide 128 | } finally { 129 | client.release(); 130 | } 131 | }; 132 | 133 | 134 | 135 | 136 | module.exports = { 137 | issudo, 138 | addSudoNumber, 139 | removeSudoNumber, 140 | getAllSudoNumbers, 141 | isSudoTableNotEmpty 142 | }; 143 | 144 | --------------------------------------------------------------------------------