/tele_uploader

Telegram bot able to upload large file, also on Dropbox!

Primary LanguagePHPGNU Affero General Public License v3.0AGPL-3.0

tele_uploader

Telegram bot able to upload large file, also on Dropbox!

Installation

tele_uploader requires PHP >= 5.6.0 and Composer to run.

Dependencies installation

To be able to run tele_uploader, you must install all the dependencies listed in composer.json; to do that, type:

$ composer install

This process can take a while...

Configuration

After all dependencies are satisfied, you can start to configure the environment variables.

For convenience, I've listed them inside the env.sh file so that the only thing you have to do is open it and fill with your keys.

Keys meaning

We have just four keys:

  • BOT_TOKEN: the unique token generated by @BotFather
  • DB_ID: the unique dropbox app key
  • DB_SECRET: the unique dropbox app secret
  • DB_TOKEN: the unique dropbox app instance token

For the Dropbox keys, you have to create a new Dropbox application here.

In the following picture, I'll show you where to find each key. pic_db

Run!

Now we're ready to execute the bot!

Let's import the environment variable, with:

$ source env.sh

and then...run!

$ php bot.php

Commands

When you send to the bot a direct download link or a media message, it will download it in it's personal directory. After that, you can use the following commands:

  • /telegram: will upload the file to your Telegram chat
  • /dropbox: will upload the file to the Dropbox registered application directory

These actions can be also used with the command /upload, that offer to you the ability to navigate your file system to choose what to upload.

Credits

A special thanks to Daniil Gentili aka danog that created MadelineProto.