最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to get Telegram Bot Super Group ID? - Stack Overflow

programmeradmin0浏览0评论

How to get Telegram Bot Super Group ID?

With This Code:

bot.on('message', (msg) => {
  console.log(msg);
});

I Can See my Private Channel ID in forward_from_chat: { id: -1001125265425, of the object, That is Okey.
But How Can I Get Super Group ID?

How to get Telegram Bot Super Group ID?

With This Code:

bot.on('message', (msg) => {
  console.log(msg);
});

I Can See my Private Channel ID in forward_from_chat: { id: -1001125265425, of the object, That is Okey.
But How Can I Get Super Group ID?

Share Improve this question edited Jan 25, 2019 at 16:04 Saeed Heidarizarei asked Nov 20, 2017 at 0:41 Saeed HeidarizareiSaeed Heidarizarei 8,95623 gold badges66 silver badges111 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

First of all, you should add a bot to that group.

Then if the group is public (has @username), just send message to the group and read reply from Telegram server, it will be of type Message, and Message->Chat->Id is group's ID.

If the group is private (doesn't have a @username), then you can mention a bot in your message and, again, read reply from Telegram server.

Or you can use some third-party bots, for example, @my_id_bot, which I made specifically for this.

发布评论

评论列表(0)

  1. 暂无评论