Skip to content

Commit

Permalink
Merge pull request #189 from jeffersonalionco/master
Browse files Browse the repository at this point in the history
๐Ÿงฟ ๐šƒ๐š‘๐šŽ ๐™ผ๐šข๐šœ๐š๐š’๐šŒ - ๐™ฑ๐š˜๐š ๐Ÿ”ฎ
  • Loading branch information
jeffersonalionco authored Apr 13, 2024
2 parents 27891c7 + 0e30d4d commit 063dc1b
Show file tree
Hide file tree
Showing 111 changed files with 20,168 additions and 333 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@
> TheMystic-Bot-MD pasa a quedar en manos de colaboradores, y como principal representante Aiden_NotLogic.
------------------

<!-- Por colaborador: https://github.com/jeffersonalionco -->
> Funciรณn de **idioma** oficialmente implementada en TheMystic-Bot-MD: **/lang**
> ##### **๐™๐™ƒ๐™€ ๐™ˆ๐™”๐™Ž๐™๐™„๐˜พ - ๐˜ฝ๐™Š๐™ - Idiomas Disponibles**
> - es - Espaรฑol
> - pt-br - Portuguรฉs
> - en - Inglรฉs
> - ru - Ruso
> - fr - Francรฉs
### `โ–ข CUENTAS OFICIALES`

[ ๐Ÿ”— ] https://www.atom.bio/theshadowbrokers-team

### `โ–ข GRUPOS DE SOPORTE (NO DISPONIBLE)`

<a href="https://api.whatsapp.com/send/?phone=5545998331383&text=Mais%20Informaรงรตes" target="blank"><img src="https://img.shields.io/badge/GRUPO_DE_SOPORTE_(PORTUGU%C3%8AS)_(EM%20BREVE)-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" />
<a href="https://chat.whatsapp.com/J8tFq87Ia0jEnx20NvCQxN" target="blank"><img src="https://img.shields.io/badge/GRUPO_DE_SOPORTE_(PORTUGU%C3%8AS)_(ATIVO)-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" />

<a href="https://chat.whatsapp.com/FRkr7jJHSJA5OjVtE64dDs" target="blank"><img src="https://img.shields.io/badge/GRUPO_DE_SOPORTE_(ES)_(NO_DISPONIBLE)-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" /></a>

Expand Down
38 changes: 38 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "TheMystic-Bot-MD",
"website": "https://github.com/BrunoSobrino",
"description": "Subscribete a The Shadow Borkers - Bot (โ‰งโ–ฝโ‰ฆ)",
"repository": "https://github.com/BrunoSobrino/TheMystic-Bot-MD",
"logo": "https://raw.githubusercontent.com/BrunoSobrino/TheMystic-Bot-MD/master/src/pictures/heroku-icon.jpg",
"success_url": "https://github.com/BrunoSobrino/TheMystic-Bot-MD",
"keywords": [
"nodejs",
"heroku",
"bot",
"bots",
"bot",
"spanish",
"whatsapp",
"termux",
"shadow",
"multi-device",
"md",
"whatsappbot",
"oficial",
"whatsapp-md",
"themysticbot",
"themystic-bot",
"themystic-bot-md"],
"image": "heroku/nodejs",
"buildpacks": [
{
"url": "heroku/nodejs"
},
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
},
{
"url": "https://github.com/bogini/heroku-buildpack-graphicsmagick"
}
]
}
61 changes: 36 additions & 25 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import {watchFile, unwatchFile} from 'fs';
import chalk from 'chalk';
import {fileURLToPath} from 'url';
import fs from 'fs';
import cheerio from 'cheerio';
import fetch from 'node-fetch';
import axios from 'axios';
import moment from 'moment-timezone';

