coastalport.blogg.se

Telegram translate bot
Telegram translate bot











# telegram.Bot(TelegramToken).send_message(user_id,anslate(user_text, dest=lang_type). Global paused # inform function to use external variable instead of local variable paused = False # created outside functions (multiprocessing would need to keep it in file or database).Ĭode needs also to check user ID so only admin could do this.

#Telegram translate bot code#

Not tested code - I'm not sure if module runs all in one thread And use message /start to set it False, and /end to set it True. This feature is not self-activated so you will need to find it and turn it on. You can talk to new people from all around the world Send Message. You could use global variable to control when it can translate and when it can't do it - ie, paused. I can translate your messeges to any language. As a reply you'll get the voice message with a translation to a target language. Just choose languages to translate with /lang command and send a voice message. To have the chatbot up and running through your local system, clone the repository locally and run: python2. Description This bot can translate voice messages between dozens of languages. Translation Chatbot on Telegram Getting started.

telegram translate bot

I don't think this will work and actually doesn't. Start communication with Voice translator bot in your Telegram, by clicking on the 'Send Message' button. Telegram.Bot(TelegramToken).send_message(user_id, reply_to_message_id=_id, text=c) Telegram.Bot(TelegramToken).send_message(user_id, reply_to_message_id=_id, text=b)Ĭ = 'es : ' + anslate(user_text, dest=lang_type).text + '\n' + 'ko : ' + anslate(user_text, dest=lang_type).text + '\n' + 'en : ' + anslate(user_text, dest=lang_type).text

# telegram.Bot(TelegramToken).send_message(user_id,anslate(user_text, dest=lang_type).text)ī = 'en : ' + anslate(user_text, dest=lang_type).text + '\n' + 'ko : ' + anslate(user_text, dest=lang_type).text + '\n' + 'es : ' + anslate(user_text, dest=lang_type).text Telegram-Translator Setting up bot Replace with your own telegram bot token obtained from BotFather, in translate. telegram translate bot

Telegram.Bot(TelegramToken).send_message(user_id, reply_to_message_id=_id, text=a) It translates all messages that every member types in the group.īut sometimes it's annoying when loads of texts are uploaded so I want to pause some time and restart by typing some order likeĭo you think it's going to be possible to do? I want some hints text=()Ī = 'ko : ' + anslate(user_text, dest=lang_type).text + '\n' + 'en : ' + anslate(user_text, dest=lang_type).text + '\n' + 'es : ' +anslate(user_text, dest=lang_type).text I have a translator bot in telegram group.











Telegram translate bot