Set up Telegram integration using the discourse-chat-integration plugin

Great Thanks! Will test it right now!! Great support here!!:muscle:

1 Like

Anyone? I’m clueless :<

I’m having this problem as well. Bot is unresponsive. Can’t get the chat ID at all :frowning:


@kuba-orlik Was finally able to do it!

Enter the following command on your browser.

https://api.telegram.org/bot<token>/getUpdates

It should return a JSON response like the following

{"ok":true,"result":{"id":**xxxxxxxxxx**,"is_bot":true,"first_name":"forumbot","username":"mappy_forum_bot","can_join_groups":true,"can_read_all_group_messages":false,"supports_inline_queries":false}}

Chat ID’s the value in the id key. Good luck!

3 Likes

Thanks!

Some time ago I entered /rant as a sole message into chat and the bot responded with the ID as well :man_shrugging:

2 Likes

I’m stuck here. Installed the plugin, added the token but can not see the “Add Channel” button anywhere.

Make sure you step through the main plugin instructions. Have you enabled the plugin, and the telegram provider? After that, you should see the UI:

I did enable the plugin and telegram provider. But I see no tabs:

(it’s in portuguese, but the UI is the same)

I’m running 2.5.0.beta7 on Digital Ocean / Ubuntu.

Yeah, that’s where I came from.

If I click the “settings” to the right of discourse-chat-integration, I end up here:

Sorry, the interface here isn’t ideal. You need to click “Integrações de Bate-Papo” on the left of the first screenshot. Don’t click the “settings” button

1 Like

Ahh, great! That’s kind of odd but finally found. Thanks for your help.

1 Like

I’m not able to get chat id from my telegram channel list and from a telegram group.

I created a bot and using Chat Integration Plugin, filled its token into Discourse settings. And now I added that bot to a telegram channel list and also to a telegram group (as admin).

Now I need to get channel IDs to create channels in https://bathindahelper.com/admin/plugins/chat/telegram. [/getchatid command doesn’t work in any]

Kindly guide, as why I’m not getting any chat id from Telegram bot/channel/group? I’m only able to get just one chat id, thru bot, thru this browser command:
https://api.telegram.org/bot1379583420:ASOMELETTERSVQHVc/getupdates

Also I’m confused, Am I supposed to get two different ‘chat-IDs’ from telegram? Or would I get 3, one for bot, another for channel and yet another for group?

Apologies if this is the wrong place to post, but this does appear to be broken at the moment. Installing the integration and setting up the bot goes fine however notifications never go through and chat commands never get replied to.

Querying the Telegram API for currently setup webhooks for the bot returns a webhook but without a URL so maybe that job is failing?

Heres the response form telegrams getWebhookInfo endpoint:

{
  "ok": true,
  "result": {
    "url": "",
    "has_custom_certificate": false,
    "pending_update_count": 17
  }
}

Edit: I manually ran DiscourseChat::Provider::TelegramProvider.setup_webhook() in the rails shell to setup the webhook and it sorta works but hooks from Telegram 404 when hitting Discourse:

POST /chat-integration/telegram/command/<redacted> HTTP/1.1" "-" "telegram_command/command" 404 3329 "-" 0.020 0.019 "-"

I’ve checked and the redacted part of of the token matches the chat_integration_telegram_secret setting in the database.

Not able to find any msg to send a test msg to Telegram bot. It seems to have happened after latest updates.

Even those posts exist in my site

Sorry for the very long delay here! I just pushed a fix which should help with these issues:

https://github.com/discourse/discourse-chat-integration/commit/1dc753771b427ba6ac07e62dd77797edee8c3aac

If you already have the plugin set up, you’ll need to disable and reenable the chat_integration_telegram_enabled setting for things to reconfigure correctly.

3 Likes

Thanks.
I disabled the said setting and then re-enabled the same. Hope that would be all that’s needed now.

Yes I’m also experiencing this too. It will react to join/leave/pin events and I did make sure "Group Privacy is enabled.

Any updates on this? Much appreciated. @david

1 Like

Hello, We’re experiencing the same problem as well. The group privacy setting is enabled for our bot. However, it keeps sending:

New rule: /[watch|follow|mute] [category] [tag:name]
(you must specify a rule type and at least one category or tag)
- watch – notify this channel for new topics and new replies
- follow – notify this channel for new topics
- mute – block notifications to this channel

Remove rule: /remove [rule number]
([rule number] can be found by running /status)

List rules: /status

Help: /help

Every time someone join or leave, Is there any solution for this?
Thanks.

1 Like

Currently, the solution is to create a channel and set the bot to broadcast to that channel. Then link that channel with the group chat.

Although, I’d prefer a cleaner solution.

2 Likes

I’m having the same issue regarding the bot reacting to pin/join/leave events and posting the help message.

It also reacts to users (any user) tagging it or replying to its posts by re-posting the Chat ID.

There is also the fact that it tags Telegram users with a ‘@’, but using their Discourse username. These often don’t match. In my opinion it should mention the user name, but without using the @ symbol.

Given that I broadcast different filters to multiple telegram chats, the workaround of using a channel is not doable for me.

Is there someone working on this plugin that could take care of these issues? @david – sorry to annoy you, but maybe you can answer this question.

I am willing to spend some time and attempt to sift through the code, but I’m not very familiar with Ruby on Rails and that would take time to adjust.

2 Likes