Comments (27)
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.
from teleirc.
Hello. Just some quick things I can come to think of from the README:
- Did you remember to use the
/setprivacy
command with BotFather to allow the bot to see all Telegram messages? - Did you put your Telegram Bot API token into
~/.teleirc/config.js
?
from teleirc.
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...)
from teleirc.
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.
from teleirc.
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.
from teleirc.
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
from teleirc.
BTW I clarified the usage of /setprivacy
command a little in 13aeff1, it was indeed a little dodgy.
from teleirc.
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...
from teleirc.
Ah, I didn't know that, useful! Yeah, try at least generating a new API key and use that, this is sounding really odd...
from teleirc.
No luck; same behavior with a brand new bot. Maybe I'm missing something obvious, or else it's something on Telegram's side...
from teleirc.
Did you get it solved?
from teleirc.
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.
from teleirc.
No I have the exactly same issue.
from teleirc.
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! :)
from teleirc.
It was installed with npm-install.
from teleirc.
Looks like I did not have time. ;p
Any progress on this?
from teleirc.
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.
from teleirc.
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.
from teleirc.
Closing for now. Let me know if this is still of an issue to someone.
from teleirc.
I have the same problem and have no idea how to solve it.
from teleirc.
It's supposed to be auto generated.
from teleirc.
@guoyunhe please provide more info :)
from teleirc.
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
from teleirc.
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
from teleirc.
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.
from teleirc.
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.
from teleirc.
@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'
from teleirc.
Related Issues (20)
- Telegram codeblocks should go into pastebin and teleirc might take care of it like images or stickers HOT 5
- Only oneway HOT 3
- "not found in config" errors after upgrade HOT 9
- TypeScript "rewrite"
- Social card for this repo heads to 404 error HOT 1
- Say something when files are uploaded even if mediaupload is disabled
- Optionally give IRC users Telegram links for stickers and files. HOT 2
- Infinite no chat_id set when group is created and updated to supergroup before enabling private message handling HOT 2
- Add support for CertFP
- SASL plain fails HOT 7
- Current irc framework does not handle rejoins
- IPFS support for file uploads
- "left_chat_participant", "new_chat_participant" and "new_chat_photo" messages should be disabled when config.soloUse is active
- "error: channel <channel> not found in config!" needs a more verbose log level
- teleirc might spam IRC channels with error messages
- use XDG_CONFIG_HOME
- Just show image url and don't serve the image HOT 2
- teleirc not relaying messages from other Telegram bots to IRC HOT 2
- Meta: is the Telegram group relayed to freenode #teleirc ?
- Is teleirc maintained? Should the repository point to matterbridge instead and be archived? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teleirc.