Solved: Exited the chat bot from that telegram group. And understood that if I wanted the bot to be the part of that group, then that group’s chat ID need to have a channel and a channel rule under itself.
The Telegram integration works very well for channels but it’s unsuitable for groups-- it will spam its operation instructions every time a chat “event” happens (like someone joining or leaving the chat, or a message getting pinned). Even if you disable the slash commands entirely. Is there a way to get the bot to not respond to these events?
Do you have group_privacy disabled?
I tried that setting too and saw that it becomes every message as you say. Even with group_privacy enabled bots can still see these join/leave/pin events.
Hi,
I created the telegram bot, entered the key and activated the function in discourse. HTTPS is enabled (our site runs behind an apache proxy)
However the tab is not showing. Where can I debug this? I can not find any errors in the logs.
Is there a way to test the connection to telegram from inside the Discourse container?
thx
short update on this. I entered the discourse container with docker exec -it container /bin/bash. then I executed the following:
curl https://api.telegram.org/bot123456789:ABCDEfgh2ZojwyChMz0xuIo2Wvg4ww3XGI4g/getMe
this returned an ok response with the name of my bot etc.
however the integration with discourse does not work yet. Is there a log file somewhere so that I can debug this? Any help is appreciated.
Is the force_https site setting enabled? Is the chat_integration_enable_telegram setting enabled?
Hi,
yes both settings are enabled.
HTTPS is working fine, also with login integration with fb, google, tw.
what could be the cause, or where could I find the logs?
thx
I am also facing same issue since last 4-5 days on my new discourse instance.
Hi @david, is there any way i can see the logs.
On my old instance notifications are working good with telegram bot, but in newer instance Chat ID is not getting generated. The curl command mentioned above is giving output as true from discourse instance. Other oauth plugins like google. twitter are working without any issues.
Thanks in advance.
I just got it working on a new Discourse install by firing up rails c and manually running DiscourseChat::Provider::TelegramProvider.setup_webhook()
Hope that helps!
Thanks a lot @codatory
@codinghorror Thanks for this awesome platform ![]()
It worked ![]()
can you elaborate a bit on this? should I run these commands from within the container? in which directory? I’m not a rails expert. thx! : )
Yeah; so you enter the container and run
rails c
Then wait a bit for it to load up. Once it’s loaded up you can paste in
DiscourseChat::Provider::TelegramProvider.setup_webhook(); exit
Then you can exit out of the container and it should be working.
THANK YOU, this solved my issue But had to toggle the plugin off in my admin. Then on. Then run this.
個人チャットでは正常に動作するのですが、グループでは動作しません。自分とボットの間のチャットとして直接通知が届きます。
ボットをプライベートグループに追加し、ボットにグループ内の管理者権限を与えました。また、Discourseプラグインの設定でそのグループをチャンネルとして追加しました。しかし、グループ(Telegramチャンネル)にテスト通知を送信しようとすると、常に422エラーが発生します。何を試しても変わりません。このエラーはDiscourseのTelegramプラグインのチャンネル設定内で発生しています。
どなたかお手伝いいただけないでしょうか。ぜひグループでこの設定を完成させたいのです。
この PR により、この問題は解決されています。
最も一般的な問題は、無効な API キーです。コピー&ペーストが正しく行われているか、誤って前後にスペースが入っていないか確認してください。
API トークンは正常に動作しており、Telegram のボットからプライベートメッセージとして通知を受け取ることができます。ただし、グループには送信できません。また、チャンネル内で誰かがメッセージを送るたびに、ボットが「このチャンネルは chatID: … で設定されています」と表示され、非常に煩わしいです。
現在、以下のエラーが発生しています。
Errno::ECONNRESET: Connection reset by peer - SSL_connect
from /usr/local/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock’
この設定をどのように切り替えても、同じ問題が発生しています。何か回避策はありますか?
通知の設定を試しているのですが、ボットを Telegram グループに追加しても、チャット ID が送信されません。何度試しても失敗してしまいます :<
トラブルシューティングのために何ができるでしょうか?rails コンソールコマンドの実行は既に試しました。