Skip to content
Open

idk #10

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6f59128
Update config.js
axion-bot Dec 26, 2025
201898e
Update config.js
axion-bot Dec 26, 2025
199d3fd
Create fun-velith.js
axion-bot Dec 26, 2025
342f7b2
Create fun-blood.js
axion-bot Dec 26, 2025
83b199c
Create nuke.js
BLOOD212 Jan 8, 2026
d48408a
Update handler.js
axion-bot Jan 10, 2026
2771b35
Update handler.js
axion-bot Jan 10, 2026
8d435fb
Change import source for baileys library
axion-bot Jan 20, 2026
eb31d39
Update import statements and improve caching logic
axion-bot Jan 20, 2026
0d80996
Update simple.js
axion-bot Jan 20, 2026
fc9f7b3
Update simple.js
axion-bot Jan 20, 2026
88d3c3f
Update simple.js
axion-bot Jan 20, 2026
686a058
Update simple.js
axion-bot Jan 20, 2026
c703693
Update simple.js
axion-bot Jan 20, 2026
a81af06
Update simple.js
axion-bot Jan 20, 2026
6432c92
Update simple.js
axion-bot Jan 20, 2026
ef5c690
Update simple.js
axion-bot Jan 20, 2026
08c1d6a
Update store.js
axion-bot Jan 20, 2026
815f78c
Update main.js
axion-bot Jan 20, 2026
91bc789
Update package.json
axion-bot Jan 20, 2026
3ebb4ba
Update antilink.js
axion-bot Jan 20, 2026
4e520aa
Update antiviewonce.js
axion-bot Jan 20, 2026
0a927e4
Update fun-barzelletta.js
axion-bot Jan 20, 2026
3f68593
Delete fun-esci tris.js
axion-bot Jan 20, 2026
ad3612c
Delete fun-roulettemorte.js
axion-bot Jan 20, 2026
f09d924
Update gp-inattivi.js
axion-bot Jan 20, 2026
9ad9ec2
Update info-creatore.js
axion-bot Jan 20, 2026
0590eac
Delete info-installa.js
axion-bot Jan 20, 2026
4288529
Update menu-sicurezza.js
axion-bot Jan 20, 2026
06173a1
Delete rpg-daixp.js
axion-bot Jan 20, 2026
bbe5ac3
Update rpg-dona.js
axion-bot Jan 20, 2026
f7849b6
Delete sticker-emojimix.js
axion-bot Jan 20, 2026
73ae129
Update templateResponse.js
axion-bot Jan 20, 2026
fa306ed
Delete tools-ispeziona.js
axion-bot Jan 20, 2026
f3a198f
Update tools-rivela.js
axion-bot Jan 20, 2026
47c9baf
Initial plan
Copilot Jan 26, 2026
64cca2c
Merge pull request #1 from BLOOD212/copilot/improve-code-and-add-comm…
AlexUngu07 Jan 26, 2026
3e085a5
Initial plan
Copilot Jan 27, 2026
5ccf8a2
Add comprehensive comments and improve code quality across main JavaS…
Copilot Jan 27, 2026
931cf4a
Add defensive check for undefined emotttt variable in api.js
Copilot Jan 27, 2026
9fbd103
Merge pull request #2 from BLOOD212/copilot/improve-js-code-quality
AlexUngu07 Jan 28, 2026
cde24f5
Create tette.js
BLOOD212 Feb 13, 2026
d0fc486
Update tette.js
BLOOD212 Feb 13, 2026
aab14d3
Update tette.js
BLOOD212 Feb 13, 2026
aae7772
Update and rename plugins/tette.js to game-seno.js
BLOOD212 Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 115 additions & 22 deletions api.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/**
* ============================================================================
* API.JS - External API Configuration and Utilities
* ============================================================================
*
* This file provides configuration for external API services used by the bot.
* It includes:
* - OpenAI configuration
* - Third-party API keys
* - API endpoint mappings
* - Global utility exports
*
* @author ChatUnity Team
* @version 1.0
* ============================================================================
*/

