Skip to content

Sarah the love Bot! Using the telebot library & Python, this script provides expert advice on communication, support, appreciation, honesty, forgiveness & more. With a pre-defined list of advice statements & random selection, you'll get personalized tips for a healthy relationship. Initialize with API key & start chatting now!"

Notifications You must be signed in to change notification settings

athul-peter/Sarah-the-Love-bot-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Sarah-the-Love-bot-

Sarah the love Bot! Using the telebot library & Python, this script provides expert advice on communication, support, appreciation, honesty, forgiveness & more. With a pre-defined list of advice statements & random selection, you'll get personalized tips for a healthy relationship. Initialize with API key & start chatting now!"

Introduction

This repository contains a code for a relationship advice Telegram bot. The bot utilizes the telebot library to interact with Telegram's Bot API and respond to user requests with relationship advice. The advice is stored in a list of strings and is selected randomly from the list when the bot receives a request.

Requirements

To run this code, you will need to have Python installed on your computer, as well as the telebot and random libraries. To install these libraries, you can use the following command:

pip install telebot pip install random

Usage

Clone or download the repository to your computer. Create a Telegram bot by talking to the BotFather. Replace the empty string in the code with the token provided by the BotFather. Run the code using the following command:

python bot.py

Start a conversation with the bot in Telegram and send a message to receive a random piece of relationship advice.

Code Structure

The code is structured as follows:

Import the required libraries: telebot and random. Create a telebot object with the provided token. Define a list advices of strings, which contains all of the relationship advice. Define a function give_advice that selects a random piece of advice from the advices list and returns it. Use the bot.message_handler decorator to define a function that will be triggered when the bot receives a message. The function calls give_advice and sends the returned advice as a message to the user. Start the bot by calling bot.polling().

Conclusion

This Telegram bot is a simple example of how to use the telebot library to interact with the Telegram Bot API. You can use this code as a starting point for creating your own Telegram bots, or modify the code to add additional functionality.

About

Sarah the love Bot! Using the telebot library & Python, this script provides expert advice on communication, support, appreciation, honesty, forgiveness & more. With a pre-defined list of advice statements & random selection, you'll get personalized tips for a healthy relationship. Initialize with API key & start chatting now!"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages