The easiest way to proxy messages from a bot to a selected chat-forum
Project description
Proxy Messages for Aiogram
A library implementing a simple way to proxy messages from a bot to a selected channel-forum
Functionality
Installation
pip install proxy-messages-aiogram
Quick start
Mode details in example.
from aiogram import Bot, Dispatcher
from proxy_messages_aiogram.proxy_managers import ProxyManager
from proxy_messages_aiogram.storages.sqlite_storage import SQLiteStorage
dp = Dispatcher()
proxy_manager = ProxyManager(
SQLiteStorage(),
{TARGET_TG_CHAT_ID},
)
@dp.message(proxy_manager.proxy_magic_filter)
async def proxy_messages_handler(message: Message) -> None:
await proxy_manager.proxy(message)
@dp.message(proxy_manager.answer_magic_filter)
async def answer_messages_handler(message: Message) -> None:
await proxy_manager.answer(message)
Contribute
Issue Tracker: https://gitlab.com/rocshers/python/proxy-messages-aiogram/-/issues
Source Code: https://gitlab.com/rocshers/python/proxy-messages-aiogram
Before adding changes:
make install-dev
After changes:
make format test
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file proxy_messages_aiogram-0.1.7.tar.gz
.
File metadata
- Download URL: proxy_messages_aiogram-0.1.7.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 960dd7945c105d8399785917b1dceef0c6728e1389f40767408f4246e4e211c4 |
|
MD5 | e630f4179f4f36ecae31fb5bcaf95a07 |
|
BLAKE2b-256 | 6faf35e70620d514d3e6faeb445a580c0eafa4874609efa7f2dd9e4c12501341 |
File details
Details for the file proxy_messages_aiogram-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: proxy_messages_aiogram-0.1.7-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 258af4f1fcd5a126b883adf592b0fc5a309348e8372f310cdd6a92bf446fdf29 |
|
MD5 | d90c386c57245e4bc8fa258cce59a43f |
|
BLAKE2b-256 | 19891469467333982c8acb175af08e43c39d5589bd62c517e451c5e5d0e41c84 |