Connect with random people instantly. Find them in the world’s largest group chat. The “Omegle” for people who don’t want to get creepy messages from old people and weird strangers! Free private chat forever, and meet people along the way. Zonish is also great for you to contact your friends anonymously. Zonish.com is also the best way to contact your friends anonymously, without your parents finding out! Our site is pretty much a way for you to launder your chats. Statistically, the chance of someone finding your chat is impossible, unless they are with you in real life, looking at your computer or device. We hope to make the internet a safer and more secure place for everyone to chat on, without the risks of being spied on, by anyone untrustworthy. Talking to strangers online can be sketchy, so if you are ever talking to someone you don’t feel comfortable with, please just leave the chat. If you are reading this, please let us know if you have any ideas, questions, or concerns for our website here: [email protected] Thanks for reading and enjoy chatting!

Library Telegram Bot

Here we will create a telegram bot which will send random book of given genre to user.

We will use an open source project “draw your bot” (https://github.com/Tsitko/drawyourbot) to generate a bot. It allows to draw a bot structure in draw.io instead of coding it.

So we need to clone drawyourbot project and install its requirements (the instructions of how to install requirements are here: https://github.com/Tsitko/drawyourbot#install-requirements).

And we also need to register our bot in telegram (the instruction is here: https://core.telegram.org/bots#6-botfather)

As we have a project we need a library (books sorted by genre). For this bot I will use a very small library like that:

Project and library structure

And we also need a function which will get one of those book so we could send it to user. Here is that function code (you should put it into bots directory to the file book_funcs.py):

Trending Bot Articles:

1. Chatbot Trends Report 2021

2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

4. An expert system: Conversational AI Vs Chatbots

And the only thing left is todraw a bot structure:

bot structure in drawio

You need to change bot_token to your bots token and if you are using your own function, you need to change _functions_book_funcs::find_book(genre) to your own function.

And as you are done, you need just to generate a bot (instructions: https://github.com/Tsitko/drawyourbot#generating-bot-code).

And you have a bot which you can run and test:

Don’t forget to give us your 👏 !


Library Telegram Bot was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.