V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
firefox12
V2EX  ›  Telegram

telegram bot 好像收不到群组的消息

  •  
  •   firefox12 · 2020-01-18 16:05:18 +08:00 via iPhone · 3723 次点击
    这是一个创建于 1771 天前的主题,其中的信息可能已经有所发展或是发生改变。
    申请了一个 bot 用 go 的库 简单写了一个 demo,目前这个 bot 去加某些群组 会告诉我失败,这是因为这些群不允许吗?
    其次这个 bot 可以收到 我对它说的话,但是已经加入的群组里的消息 收不到。请问是不是要设置什么东西?
    第 1 条附言  ·  2020-01-19 10:29:50 +08:00
    我发现 我好像知道原因了 telegram bot 只能被加入你管理的 group 或者 channel. 否则 大概率是加不进去的。

    我发现 即使加进去了 也没收到消息。

    想做个 telegram bot 把自己已经加入的群 的群里的消息 汇集起来的想法 好像不能这样实现
    7 条回复    2020-03-17 12:50:42 +08:00
    blueset
        1
    blueset  
       2020-01-20 23:52:53 +08:00   ❤️ 1
    Telegram Bot 收不到群组消息是因为 Bot 的隐私设置没有关闭,Bot 默认在群组里面只能收到带指令的消息。要接受所有消息的话必须找 @Botfather 把这个设定关掉。
    firefox12
        2
    firefox12  
    OP
       2020-01-21 17:29:35 +08:00
    @blueset

    好像 不可以

    How to join my Telegram Bot to PUBLIC channel
    Ask Question
    Asked 2 years, 10 months ago
    Active 6 months ago
    Viewed 10k times

    9


    3
    My question is: how to join my telegram bot to a telegram public channel that I am not administrator of it, and without asking the channel's admin to add my bot to the channel?

    maybe the chatId of channel or thru link of channel?

    Thank you in advance :)

    edit------ I have heard that some people claim to do this join their bot to channels, and scrape data. So if Telegram does not allow it, how can they do it? can you think of any work around? Appreciate your time?

    python telegram telegram-bot python-telegram-bot
    shareimprove this question
    edited Mar 10 '17 at 4:53
    asked Mar 8 '17 at 14:44

    Nima
    69933 gold badges88 silver badges1313 bronze badges
    add a comment
    3 Answers
    activeoldestvotes

    8

    Till today, only the Channel Creator can add a bot (as Administrator or Member) to the Channel, whether public or private. Even the other Channel Administrators cannot add a normal member leave alone adding a bot, rather they can only post into the channel. As far as joining the bot via the invite link, there is yet no such method in Bot API to do so. All such claims of adding the bot to a channel by non Creator are false.


    所以必须是创建者才可以,简单的想用 bot 做 telegram 的爬虫是不行的。 我尝试加入 channel 都失败了。即使加进去的
    也收不到群消息。
    firefox12
        3
    firefox12  
    OP
       2020-01-21 17:31:02 +08:00
    Ask Question
    Asked 3 years, 8 months ago
    Active 1 year, 11 months ago
    Viewed 122k times

    32


    12
    I been trying to add a bot to my Telegram group in Android Device but I am not able to do so. I tried @bot_name, /bot_name but it doesn't work. Can anyone tell me is it possible to add a bot to the group or should I create a new bot using Telegram API(not bot API) so I can add the contact number to the group?

    bots telegram telegram-bot
    shareimprove this question
    asked May 20 '16 at 4:45

    bazinga
    1,08422 gold badges1010 silver badges2525 bronze badges
    add a comment
    3 Answers
    activeoldestvotes

    37

    Edit: now there is yet an easier way to do this - when creating your group, just mention the full bot name (eg. @UniversalAgent1Bot) and it will list it as you type. Then you can just tap on it to add it.

    Old answer:

    Create a new group from the menu. Don't add any bots yet
    Find the bot (for instance you can go to Contacts and search for it)
    Tap to open
    Tap the bot name on the top bar. Your page becomes like this: Telegram bot settings
    Now, tap the triple ... and you will get the Add to Group button: Adding the bot
    Now select your group and add the bot - and confirm the addition
    shareimprove this answer
    edited Apr 5 '17 at 16:05
    answered Oct 21 '16 at 11:39

    David Niki
    70477 silver badges1111 bronze badges
    This was by far the easiest way. But please make those screenshot inline. Thanks. – Benny Bottema Oct 29 '16 at 9:42
    add a comment

    23

    You have to use @BotFather, send it command: /setjoingroups There will be dialog like this:

    YOU: /setjoingroups

    BotFather: Choose a bot to change group membership settings.

    YOU: @YourBot

    BotFather: 'Enable' - bot can be added to groups. 'Disable' - block group invitations, the bot can't be added to groups. Current status is: DISABLED

    YOU: Enable

    BotFather: Success! The new status is: ENABLED.

    After this you will see button "Add to Group" in your bot's profile.


    这个我已经做过了



    看来只能用 telegram 的客户端来做这个事情了。
    MooRider
        4
    MooRider  
       2020-01-23 12:31:32 +08:00
    就用 user bot 呗,,创建一个用户, 当作 bot, 能实现的功能是一样的, 还没有 bot 那些限制
    firefox12
        5
    firefox12  
    OP
       2020-01-23 12:59:22 +08:00
    @MooRider 有什么相关资料可以分享下吗?
    v66ex
        6
    v66ex  
       2020-03-15 23:07:35 +08:00   ❤️ 1
    bot 不能主动去加群组或是频道
    你只能使用个人账号作为 bot,关键词 telethon
    firefox12
        7
    firefox12  
    OP
       2020-03-17 12:50:42 +08:00
    @v66ex 我看看
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1590 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 17:03 · PVG 01:03 · LAX 09:03 · JFK 12:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.