telegram 機(jī)器人創(chuàng)建

創(chuàng)建機(jī)器人名稱(chēng)

找到BotFather 用戶(hù)

  • 輸入: /newbot
    botFather: Alright, a new bot. How are we going to call it? Please choose a name for your bot.
  • 輸入:vic
    botFather: Good. Now let's choose a username for your bot. It must end in bot. Like this, for example: TetrisBot or tetris_bot.
  • 輸入:vicBot
    botFather: Done! Congratulations on your new bot. You will find it at t.me/MetaDerbystatisticsBot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.

Use this token to access the HTTP API:
53333369:****************uPjP
Keep your token secure and store it safely, it can be used by anyone to control your bot.

For a description of the Bot API, see this page: https://core.telegram.org/bots/api

創(chuàng)建群

把bot 拉入群中

群中發(fā)送

/my_id @vicBot
https://api.telegram.org/bot123456789:jbd78sadvbdy63d37gda37bd8/getUpdates
從返回中找到:

"chat":{"id":-zzzzzzzzzz,-zzzzzzzzzz // id 即為chat_id

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容