Metadata-Version: 2.1
Name: max2tg
Version: 1.0.0
Summary: Bridge between MAX and Telegram
Author: Andrey DarkCat09
License: Copyright © 2025 Andrey DarkCat09
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://git.dc09.xyz/DarkCat09/max2tg
Project-URL: Source, https://git.dc09.xyz/DarkCat09/max2tg
Keywords: max,telegram,bridge,userbot,vkmax,oneme
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: vkmax>=1.0.2
Requires-Dist: aiohttp>=3.8.3
Requires-Dist: telethon>=1.42.0
Requires-Dist: cryptg>=0.5.2
Requires-Dist: pillow>=9.2.0

# max2tg
Bridge between MAX and Telegram

## Features
* Text messages
  * Sending: both directions (max2tg and tg2max)
  * Editing: both
  * Deleting: both
* Attachments
  * Sending: both
  * Editing: tg2max
  * Deleting: both, except deleting separate files from a Telegram gallery
* Reactions
  * Sending: tg2max, only to messages from MAX (intentionally, [comment in #2](https://git.dc09.ru/DarkCat09/max2tg/issues/2#issuecomment-699))
  * Deleting: tg2max, same
* Stickers
  * Static: tg2max
  * Video: tg2max
* Chat-scoped custom names for Telegram users ([#5](https://git.dc09.ru/DarkCat09/max2tg/issues/5))
* Configurable size limit for videos and files

## For users
1. Add a bridge userbot to your MAX chat.
2. Add a bridge userbot to your Telegram chat. \
  **Note:** the chat must be a supergroup or a channel.
  You can convert a chat by adding a public username and then removing it (in case you don't need it).
3. Send `!b id` to MAX, the bot will give you a numeric ID.
4. Send `!b bridge ID` to Telegram, replacing `ID` with what you just got from the bot.
5. Verify that bridge works in both directions by sending messages.

If you want to stop bridging chats, send `!b unbridge` to Telegram.

To set a custom name for your Telegram account in a specific chat,
send `!b name SMTH` replacing `SMTH` with your desired display name.

`!b help` outputs a list of supported commands on the side where it is called
(MAX userbot supports only `!b id`, bridge management is done from the Telegram side).

## For admins

### Docker
```shell
git clone https://git.dc09.ru/DarkCat09/max2tg.git
cd max2tg

cp config.example.py config.py
# edit the config, e.g. `hx config.py`

mkdir session
chown -R 291:291 session

docker compose run -i --rm max2tg
# log in to your MAX and Telegram accounts
# press Ctrl-C after it says "logged in"

docker compose up -d
```

## For developers
Good luck have fun
