admin管理员组

文章数量:1323348

How do you add an icon to the telegram bot?

example mand:

/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' });

How do you add an icon to the telegram bot?

example mand:

/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' });
Share Improve this question edited Sep 14, 2018 at 1:50 Naser.Sadeghi 1,3021 gold badge15 silver badges42 bronze badges asked Sep 13, 2018 at 14:48 gosdor xdagosdor xda 332 silver badges5 bronze badges 2
  • 3 Wele to stack overflow, what do you mean by icon? Do you want to change the bot's profile icon? Explain more please. – Naser.Sadeghi Commented Sep 13, 2018 at 19:56
  • if you're about icons for buttons (on the keyboard), you can use utf8-codes here a list of codes: unicode/emoji/charts/full-emoji-list.html. I agree with @Naser.Sadeghi, can you explain what do you mean on "icon"? – Danil Pyatnitsev Commented Sep 17, 2018 at 8:46
Add a ment  | 

1 Answer 1

Reset to default 7
  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)

本文标签: javascriptTelegram BOThow to add iconStack Overflow