uz
Feedback
Meta Apis

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'rsatish
Mamlakat belgilanmaganToif belgilanmagan
506
Obunachilar
Ma'lumot yo'q24 soatlar
Ma'lumot yo'q7 kunlar
Ma'lumot yo'q30 kunlar
Postlar arxiv
❓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 happens

πŸ†• 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