๐ Build Your Own Telegram Support Bot
Build your own Telegram bot that lets users message the admin, and the admin reply back to them privately through the bot. No more missed DMs or untraceable users โ pure 1:1 support experience!
๐ง Command Name: *
๐งช Full Code:
How It Works:
- Users send messages to the bot
- Bot forwards to the admin
- Admin replies to that message โ and bot sends it back to the user
๐ Posted by:
@BotVerseRavi
#TPY #TeleBotPython #TeleBotCreator #TBC #BotVerseRavi
Build your own Telegram bot that lets users message the admin, and the admin reply back to them privately through the bot. No more missed DMs or untraceable users โ pure 1:1 support experience!
๐ง Command Name: *
๐งช Full Code:
ADMIN_CHAT_ID = "0123456789" # replace the value with your User ID
if message.text == "/start":
bot.sendMessage(
chat_id=message.chat.id,
text="๐ Send your message, our team will respond soon.",
reply_to_message_id=message.message_id
)
elif message.chat.id == int(ADMIN_CHAT_ID):
if message.reply_to_message:
orig_msg_id = str(message.reply_to_message.message_id)
user_id = Bot.getData("reply_user_" + orig_msg_id)
if user_id:
try:
bot.sendMessage(
chat_id=int(user_id),
text=message.text
)
except:
bot.sendMessage(
chat_id=ADMIN_CHAT_ID,
text="โ Failed to send",
reply_to_message_id=message.message_id
)
else:
bot.sendMessage(
chat_id=ADMIN_CHAT_ID,
text="โ ๏ธ User not found for this reply.",
reply_to_message_id=message.message_id
)
else:
try:
sent = bot.forwardMessage(
chat_id=ADMIN_CHAT_ID,
from_chat_id=message.chat.id,
message_id=message.message_id
)
Bot.saveData("reply_user_" + str(sent.message_id), str(message.chat.id))
except:
pass
How It Works:
- Users send messages to the bot
- Bot forwards to the admin
- Admin replies to that message โ and bot sends it back to the user
๐ Posted by:
@BotVerseRavi
#TPY #TeleBotPython #TeleBotCreator #TBC #BotVerseRavi
Forwarded from BotVerse by Ravi
๐ Build Your Own Telegram Support Bot
Build your own Telegram bot that lets users message the admin, and the admin reply back to them privately through the bot. No more missed DMs or untraceable users โ pure 1:1 support experience!
๐ง Command Name: *
๐งช Full Code:
How It Works:
- Users send messages to the bot
- Bot forwards to the admin
- Admin replies to that message โ and bot sends it back to the user
๐ Posted by:
@BotVerseRavi
#TPY #TeleBotPython #TeleBotCreator #TBC #BotVerseRavi
Build your own Telegram bot that lets users message the admin, and the admin reply back to them privately through the bot. No more missed DMs or untraceable users โ pure 1:1 support experience!
๐ง Command Name: *
๐งช Full Code:
ADMIN_CHAT_ID = "0123456789" # replace the value with your User ID
if message.text == "/start":
bot.sendMessage(
chat_id=message.chat.id,
text="๐ Send your message, our team will respond soon.",
reply_to_message_id=message.message_id
)
elif message.chat.id == int(ADMIN_CHAT_ID):
if message.reply_to_message:
orig_msg_id = str(message.reply_to_message.message_id)
user_id = Bot.getData("reply_user_" + orig_msg_id)
if user_id:
try:
bot.sendMessage(
chat_id=int(user_id),
text=message.text
)
except:
bot.sendMessage(
chat_id=ADMIN_CHAT_ID,
text="โ Failed to send",
reply_to_message_id=message.message_id
)
else:
bot.sendMessage(
chat_id=ADMIN_CHAT_ID,
text="โ ๏ธ User not found for this reply.",
reply_to_message_id=message.message_id
)
else:
try:
sent = bot.forwardMessage(
chat_id=ADMIN_CHAT_ID,
from_chat_id=message.chat.id,
message_id=message.message_id
)
Bot.saveData("reply_user_" + str(sent.message_id), str(message.chat.id))
except:
pass
How It Works:
- Users send messages to the bot
- Bot forwards to the admin
- Admin replies to that message โ and bot sends it back to the user
๐ Posted by:
@BotVerseRavi
#TPY #TeleBotPython #TeleBotCreator #TBC #BotVerseRavi
๐ฅ3๐1 1