global.botnumber = ""
Expand All @@ -15,15 +18,12 @@ global.owner = [
['5218442286089', '๐Ÿ’ซ Mystic - Collaborator 4 ๐Ÿ’ซ', true],
['50246028932', '๐Ÿ’ซ Mystic - Collaborator 5 ๐Ÿ’ซ', true],
['5212412377467', '๐Ÿ’ซ Mystic - Collaborator 6 ๐Ÿ’ซ', true],
['5215517489568', '๐Ÿ’ซ Mystic - ReyEndymion ๐Ÿ’ซ', false],
['5215517489568', '๐Ÿ’ซ Mystic - Rey Endymion ๐Ÿ’ซ', false],
['59895555511', '๐Ÿ’ซ Mystic - Collaborator 8 ๐Ÿ’ซ', true],
['59177601773', '๐Ÿ’ซ Mystic - Alba070503 ๐Ÿ’ซ', true],
['393518398856','๐Ÿ’ซ Mystic - Fabri115๐Ÿ’ซ', true],
['59177601773', '๐Ÿ’ซ Mystic - By Alba070503 ๐Ÿ’ซ', true],
['393518398856','๐Ÿ’ซ Mystic - Tester Fabri115๐Ÿ’ซ', true],
['593968585283'],
['5219993404349'],
['5219991402134'],
['5492266466080'],
['5219996125657'],
['5218442114446'],
['59894808483'],
['593980586516'],
Expand All @@ -36,41 +36,50 @@ global.owner = [
['5217294888993'],
['595992611272']
];
global.mods = [];
global.prems = [];
global.suittag = [];

global.suittag = ['5219993404349'];
global.prems = ['51995386439'];

global.packname = 'Sticker';
global.author = 'The Mystic - Bot';

global.wm = 'The Mystic - Bot';
global.titulowm = 'The Mystic - Bot';
global.titulowm2 = 'The Mystic - Bot';

global.titulowm2 = `The Mystic - Bot`
global.igfg = 'The Mystic - Bot';
global.wait = '*[ โณ ] Cargando...*';

global.imagen1 = fs.readFileSync('./Menu2.jpg');
global.imagen2 = fs.readFileSync('./src/anime.jpg');
global.imagen2 = fs.readFileSync('./src/nuevobot.jpg');
global.imagen3 = fs.readFileSync('./src/Pre Bot Publi.png');
global.imagen4 = fs.readFileSync('./Menu.png');
global.imagen5 = fs.readFileSync('./src/+18.jpg');
global.imagen6 = fs.readFileSync('./Menu3.png');
global.imagen7 = fs.readFileSync('./src/menu_pt.png');
global.imagen8 = fs.readFileSync('./src/menu_fr.png');
global.imagen9 = fs.readFileSync('./src/menu_en.png');
global.imagen10 = fs.readFileSync('./src/menu_ru.png');
global.imagen8 = fs.readFileSync('./src/menu_fr.png')
global.imagen9 = fs.readFileSync('./src/menu_en.png')
global.imagen10 = fs.readFileSync('./src/menu_ru.png')

global.multiplier = 99;
global.mods = [];

//* *******Tiempo***************
global.d = new Date(new Date + 3600000);
global.locale = 'es';
global.dia = d.toLocaleDateString(locale, {weekday: 'long'});
global.fecha = d.toLocaleDateString('es', {day: 'numeric', month: 'numeric', year: 'numeric'});
global.mes = d.toLocaleDateString('es', {month: 'long'});
global.aรฑo = d.toLocaleDateString('es', {year: 'numeric'});
global.tiempo = d.toLocaleString('es-ES', {hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true});
global.botdate = `*[ ๐Ÿ“… ] Fecha:* ${moment.tz('America/Mexico_City').format('DD/MM/YY')}`;
global.bottime = `*[ โณ ] Hora:* ${moment.tz('America/Mexico_City').format('HH:mm:ss')}`;

global.tiempo = d.toLocaleString('en-US', {hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true});
//* ****************************
global.wm2 = `${dia} ${fecha}\nThe Mystic - Bot`;
global.gt = 'The Mystic - Bot';
global.mysticbot = 'The Mystic - Bot';
global.md = 'https://github.com/BrunoSobrino/TheMystic-Bot-MD';
global.mysticbot = 'https://github.com/BrunoSobrino/TheMystic-Bot-MD';
global.waitt = '*[ โณ ] Cargando...*';
global.waittt = '*[ โณ ] Cargando...*';
global.waitttt = '*[ โณ ] Cargando...*';
global.nomorown = '5219993404349';
global.pdoc = ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/msword', 'application/pdf', 'text/rtf'];
global.cmenut = 'โ–โ€“โ€“โ€“โ€“โ€“โ€“ใ€Ž';
global.cmenub = 'โ”Šโœฆ ';
global.cmenuf = 'โ•ฐโ”โ•โ”…โ•โ”โ€“โ€“โ€“โ€“โ€“โ€“เน‘\n';
Expand All @@ -84,20 +93,22 @@ global.htki = '*โญ‘โ€ขฬฉฬฉอ™โŠฑโ€ขโ€ขโ€ขโ€ข โ˜ช*';
global.htka = '*โ˜ช โ€ขโ€ขโ€ขโ€ขฬฉฬฉอ™โŠฐโ€ขโญ‘*';
global.comienzo = 'โ€ข โ€ข โ—•โ—•โ•โ•โ•โ•';
global.fin = 'โ•โ•โ•โ•โ—•โ—• โ€ข โ€ข';

global.fgif = {key: {participant: '[email protected]'}, message: {'videoMessage': {'title': wm, 'h': `Hmm`, 'seconds': '999999999', 'gifPlayback': 'true', 'caption': bottime, 'jpegThumbnail': 'https://grxcwmcwbxwj.objectstorage.sa-saopaulo-1.oci.customer-oci.com/n/grxcwmcwbxwj/b/themystic-bot/o/logos%2Flogo.png'}}};

global.botdate = `*[ ๐Ÿ“… ] Fecha:* ${moment.tz('America/Mexico_City').format('DD/MM/YY')}`;
global.bottime = `*[ โณ ] Hora:* ${moment.tz('America/Mexico_City').format('HH:mm:ss')}`;
global.fgif = {key: {participant: '[email protected]'}, message: {'videoMessage': {'title': wm, 'h': `Hmm`, 'seconds': '999999999', 'gifPlayback': 'true', 'caption': bottime, 'jpegThumbnail': fs.readFileSync('./Menu.png')}}};
global.multiplier = 99;
global.flaaa = [
'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=water-logo&script=water-logo&fontsize=90&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&fillTextColor=%23000&shadowGlowColor=%23000&backgroundColor=%23000&text=',
'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=crafts-logo&fontsize=90&doScale=true&scaleWidth=800&scaleHeight=500&text=',
'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=amped-logo&doScale=true&scaleWidth=800&scaleHeight=500&text=',
'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=sketch-name&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&fillTextType=1&fillTextPattern=Warning!&text=',
'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=sketch-name&doScale=true&scaleWidth=800&scaleHeight=500&fontsize=100&fillTextType=1&fillTextPattern=Warning!&fillColor1Color=%23f2aa4c&fillColor2Color=%23f2aa4c&fillColor3Color=%23f2aa4c&fillColor4Color=%23f2aa4c&fillColor5Color=%23f2aa4c&fillColor6Color=%23f2aa4c&fillColor7Color=%23f2aa4c&fillColor8Color=%23f2aa4c&fillColor9Color=%23f2aa4c&fillColor10Color=%23f2aa4c&fillOutlineColor=%23f2aa4c&fillOutline2Color=%23f2aa4c&backgroundColor=%23101820&text=',
];
//* ************************

const file = fileURLToPath(import.meta.url);
watchFile(file, () => {
unwatchFile(file);
console.log(chalk.redBright('Se actualizรณ el archivo \'config.js\''));
console.log(chalk.redBright('Update \'config.js\''));
import(`${file}?update=${Date.now()}`);
});
44 changes: 28 additions & 16 deletions handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function handler(chatUpdate) {
if (!isNumber(user.joincount)) user.joincount = 2;
if (!isNumber(user.limit)) user.limit = 20;
if (!isNumber(user.money)) user.money = 15;
if (!isNumber(user.language)) user.language = 'es';
if (!('language' in user)) user.language = 'es';
if (!('registered' in user)) user.registered = false;
if (!user.registered) {
if (!('name' in user)) user.name = m.name;
Expand Down Expand Up @@ -935,7 +935,7 @@ export async function handler(chatUpdate) {
global.db.data.chats[m.chat] = {};
}
if (chat) {
if (!('language' in chat)) chat.language = 'es';
//if (!('language' in chat)) chat.language = 'es';
if (!('isBanned' in chat)) chat.isBanned = false;
if (!('welcome' in chat)) chat.welcome = true;
if (!('detect' in chat)) chat.detect = true;
Expand Down Expand Up @@ -1019,6 +1019,11 @@ export async function handler(chatUpdate) {
} catch (e) {
console.error(e);
}

const idioma = global.db.data.users[m.sender].language
const _translate = JSON.parse(fs.readFileSync(`./language/${idioma}.json`))
const tradutor = _translate.handler.handler

if (opts['nyimak']) {
return;
}
Expand Down Expand Up @@ -1186,10 +1191,10 @@ export async function handler(chatUpdate) {

if (user.bannedMessageCount < 3) {
const messageNumber = user.bannedMessageCount + 1;
const messageText = `_*< USUARIO SUSPENDIDO />*_\n
โ–ข *Aviso:* ${messageNumber}/3
${user.bannedReason ? `\nโ–ข *Motivo:* ${user.bannedReason}` : ' โ–ข *Motivo:* Sin especificar'}
*[ โ„น๏ธ ] Si consideras que esto es un error y cuentas con pruebas, puedes comunicarte con el propietario(a) del bot para apelar la suspensiรณn.*`.trim();
const messageText = `${tradutor.texto1[0]}
${tradutor.texto1[1]} ${messageNumber}/3
${user.bannedReason ? `${tradutor.texto1[2]} ${user.bannedReason}` : `${tradutor.texto1[3]}`}
${tradutor.texto1[4]}`.trim();
m.reply(messageText);
user.bannedMessageCount++;
} else if (user.bannedMessageCount === 3) {
Expand Down Expand Up @@ -1270,11 +1275,11 @@ export async function handler(chatUpdate) {
m.exp += xp;
}
if (!isPrems && plugin.limit && global.db.data.users[m.sender].limit < plugin.limit * 1) {
mconn.conn.reply(m.chat, `*[ โ„น๏ธ ] Sus diamantes se han agotado, puede adquirir mรกs con el comando:* _${usedPrefix}buyall_`, m);
mconn.conn.reply(m.chat, `${tradutor.texto2} _${usedPrefix}buyall_`, m);
continue;
}
if (plugin.level > _user.level) {
mconn.conn.reply(m.chat, `*[ โ„น๏ธ ] Se require tener el nivel ${plugin.level} para poder utilizar el comando. Tรบ nivel actual es ${_user.level}, usa el comando ${usedPrefix}lvl para subir tu nivel con XP.*`, m);
mconn.conn.reply(m.chat, `${tradutor.texto3[0]} ${plugin.level} ${tradutor.texto3[1]} ${_user.level}, ${tradutor.texto3[2]} ${usedPrefix}lvl ${tradutor.texto3[3]}`, m);
continue;
}
const extra = {
Expand Down Expand Up @@ -1343,7 +1348,7 @@ export async function handler(chatUpdate) {
}
}
if (m.limit) {
m.reply('*[ โ„น๏ธ ] Se utilizaron ' + +m.limit + ' diamante(s) (limites).*');
m.reply(`${tradutor.texto4[0]} ` + +m.limit + ` ${tradutor.texto4[1]}`);
}
}
break;
Expand Down Expand Up @@ -1436,7 +1441,7 @@ export async function participantsUpdate({ id, participants, action }) {
if (chat.welcome && !chat?.isBanned) {
const groupMetadata = await m.conn.groupMetadata(id) || (conn.chats[id] || {}).metadata;
for (const user of participants) {
let pp = './src/avatar_contact.png';
let pp = 'https://raw.githubusercontent.com/BrunoSobrino/TheMystic-Bot-MD/master/src/avatar_contact.png';
try {
pp = await m.conn.profilePictureUrl(user, 'image');
} catch (e) {
Expand Down Expand Up @@ -1525,6 +1530,13 @@ export async function callUpdate(callUpdate) {
}

export async function deleteUpdate(message) {
const datas = global
const id = message.participant // Obtenga la identificaciรณn del usuario, solo dentro de esta funciรณn "deleteUpdate"
const idioma = datas.db.data.users[id].language || 'es';
const _translate = JSON.parse(fs.readFileSync(`./language/${idioma}.json`))
const tradutor = _translate.handler.deleteUpdate


let d = new Date(new Date + 3600000)
let date = d.toLocaleDateString('es', { day: 'numeric', month: 'long', year: 'numeric' })
let time = d.toLocaleString('en-US', { hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true })
Expand All @@ -1536,12 +1548,12 @@ export async function deleteUpdate(message) {
if (!chat?.antidelete) return
if (!msg) return
if (!msg?.isGroup) return
const antideleteMessage = `_*< ANTI-DELETE />*_\n
โ–ข *Usuario:* @${participant.split`@`[0]}
โ–ข *Hora:* ${time}
โ–ข *Fecha:* ${date}\n
โ–ข *Enviando el mensaje eliminado...*\n
*[ โ„น๏ธ ] Para desactivar la funciรณn* _antidelete_*, envia el siguiente comando:* _/disable antidelete_`.trim();
const antideleteMessage = `${tradutor.texto1[0]}
${tradutor.texto1[1]} @${participant.split`@`[0]}
${tradutor.texto1[2]} ${time}
${tradutor.texto1[3]} ${date}\n
${tradutor.texto1[4]}
${tradutor.texto1[5]}`.trim();
await mconn.conn.sendMessage(msg.chat, { text: antideleteMessage, mentions: [participant] }, { quoted: msg })
mconn.conn.copyNForward(msg.chat, msg).catch(e => console.log(e, msg))
} catch (e) {
Expand Down
Loading

0 comments on commit 063dc1b

Please sign in to comment.