notmebotz-tools
Version:
Sebuah Tools yang berfungsi untuk mendownload Video atau Foto dari media sosial, serta sebagai tools yang berguna untuk aplikasi kamu seperti untuk BOT
94 lines (86 loc) • 3.7 kB
JavaScript
const axios = require('axios');
const { parseStringPromise } = require('xml2js');
const avois = [
'sweetheart', 'flutter', 'pinkglow', 'volcano', 'petalprint', 'giftwrap', 'mrfrosty', 'littlehelper',
'sprinklesparkle', 'seasonsgreetings', 'heartbeat', 'valentine', 'sapphireheart', 'signature', 'lollipop',
'handbag', 'tiptoe', 'sketchy', 'ghostship', 'oldenglish', 'dragonscale', 'magicdust', 'substance',
'piratescove', 'backstreet', 'funkyzeit', 'airman', 'foolsgold', 'zephyr', 'paintbrush', 'lokum',
'insignia', 'cottoncandy', 'fairygarden', 'neonlights', 'glowstick', 'lavender', 'ohhai', 'bluegecko',
'moderno', 'petalprint', 'rhizome', 'devana', 'cupcake', 'fame', 'ionize', 'volcano', 'broadway',
'sweetheart', 'starshine', 'flowerpower', 'gobstopper', 'discodiva', 'medieval', 'fruityfresh',
'letterboard', 'greenstone', 'alieninvasion', 'pinkglow', 'pinkcandy', 'losttales', 'glowtxt',
'purple', 'yourstruly', 'electricblue', 'greek', 'cyrillic', 'cyrillic2', 'cyrillic3', 'korean',
'arabic', 'arabic2', 'arabic3', 'hindi', 'chinese', 'japanese', 'hebrew', 'hebrew2', 'hebrew3',
'ethiopic', 'ethiopic2', 'ethiopic3', 'vietnamese', 'icelandic', 'bengali', 'yoruba', 'igbo',
'armenian', 'armenian2', 'georgian', 'georgian2', 'thai', 'euro', 'euro2', 'euro3', 'allstars',
'dearest', 'metropol', 'ransom', 'bronco', 'platformtwo', 'fictional', 'typeface', 'stardate',
'beachfront', 'arthouse', 'sterling', 'jukebox', 'bubbles', 'invitation', 'frontier', 'surprise',
'firstedition', 'republika', 'jumble', 'warehouse', 'orientexpress', 'orbitron', 'starlight', 'jet',
'tamil', 'kannada', 'telugu', 'punjabi', 'malayalam', 'odia', 'thai2', 'thai3', 'thai4', 'hindi2',
'hindi3', 'hindi4', 'hindi5', 'hindi6', 'hindi7', 'hindi8', 'euro4', 'arabic4', 'arabic5',
'arabic6', 'hebrew4', 'hebrew5', 'hebrew6', 'cyrillic4', 'japanese2', 'japanese3', 'japanese4',
'japanese5', 'japanese6', 'japanese7', 'japanese8', 'japanese9', 'japanese10', 'japanese11',
'japanese12', 'japanese13', 'chinese_tc'
];
async function avos(text, effect) {
if (!text || !effect) {
return {
author: 'Herza',
status: 400,
message: 'Text and effect are required',
};
}
if (!avois.includes(effect)) {
return {
author: 'Herza',
status: 400,
message: `Only these filters can be used: ${avois.join(', ')}`,
};
}
const url = `https://glowtxt.com/gentext2.php`;
const params = {
text: text,
text2: '',
text3: '',
font_style: effect,
font_size: 'x',
font_colour: '0',
bgcolour: '#000000',
glow_halo: '2',
non_trans: 'false',
glitter_border: 'false',
anim_type: 'none',
submit_type: 'text',
};
const headers = {
'Host': 'glowtxt.com',
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Mobile Safari/537.36',
'Accept-Language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',
};
try {
const response = await axios.get(url, { params, headers });
const result = await parseStringPromise(response.data);
const datadir = result?.image?.datadir?.[0];
const fullFilename = result?.image?.fullfilename?.[0];
if (datadir && fullFilename) {
return {
author: 'Herza',
status: 200,
url: `https://glowtxt.com/${datadir}/${fullFilename}`,
};
} else {
return {
author: 'Herza',
status: 400,
message: 'Failed to generate Glow Text. Data not found.',
};
}
} catch (error) {
return {
author: 'Herza',
status: 500,
message: `Error occurred: ${error.message}`,
};
}
}
module.exports = { avos };