Closed melissaboiko closed 8 years ago
Hello. Just some quick things I can come to think of from the README:
/setprivacy
command with BotFather to allow the bot to see all Telegram messages?~/.teleirc/config.js
?Yes, and yes:
Enable' - your bot will only receive messages that either start with the '/' symbol or mention the bot by username.
'Disable' - your bot will receive all messages that people send to groups.
Current status is: DISABLED
I also tested the API token via wget, seems to be working.
(Incidentally, this isn't the place for this, but it took me a while to find out that the Botfather only understands bot names preceded by '@'; and that the "Disable" command is case-sensitive...)
Weird. Something is stopping communication between the bot and the Telegram servers. Hmm, also, you did invite the bot via private chat with it -> click on name -> menu -> add to group? Just checking as there's this new inline bot feature - that doesn't work.
I had clicked the group name, then "add member", on the web interface. Now I tried from the bot's private chat, and still no results.
I just noticed that getUpdates
, via wget, returns an empty list for the API token (I don't know if this is expected). getMe
does return the username correctly.
In the web interface, I don't have an option of adding a bot via group name -> add member (it only lists Telegram contacts for me, no bots). I have to do that by selecting the bot from my contacts (first open a chat via the link BotFather gave me when creating the bot), then click on bot name -> add to group.
Either way if you did manage to correctly add the bot to your group (please still double check :smiley:), it's starting to sound like an issue on Telegram's side if calling the API manually doesn't work either...
BTW I clarified the usage of /setprivacy
command a little in 13aeff1de3dae49b9b925c98f69874cae70951a4, it was indeed a little dodgy.
When it lists the human Telegram contacts, if I type the bot name, it then lists the bot. At any rate the result seems to be the same; it says leoboiko invited teleirc_si_bot
on the group chat; and then the bot is listed on the left panel.
I'll delete the bot and try everything again, who knows...
Ah, I didn't know that, useful! Yeah, try at least generating a new API key and use that, this is sounding really odd...
No luck; same behavior with a brand new bot. Maybe I'm missing something obvious, or else it's something on Telegram's side...
Did you get it solved?
No, sorry, I'm at my wit's and the bot just doesn't seem to respond to messages. Feel free to close this report if you think the problem is unrelated to teleirc itself.
No I have the exactly same issue.
Huh, maybe this is an issue with teleirc then. Is @Xylix also using the version from npm, or have you built it from git? Are you able to test running any other Telegram bot - that could really narrow it down to teleirc then if another bot does work. I can't really think of a reason why that should be though...
Also if you guys have got time to debug some more, can you test running a build from latest develop
branch in git? There's instructions at the bottom of the README
on how to set teleirc up from git.
Let's keep this issue open, I definitely am interested in what the cause may be, will investigate more during the weekend when I hopefully have more time! :)
It was installed with npm-install.
Looks like I did not have time. ;p
Any progress on this?
I think I had a similar problem some time ago, when trying to setup a second bot for teleirc to be run alongside the first one.
For some reason I never understood, I couldn't get it to work (it never received updates from Telegram), even though I followed the exact same steps as for the first one.
I eventually gave up and used the first bot with more chan-group pairs because that one was working.
Sorry for the lack of information, I have no plan in trying again since the current situation works well enough for me, but still wanted to report that the two previous reporters may not be alone to have experienced a similar issue.
The way chat IDs are stored has now changed to better support multiple teleirc instances running on the same machine. So at least the problem reported by @zetrin should be fixed.
Closing for now. Let me know if this is still of an issue to someone.
I have the same problem and have no idea how to solve it.
It's supposed to be auto generated.
@guoyunhe please provide more info :)
I installed it on my openSUSE laptop with firewall (forbid all ports outside TCP/UDP).
teleirc can join irc channel #opensuse-cn with nickname opensuse_cn_bot. I also added opensuse_cn_irc_bot to the Telegram group chat opensuse_cn.
When I send message in IRC channel #opensuse-cn, it replies:
No chat_id set! Add me to a Telegram group and say hi so I can find your group's chat_id!
error: while reading chat ID for group opensuse_cn
warn: NOTE!
warn: =====
warn: Please add your Telegram bot to a Telegram group and have
warn: someone send a message to that group.
warn: teleirc will then automatically store your group chat_id.
error: No chat_id set! Add me to a Telegram group and say hi so I can find your group's chat_id!
But when I type something in Telegram group, it won't add any chat ids. And here is no ~/.teleirc/chat_ids or other files generated.
I turned off privacy mode of Telegram bot so it can read messages. But still
Debug output when receiving messages from Telegram:
debug: got tg msg:
{ message_id: 1459,
from:
{ id: 197472852,
first_name: 'Grover',
last_name: 'Chou',
username: 'GroverChouT' },
chat:
{ id: -1001091730439,
title: 'openSUSE 中文社群',
username: 'opensuse_cn',
type: 'supergroup' },
date: 1482946981,
sticker:
{ width: 512,
height: 280,
emoji: '🙈',
thumb:
{ file_id: 'AAQFABN_hb8yAASaOaci_DaksJMfAAIC',
file_size: 1492,
width: 128,
height: 70 },
file_id: 'BQADBQADSwADJ0oTCs0SsvHyP_3gAg',
file_size: 7810 } }
verbose: Telegram group not found in config: "openSUSE 中文社群", dropping message...
CyclingPingTimer 0: server silent for too long, let's send a PING
28 Dec 19:42:49 - SEND: PING 6
I solved my problem, it is just a naming confusion.
My Telegram group is called "openSUSE 中文社群" and the username is opensuse_cn. In teleirc's config.js, I write 'opensuse_cn' as Telegram group name. However, it only reads the display name of group, rather than username.
Suggestion: check both group display name and username. Username or short URL of group can also be treated as identity of a chat. This could help users avoid some mistakes.
Bot does not handle Telegram group name change quite well. ChatID does not change that often, but is it really needed to verify correct TG-group on received messages?
After renaming the Teleirc bot does operate just fine, until it restarts. Configuration file is not updated, in turn, whole group becomes unavailable to bot, until configuration file manual change and restart. This manual restart is time-consuming and annoying with tens of channels one bot handles - usually IRCnets won't allow more than two connections from single IP address (also 10 minutes grace time sometimes applies), so I need to use single Teleirc process to handle multiple TGgroup-IRCchannel bridges.
Bot does not handle Telegram group name change quite well. ChatID does not change that often, but is it really needed to verify correct TG-group on received messages?
Could you open a new issue if there isn't one already open yet? Sorry if you already did, I am behind my email by 500 messages and trying to read them all now.
@guoyunhe Ι love it when I come and see that a solution like yours still works after two years !
So for anybody here that will see this after years (like I did). What @guoyunhe said is simple:
If your group name has a url name like 'GroupName' but the display is 'Group Name' you should use the 'Group Name' in the tgGroup:'Group Name'
On console:
On the Telegram group, after inviting bot as
teleirc_si_bot
:No response.
If I write on IRC:
I installed teleirc via npm for debian wheezy.