// Node.js and third-party imports
import { watchFile, unwatchFile } from 'fs'
import chalk from 'chalk'
import { fileURLToPath } from 'url'
Expand All @@ -7,19 +25,51 @@ import fetch from 'node-fetch'
import axios from 'axios'
import moment from 'moment-timezone'

// ============================================================================
// OPENAI CONFIGURATION
// ============================================================================

/** OpenAI API key for GPT features */
global.openai_key = 'sk-0'

/** OpenAI organization ID */
global.openai_org_id = 'org-3'

// ============================================================================
// API KEY POOLS
// ============================================================================

/**
* Multiple API keys are used for load balancing and fallback.
* Keys are randomly selected at runtime to distribute API usage.
*/

/** ZenAPI service keys */
global.keysZens = ['LuOlangNgentot', 'c2459db922', '37CC845916', '6fb0eff124', 'hdiiofficial', 'fiktod', 'BF39D349845E', '675e34de8a', '0b917b905e6f']
global.keysxxx = keysZens[Math.floor(keysZens.length * Math.random())]

/** XTeam API service keys */
global.keysxteammm = ['29d4b59a4aa687ca', '5LTV57azwaid7dXfz5fzJu', 'cb15ed422c71a2fb', '5bd33b276d41d6b4', 'HIRO', 'kurrxd09', 'ebb6251cc00f9c63']
global.keysxteam = keysxteammm[Math.floor(keysxteammm.length * Math.random())]

/** NeoXR API service keys */
global.keysneoxrrr = ['5VC9rvNx', 'cfALv5']
global.keysneoxr = keysneoxrrr[Math.floor(keysneoxrrr.length * Math.random())]

/** LOL Human API keys */
global.lolkeysapi = ['BrunoSobrino']

/** Rose API keys */
global.itsrose = ['4b146102c4d500809da9d1ff']

// ============================================================================
// API ENDPOINTS REGISTRY
// ============================================================================

/**
* Maps friendly service names to their base URLs.
* Use with global.API() function to construct full API URLs.
*/
global.APIs = {
xteam: 'https://api.xteam.xyz',
dzx: 'https://api.dhamzxploit.my.id',
Expand All @@ -28,18 +78,23 @@ global.APIs = {
neoxr: 'https://api.neoxr.my.id',
zenzapis: 'https://api.zahwazein.xyz',
akuari: 'https://api.akuari.my.id',
akuari2: 'https://apimu.my.id',
akuari2: 'https://apimu.my.id',
fgmods: 'https://api-fgmods.ddns.net',
botcahx: 'https://api.botcahx.biz.id',
ibeng: 'https://api.ibeng.tech/docs',
ibeng: 'https://api.ibeng.tech/docs',
rose: 'https://api.itsrose.site',
popcat : 'https://api.popcat.xyz',
xcoders : 'https://api-xcoders.site'
},
popcat: 'https://api.popcat.xyz',
xcoders: 'https://api-xcoders.site'
}

