简体   繁体   中英

Telegram BOT - how to add icon?

How do you add an icon to the telegram bot?

example command:

/stats

response code:

var response = '';
response += '*Pool*\n';
response += 'Hashrate: ' + poolHashrate + '\n';
response += 'Connected Miners: ' + poolMiners + '\n';
response += 'Active Workers: ' + poolWorkers + '\n';
response += 'Blocks Found: ' + poolBlocks + '\n';
response += 'Last Block: ' + poolLastBlock + '\n';
response += 'Current Effort: ' + currentEffort + '\n';
response += '\n';
response += '*Network*\n';
response += 'Hashrate: ' + networkHashrate + '\n';
response += 'Difficulty: ' + networkDiff + '\n';
response += 'Block Height: ' + networkHeight + '\n';
response += 'Block Found: ' + networkLastBlock + '\n';
response += 'Last Reward: ' + networkLastReward;
return bot.sendMessage(chatId, response, { parse_mode: 'Markdown' });
  1. talk to @BotFather
  2. type /setuserpic
  3. select your bot from the list (or type its name)
  4. use send media to upload the image (must be at least 150x150)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM