I’m working on a Telegram bot that forwards user questions to an admin group where multiple people can help answer them. The goal is to create an anonymous system where admins can respond to questions without seeing who originally asked.
I added a “Reply to this question” button in the group chat, but I’m having trouble getting it to function properly. The button should allow admins to send responses back to the original questioner while keeping their identity hidden.
Is it technically possible to create this kind of anonymous messaging system? Can a bot relay responses from group admins back to individual users without revealing personal information like user IDs? I’m wondering if there are existing bots that handle this type of anonymous communication feature.
Any guidance on implementing this anonymous relay system would be really helpful.
Totally doable - I’ve built something like this before. Use the bot as a middleman with its own conversation database. Don’t expose user details to either side. When someone asks a question, store it with a unique conversation ID instead of showing the actual user ID to admins. When an admin hits reply, your bot looks up which user matches that conversation ID and forwards the response. The tricky bit is callback data from inline keyboards - there’s a 64-byte limit. I used shorter hash IDs that reference longer conversation records in my database. Also handle callback queries properly and edit messages after responses go out. Telegram’s bot API handles relay functionality well. Admins see the bot as the question sender, users see the bot as the response sender. Perfect anonymity as long as you don’t leak user info in your message formatting.
Yes, it is entirely feasible to implement such a system effectively. You can establish a mechanism where your bot assigns temporary tokens for each inquiry, masking user identities from the admins. The database of your bot can maintain the mapping of tokens to users securely. For the response functionality, incorporate the conversation token in the inline keyboard callback data. Upon an admin’s reply, your bot retrieves the original user from the database using the token and sends the response. It’s crucial to also manage conversation status for follow-ups and to implement error handling to address situations where users may block the bot after submitting a query, as this could disrupt the flow of communication.
Definitely possible! I built something like this last year. Use callback_data with conversation references instead of real user IDs. Your bot acts as the middleman - admins only see conversation threads, never actual users. Just watch out for users blocking the bot mid-conversation - that’ll break everything lol