Meta Apis
Kanalga Telegramβda oβtish
β Free Premium Telegram Bot Api Running 24hours π Check Out Our Bots Api Status Here https://stats.uptimerobot.com/p64EDs9KYO/791363666
Ko'proq ko'rsatishMamlakat belgilanmaganToif belgilanmagan
506
Obunachilar
Ma'lumot yo'q24 soatlar
Ma'lumot yo'q7 kunlar
Ma'lumot yo'q30 kunlar
Postlar arxiv
506
βHow To Broadcast Message To Your Bot Users Using MetaApis For bots.business
π§© Command:-
/broadcast
β
Wait For Answer:- On
βοΈ Answer:- Send me message to broadcast
π₯ BJS :-
if (message) {
Bot.setProp('broadcastMessage', message, 'string');
Bot.runCommand('/JTbroadcast');
}
π§© Command:- /JTbroadcast
π₯ BJS :-
const bbApiKey = 'PLEASE_CHANGE_ME_WITH_YOUR_BB_API_KEY';
const broadcastCommand = '/JTbroadcast';
const messageText = Bot.getProp('broadcastMessage') || 'Hello User!';
if (content) {
if (params === 'users') {
const webhookUrl = Libs.Webhooks.getUrlFor({
command: `${broadcastCommand} statistics`,
user_id: user.id
});
try {
const regex = /"telegramid":(\d+)/g;
const telegramIds = [];
let match;
while ((match = regex.exec(content)) !== null) {
telegramIds.push(match[1]);
}
HTTP.post({
url: `https://botapi.koyeb.app/broadcast`,
body: { token: bot.token, chatIds: telegramIds, webhookUrl, messageText },
success: `${broadcastCommand} broadcast`,
background: true
});
} catch (error) {
Bot.sendMessage('Error processing content.');
}
} else if (params === 'broadcast') {
Bot.sendMessage(content);
} else if (params === 'statistics') {
const status = JSON.parse(content);
const message = `π **Status Report**\n\n` +
`π© **Total Messages Attempted:** ${status.totalMessagesAttempted}\n` +
`β
**Total Success:** ${status.totalSuccess}\n` +
`β **Total Failures:** ${status.totalFailures}\n` +
`β± **Total Time Taken:** ${status.totalTimeTaken} seconds`;
Bot.sendMessage(message);
}
} else {
HTTP.get({
url: `https://api.bots.business/v1/bots/${bot.id}/users?api_key=${bbApiKey}`,
success: `${broadcastCommand} users`,
background: true
});
}
βββββββββββββ
Β©οΈ Channel :- @MetaApis
β οΈ Please report error to me if happens506
π Telebotcreator Unofficial API
Check out the documentation site for demo and examples code.
βββββββββββββ
πβπ¨ Documentation: https://botapi.koyeb.app/tbc
π¨βπ» Channel :- @TCBotCodes
Β©οΈ Channel :- @MetaApis
β οΈ Please report error to me if happens