/**
* Maps API base URLs to their corresponding authentication keys.
* Used automatically by global.API() when apikeyqueryname is provided.
*/
global.APIKeys = {
'https://api.xteam.xyz': `${keysxteam}`,
'https://api.lolhuman.xyz': '85faf717d0545d14074659ad',
'https://api.neoxr.my.id': `${keysneoxr}`,
'https://api.neoxr.my.id': `${keysneoxr}`,
'https://violetics.pw': 'beta',
'https://api.zahwazein.xyz': `${keysxxx}`,
'https://api-fgmods.ddns.net': 'fg-dylux',
Expand All @@ -49,23 +104,61 @@ global.APIKeys = {
'https://api-xcoders.site': 'Frieren'
}

// ============================================================================
// GLOBAL UTILITY EXPORTS
// ============================================================================

/**
* Export commonly used libraries globally for plugin access.
* This allows plugins to use these without importing.
*/
global.cheerio = cheerio // HTML parsing library
global.fs = fs // File system operations
global.fetch = fetch // HTTP client
global.axios = axios // HTTP client with more features
global.moment = moment // Date/time handling

global.cheerio = cheerio
global.fs = fs
global.fetch = fetch
global.axios = axios
global.moment = moment
// ============================================================================
// RPG EMOTICON SYSTEM
// ============================================================================

/**
* RPG utility object with emoticon mapping functionality.
* Used for displaying appropriate emojis in RPG game features.
*
* @note The emotttt mapping object should be defined elsewhere in the codebase.
* If not defined, the emoticon function will return empty string.
*/
global.rpg = {
emoticon(string) {
string = string.toLowerCase()

let results = Object.keys(emotttt).map(v => [v, new RegExp(v, 'gi')]).filter(v => v[1].test(string))
if (!results.length) return ''
else return emotttt[results[0][0]]
}}

/**
* Finds the emoticon associated with a string.
* Matches against known emoticon patterns.
*
* @param {string} string - Text to find emoticon for
* @returns {string} Matching emoticon or empty string
*/
emoticon(string) {
// Safety check: ensure emotttt exists before using
if (typeof emotttt === 'undefined') return ''

string = string.toLowerCase()

// Match string against emoticon patterns
let results = Object.keys(emotttt).map(v => [v, new RegExp(v, 'gi')]).filter(v => v[1].test(string))

if (!results.length) return ''
return emotttt[results[0][0]]
}
}

// ============================================================================
// HOT-RELOAD WATCHER
// ============================================================================

// Watch this file for changes and auto-reload
let file = fileURLToPath(import.meta.url)
watchFile(file, () => {
unwatchFile(file)
console.log(chalk.redBright("Update 'config.js'"))
import(`${file}?update=${Date.now()}`)})
unwatchFile(file)
console.log(chalk.redBright("Update 'api.js'"))
import(`${file}?update=${Date.now()}`)
})
105 changes: 98 additions & 7 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,118 @@
/**
* ============================================================================
* CONFIG.JS - Bot Configuration and Settings
* ============================================================================
*
* This file contains the main configuration for the ChatUnity bot including:
* - Bot identity (name, version, watermark)
* - Owner and moderator definitions
* - API keys and endpoints
* - Visual customization settings
*
* @author ChatUnity Team
* @version 1.0
* ============================================================================
*/

// Node.js core modules
import { watchFile, unwatchFile } from 'fs';
import chalk from 'chalk';
import fs from 'fs';
import { fileURLToPath } from 'url';

// ============================================================================
// BOT IDENTITY CONFIGURATION
// ============================================================================

/** Bot phone number (leave empty for auto-detection) */
global.botnumber = '';

/** Confirmation code for authentication */
global.confirmCode = '';
global.nomebot = '𝐂𝐡𝐚𝐭𝐔𝐧𝐢𝐭𝐲-𝐁𝐨𝐭';
global.packname = '𝐂𝐡𝐚𝐭𝐔𝐧𝐢𝐭𝐲-𝐁𝐨𝐭';

/** Display name for the bot */
global.nomebot = '𝐁𝐋𝐃-𝐁𝐋𝐎𝐎𝐃';

/** Sticker pack name */
global.packname = '𝐁𝐋𝐃-𝐁𝐋𝐎𝐎𝐃';

/** Sticker author name */
global.author = '𝐌𝐝';
global.vs = '8.8';

/** Bot version */
global.vs = '1.0';

/** Collaborator tag */
global.collab = 'Demon Slayer';

/** Watermark (defaults to bot name) */
global.wm = global.nomebot;

/** Loading message shown during command processing */
global.wait = 'ⓘ 𝐂𝐚𝐫𝐢𝐜𝐚𝐦𝐞𝐧𝐭𝐨 ...';

// ============================================================================
// USER PERMISSION CONFIGURATION
// ============================================================================

