Giter Club home page Giter Club logo

ftp-telegram-bot's Introduction

FTP-telegram-bot

A Telegram bot project by Python to upload files from Telegram to the server using FTP protocol.

I can say that this robot is a file-to-link conversion telegram robot

This is a Telegram bot and its working process is as follows:

FlowChart

1-Download

First, Download source files on a server equipped with Python

2-Install Python Librarys

You need 3 library to run this robot.(Pyrogram, aioftp, asyncio) To install libraries, we follow two methods: manual installation and automatic installation. manual installation:

  • pip install Pyrogram
  • pip install aioftp
  • pip install asyncio

automatic installation:

  • pip install -r requirements.txt

3-Config file config.py

You must enter some information in the config.py file.

  • In line 4 : you must replace your api_id with 0000000.
  • In line 5 : you need to replace your api_hash with e28cc5d85c66rr785422fe3bf50e61f
  • In line 8 : you should replace your bot token that you received from botfather with 8569471455:JJkiyA6MmuB570F4t5yVLmi92tWRqQi6rty.
  • In line 11 : you must specify a name for your robot session, which is not important and you can leave it alone.
  • In line 15 : you must enter the bot's admin ID, which is a numeric value. You can get your numerical ID by sending a message to the @myidbot bot in Telegram.
  • In line 18 : you must enter the numerical ID of the robot manufacturer so that the robot bugs are sent to the manufacturer so that its problems can be solved in the next versions. You can change it.
  • In line 23 : When a file is sent to the bot, first that file is downloaded from the Telegram repository and stored in the bot's server. Here you need to specify its temporary storage path. For example, I set the bot to save the downloaded file in the current path (the path where config.py file is located).
  • In line 27: you must specify the address of the file storage directory on the host to which you have FTP access.
  • In line 31: you must enter the IP address of your FTP host.
  • In line 32: You must enter your FTP access username.
  • In line 33: You must enter your FTP access password
  • In line 34: You must enter the address of your domain.

4-Run file bot.py

Now everything is ready for you to launch your bot.

  • To do this, just enter the 'python3 bot.py' command.

Notice

Because the FTP information is stored in the config.py file. Make sure you run the bot in a safe place.

ftp-telegram-bot's People

Contributors

aliazizi0906 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ftp-telegram-bot's Issues

از کار افتادن ربات

سلام
مممنون بابت پروژه ربات
یک مشکلی هست ربات از کار میفته و نیاز میشه هر چند وقت دستور python3 bot.py وارد بشه تا دوباره ربات فعال بشه.
ممنون میشم راهنمایی کنید مشکل چطور برطرف میشه ؟

A little problem

line 122 of bot.py file needs a little correction to work fine
"app.send_mesage" --> "app.send_message"

Thank you for your great bot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.