Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dcdunkan/file-upload-bot
Upload your local files & folders to Telegram chat.
https://github.com/dcdunkan/file-upload-bot
deno grammyjs telegram-bot typescript uploader
Last synced: 3 months ago
JSON representation
Upload your local files & folders to Telegram chat.
- Host: GitHub
- URL: https://github.com/dcdunkan/file-upload-bot
- Owner: dcdunkan
- License: mit
- Created: 2022-02-07T16:15:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-08T04:41:09.000Z (almost 3 years ago)
- Last Synced: 2024-10-03T14:22:19.055Z (4 months ago)
- Topics: deno, grammyjs, telegram-bot, typescript, uploader
- Language: TypeScript
- Homepage:
- Size: 2.6 MB
- Stars: 24
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File/Folder Upload Bot
A dead simple Telegram bot to upload your local files by file path or folder
path. Can be used as a backup helper. Originally, I created this bot to automate
backing up my files to Telegram while I change or reinstall my Linux distro. For
example, if you have a directory of videos, you can use this bot to upload them
for you. With some slight modifications, you can make it upload as you want.
With a [local bot API server](https://github.com/tdlib/telegram-bot-api) you can
also make it support files upto 2GB in size.### Demo usage preview
It's a bit older preview, but it still almost the same thing. The command
`/folder` has been changed to `/upload` after adding the support for both files
and folders.
- [x] It would be cool to have index messages of the uploaded files. (in groups
and channels)
- [ ] ZIP/RAR/TAR support?## Setup
You need [Deno](https://deno.land/) to run this bot. I created this bot on
v1.18.2. Also, I recommend setting up a
[local bot API server](https://github.com/tdlib/telegram-bot-api) and increasing
your file size limit.**1. Clone the repository**
```bash
git clone https://github.com/dcdunkan/folder-upload-bot
cd folder-upload-bot
```**2. Configure the `.env` variables**
You can either set them in a `.env` file in the root of this repo folder, or you
can set them using `export ADMIN_ID=1234567890` in your terminal.- `BOT_TOKEN`: Telegram Bot token. Get yours from https://t.me/BotFather.
- `ADMIN_ID`: The user ID of the owner. Because- you know, you don't want other
people downloading your private files, right?
- `API_ROOT`: Set this to the URL of your local api server, if you have one.**3. Run `bot.ts`**
```bash
deno run --allow-net --allow-read --allow-env bot.ts
```- `--allow-net`: For internet access.
- `--allow-env`: For accessing required ENV variables.
- `--allow-read`: To read files from your machine.If you have everything done right, your bot should be running, and you should
see a message `" started."` in your console.But if you're still having issues, please open an issue
[here](https://github.com/dcdunkan/file-upload-bot/issues) :)