Tuesday, August 25, 2020

Send Dice in a Telegram chat group via bot

Hi Friends,

We can send dice in the Telegram chat group via Telegram bot API.

Its very simple and useful in many cases. Suppose you are playing some group game and you need dice then you can create and add a bot in the group and that bot will send dice each time in the group.

Let's Discuss the steps:

Step 1: Login to Telegram and create an account from your number.

Step 2: Create a group and add group members.

Step 3: Now you need to add group a bot in the group.

to create a group and add a bot steps already discussed in my below blog.

https://telegrambotinfo.blogspot.com/2020/04/

Step 4: Now i am assuming you have already added the bot in the group and now you have bot id and chat id with you(which already explained in Step 3 link).

Step 5: To send dice in the group from the bot, now invoke below API from browser with correct bot id and chat id.

format:

https://api.telegram.org/bot<bot Id>/sendDice?chat_id=<chatid>

example:

https://api.telegram.org/bot1142710052:AAHjsyi7S9Dt_wgUNgoIV5OUDJt-gkdMpIk/sendDice?chat_id=-470547175

When you will invoke above API, you will get below dice in the chat group and it will show random number.


Kindly write in comments if you face any issue.


Thanks.


No comments:

Post a Comment

Telegram API to send Contact Number And Share Location via bot

Hi Friends, If you are working on any application and looking for an API to share location of any particular place in Telegram Group via bot...