/**
* Owner list - Users with full bot control
* Format: [phoneNumber, displayName, isMainOwner]
*/
global.owner = [
['393773842461', '𝐂𝐡𝐚𝐭𝐔𝐧𝐢𝐭𝐲', true],
['xxxxxxxxxx'], //mettete il vostro numero al posto delle x e copiate sopra il formato dopo ovvero 'nome', true
['212780803311', 'Blood', true],
['19782772696', 'Bot', true],
['xxxxxxxxxx'],
['xxxxxxxxxx'],
['xxxxxxxxxx'],
['xxxxxxxxxx']
];

/** Moderators - Users with elevated permissions */
global.mods = ['xxxxxxxxxx'];

/** Premium users - Users with premium feature access */
global.prems = ['xxxxxxxxxx', 'xxxxxxxxxx'];

// ============================================================================
// UTILITY FUNCTIONS
// ============================================================================

/**
* Picks a random element from an array.
* Used for API key rotation to distribute load.
*
* @param {Array} arr - Array to pick from
* @returns {*} Random element from array
*/
const pickRandom = arr => arr[Math.floor(Math.random() * arr.length)];

// ============================================================================
// API KEY POOLS
// ============================================================================

/** ZenAPI keys pool */
global.keysZens = ['c2459db922', '37CC845916', '6fb0eff124'];

/** XTeam API keys pool */
global.keysxteammm = ['29d4b59a4aa687ca', '5LTV57azwaid7dXfz5fzJu', 'cb15ed422c71a2fb', '5bd33b276d41d6b4', 'HIRO', 'kurrxd09', 'ebb6251cc00f9c63'];

/** NeoXR API keys pool */
global.keysneoxrrr = ['5VC9rvNx', 'cfALv5'];

/** LOL Human API keys pool */
global.lolkeysapi = ['BrunoSobrino'];

// Select random key from each pool for load balancing
global.keysxxx = pickRandom(global.keysZens);
global.keysxteam = pickRandom(global.keysxteammm);
global.keysneoxr = pickRandom(global.keysneoxrrr);

// ============================================================================
// API ENDPOINTS CONFIGURATION
// ============================================================================

/** API base URLs mapped by service name */
global.APIs = {
xteam: 'https://api.xteam.xyz',
nrtm: 'https://fg-nrtm-nhie.onrender.com',
Expand All @@ -49,21 +125,31 @@ global.APIs = {
zenzapis: 'https://zenzapis.xyz',
akuari: 'https://api.akuari.my.id',
akuari2: 'https://apimu.my.id'

};

/** API keys mapped by base URL */
global.APIKeys = {
'https://api.xteam.xyz': global.keysxteam,
'https://api.lolhuman.xyz': '85faf717d0545d14074659ad',
'https://api.neoxr.my.id': global.keysneoxr,
'https://violetics.pw': 'beta',

};

// ============================================================================
// GAME AND FEATURE SETTINGS
// ============================================================================

/** Experience points multiplier for leveling system */
global.multiplier = 69;

/** Maximum warnings before user is banned */
global.maxwarn = '4';

// ============================================================================
// FLAMING TEXT LOGO TEMPLATES
// ============================================================================

/** URLs for generating styled text logos via FlamingText API */
global.flaaa = [
'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=water-logo&fontsize=100&scaleWidth=800&scaleHeight=500&fillTextColor=%23000&shadowGlowColor=%23000&backgroundColor=%23000&text=',
'https://flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=crafts-logo&fontsize=90&scaleWidth=800&scaleHeight=500&text=',
Expand All @@ -72,6 +158,11 @@ global.flaaa = [
'https://www6.flamingtext.com/net-fu/proxy_form.cgi?&imageoutput=true&script=sketch-name&fontsize=100&fillTextType=1&fillTextPattern=Warning!&fillColor1Color=%23f2aa4c&fillOutlineColor=%23f2aa4c&backgroundColor=%23101820&scaleWidth=800&scaleHeight=500&text='
];

// ============================================================================
// HOT-RELOAD WATCHER
// ============================================================================

// Watch this file for changes and auto-reload
const file = fileURLToPath(import.meta.url);
watchFile(file, () => {
unwatchFile(file);
Expand Down
Loading