Head over to Code.xyz, Standard Library’s online code editor. ![]() Step 2: Add Some Basic Functionality with Standard LibraryĬode.xyz - Standard Library’s free online editor for APIsīefore we get to the translating, let’s just get a basic “hello world” example working. I went with Some text to translate… and that gets displayed like this. The BotFather will ask for some placeholder text. Type /setinline and then click on the bot you just created. This lets people type in any chat to use your bot, rather than having to open a chat as we did with the BotFather. Now we need to enable inline mode for the bot. Copy that down, we’ll need it in just a moment. After this step, the BotFather will return a token used to control your bot. I, again, went with notoriaga_test_bot, but you’ll have to pick something different. This is how people will call your bot, so it must be unique. Next, the BotFather will ask for a username (i.e., ). This is not the username of the bot, so it doesn’t have to be unique. With your conversation started, type /newbot and the BotFather will ask for a name. Imposters! You want the one with the blue check. There might be a few options, make sure you pick the one with the “verified” check-mark. ![]() Whether you use the Telegram web app, or your phone’s respective client, go to the search bar and enter “botfather”. You choose to ask for Telegram bot of your very own. You’ve got the opportunity to ask for one gift, which of course he cannot refuse. It’s the day of the BotFather’s daughter’s wedding. And with the help of our online editor Code.xyz, you can ship to Standard Library with zero setup or installation on your local machine. We strive to enable anybody to turn simple JavaScript functions into production-ready APIs, in seconds. ![]() If you’re not familiar with Standard Library, we combine a scaleable compute layer, along with automatically generated documentation, authentication, billing, and more. The Telegram bot API and Watson will be brought together by Standard Library. The translation will be handled by IBM Watson’s Language Translator. This tutorial will walk you through creating a Telegram bot that can translate text into a few different languages. It’s all done from within the app, by talking to another bot called the BotFather. It also just so happens that they also have a pretty slick interface for creating bots. Telegram is instant messaging and voice service with a focus on privacy. Build a Telegram Bot that Translates Text in 3 Steps with Node.js and Code.xyz - By Steve Meyer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |