Metadata-Version: 2.2
Name: TeleBee
Version: 1.0
Summary: A Python library for organizing and loading bot functions from external files for the Telebot library. Simplifies bot code management by allowing the use of separate files for bot commands and functions.
Home-page: https://t.me/midoghanam
Author: Mohammed Ahmed Ghanam
Author-email: Mohamed Ahmed Ghanam <mghanam883@outlook.com>
License: MIT
Project-URL: Homepage, https://t.me/mido_ghanam
Project-URL: TelegramChannel, https://t.me/midoghanam
Project-URL: EgyptianProgrammers, https://t.me/egyptionprogrammers
Project-URL: Whatsapp, https://wa.me/201101023681
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# TeleBee library provided by Mohammed Ghanam.

![PyPI - Version](https://img.shields.io/pypi/v/TeleBee?color=blue&label=version)  
![Python](https://img.shields.io/badge/python-3.6%2B-blue)
![License](https://img.shields.io/badge/license-MIT-green)  
![Status](https://img.shields.io/badge/status-active-success)  

--------

`TeleBee` is a Python library designed to simplify the management and organization of code in bot projects using the `Telebot` library. This library allows you to load code from Python files located in specific directories without interfering with the `polling` or `infinity_polling` processes. You can write your code normally, and the library will automatically load and organize it.

## Features

- Load code from Python files in specified directories.
- Does not interfere with `polling` or `infinity_polling` processes.
- A flexible and easy-to-use library that allows developers to write code normally in separate files.
- Supports organizing code in different directories.

## Installation

1. First, install the `pyTelegramBotAPI` library (if not installed already):

```bash
  pip install pyTelegramBotAPI
``


##Usage

- 1. Setting up TeleBee:

At the beginning of your Python file, import the library, create a TeleBee object, and pass in your bot's token.
``python
from telebot import TeleBot
from telebee import TeleBee

# Set up the bot using your bot's token
bot = TeleBot('YOUR_BOT_TOKEN')

# Set up TeleBee and load code from specified directories
telebee_bot = TeleBee(function_dirs=['start', 'functions'])
telebee_bot.load_functions()

# The developer controls polling separately
bot.infinity_polling()
``

- 2. Adding code:

The developer writes their code in Python files within the specified directories. For example, the developer can add files like start.py or functions/another_function.py.

Example of start.py:

``python
@bot.message_handler(commands=['start'])
def start_message(message):
    bot.reply_to(message, "Welcome to the bot!")
``

Example of functions/another_function.py:

``python
@bot.message_handler(commands=['hello'])
def hello_message(message):
    bot.reply_to(message, "Hello, how are you?")
``

- 3. Customizing directories:

You can customize the directories containing the code by passing them to TeleBee in the function_dirs argument.

``python
telebee_bot = TeleBee(function_dirs=['your_custom_folder', 'another_folder'])
telebee_bot.load_functions()
``

## For Contact:

- My telegram Account: [@midoghanam](https://t.me/midoghanam)
- My Channel: [@mido_ghanam](https://t.me/mido_ghanam)

## Best Regards ♡
