Giter Site home page Giter Site logo

aahnik / tgcf Goto Github PK

View Code? Open in Web Editor NEW
1.2K 32.0 747.0 1.11 MB

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.

Home Page: https://github.com/aahnik/tgcf/wiki

License: MIT License

Python 97.82% Dockerfile 0.68% Makefile 1.50%
telegram-bot telethon user-bot telegram-userbot telegram mtproto python3 script python-script aahnik

tgcf's Introduction

tgcf logo

tgcf

The ultimate tool to automate custom telegram message forwarding.

GitHub license GitHub stars GitHub issues PyPI Twitter

Code Quality

Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf is an advanced telegram chat forwarding automation tool that can fulfill all your custom needs.

Features

Extremely easy to get started yet ready for any complex task you throw at it.

  • At its simple form, its just a telegram message forwarder that forwards your messages from source to destination chats.
  • You can choose the mode: past for forward all old(existing messages) or live for start forwarding from now. You can either use a telegram bot account or an user account.

image

  • You can cutomize every detail of the forwarding with the help of plugins: filter(blacklist/whitelist), format(bold, italics, etc), replace(supports regex), caption(header/footer). You can even apply watermark to images/videos, or perform optical character recognition (ocr) on images.

image

  • tgcf comes with a web interface to customize all these options. You may define you config in json, and run tgcf from the CLI if you wish.

image image

  • Detailed documentation and videos makes it easy for you to configure tgcf and deploy to any platform of your choice. The following videos (english) explain everything in great detail.
  • Supported environments Linux, Mac, Windows (Running Ubuntu on top of WSL-2), Android (Using Termux app) and any platform where running Docker containers is supported.
  • All these is free and open source, with not a single feature behind a paywall. Tgcf serves to be a free alternative to many commercial telegram bots out there. However you may sponsor to accelerate the development of any new feature and get fast support over chat.

Install and Run

If you want to use tgcf for free, then run on your own desktop or mobile computer.

Make sure you are on a supported environment and have python:3.10 or above, installed.

  • Create a directory and move into it.

    mkdir my-tgcf
    cd my-tgcf
  • Create a python virtual environment and activate it.

    python3 -m venv .venv
    source .venv/bin/activate
  • Install tgcf using pip

    pip install tgcf
    tgcf --version
  • Set the password for accessing web interface. The password is to be set in the .env file.

    echo "PASSWORD=hocus pocus qwerty utopia" >> .env

    Set your own password, instead of whats given above.

    Security advice:

    • Please make sure the password has more than 16 characters.
    • You can save your password in any password manager (may be of browser) to autofill password everytime.
  • Start the web-server.

    tgcf-web

To run tgcf without the web-ui read about tgcf cli.

If you are planning to use watermarking and ocr features within tgcf, you need to install ffmpeg and tesseract-ocr libraries in you system. Read more.

See also: How to install and run using docker ?

Deploy to Cloud

Click on this link and get free 200$ on Digital Ocean.

DigitalOcean Referral Badge

NOTE You will get nothing if you directly sign up from Digital Ocean Home Page. Use the link above, or click on the big fat button above to get free 200$.

Deploying to a cloud server is an easier alternative if you cannot install on your own machine. Cloud servers are very reliable and great for running tgcf in live mode for a long time.

Here are some guides for deployment to different cloud providers.

Getting Help

  • First of all read the wiki and watch the videos to get started.

  • Type your question in GitHub's Search bar on the top left of this page, and click "In this repository". Go through the issues, discussions and wiki pages that appear in the result. Try re-wording your query a few times before you give up.

  • If your question does not already exist, feel free to ask your questions in the Discussion forum. Please avoid duplicates.

  • For reporting bugs or requesting a new feature please use the issue tracker of the repo.

Contributing

PRs are most welcome! Read the contributing guidelines to get started.

If you are not a developer, you may also contribute financially to incentivise the development of any custom feature you need.

tgcf's People

Contributors

aahnik avatar dependabot[bot] avatar flopinguin avatar matt3ov avatar mobcode100 avatar nmaiti avatar

Stargazers

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

Watchers

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

tgcf's Issues

[Dockerfile.min] Why is postgresql-dev required ? & Update dependancies

RUN apk add --no-cache gcc libffi-dev musl-dev postgresql-dev postgresql-dev musl-dev zlib zlib-dev jpeg-dev

Hi @nmaiti please help!

I decided to package two extensions mark and ocr along with tgcf. These two require ffmpeg and tesseract-ocr respectively. I have already updated the Dockerfile.

apt-get install ffmpeg tesseract-ocr -y && \

I will not be adding any more extensions that require external deps. But ffmpeg and tesseract-ocr need to be included in Dockerfile.min. Should I just add to the apk add line ? Do they require any other deps ? I need to experiment it.

You are experienced, any suggestion and review will be great.

Thanks.

Please Make a burst mode optional.

Is your feature request related to a problem? Please describe.

Sometimes Telegram Account Limited Error occurs. As you know, telegram Account Limited Error is an error which happens when an account sends many messages at once. This does not cause any permanent issues with the account. But When this error happens tgcf will not send any more messages via the account. (Temporary wait limit)

Describe the solution you'd like

It would be very helpful if you provided message rate options.

example : [burst mode - High or Low]

It will be able to reduce the frequency of occurrence of the telegram Account Limited Error.

Describe alternatives you've considered

Alternatively, it would be fine to be able to set the interval between sending messages in seconds.

example: sent every [10] seconds

Thank you! This project is evolving every day.

tgcf forwards all pictures inspite of using a whitelist filter

Describe the bug
When using a whitelist filter, it will still forward all pictures

To Reproduce
Use a whitelist text filter, and try sending a photo

Expected behavior
It shouldn't forward the picture unless it includes a tag with the keyword

System information:
Running on Heroku

Add option to use a custom delay

I am personally not interested in this feature, but as requested by some people, I thought let me implement it.

@comienzo2093 @tissole

this custom delay can be introduced by a specifying in the configuration file

past:
    delay: 5 # seconds

here 5 means seconds. The value passed can be from 0 to 100.

if nothing is passed (don't write this past delay lines), then 0 is used as default.

Offset is not updating in tgcf.config.yml

I checked the recent release of tgcf
And tried both tgcf past and tgcf live feature
Both are working fine. But
When using tgcf in past mode , It is not updating it's offset in tgcf.config.yml

detele_sync AttributeError

live:
    delete_sync: true
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/telethon/client/updates.py", line 454, in _dispatch_update
    await callback(event)
  File "/usr/local/lib/python3.9/dist-packages/tgcf/live.py", line 104, in deleted_message_handler
    await msg.delete()
AttributeError: 'int' object has no attribute 'delete'

Switch account, when flood wait limits one account for a long period of time

Background
When using the bot for large amounts of forwarding (thousands of messages and files each day), there is a floodwait enforced from the Telegram API. This floodwait varies and sometimes you can hit a long wait time of hours or a temporary suspension of 24 hours.

Workaround
If we have multiple Telegram Accounts, we can setup multiple Apps and API users / Bots. This means we can just delete the .forwardersession file and start again on another account.

Request
Enhance the Telegram Chat Forward bot to allow for it to alternate between various Telegram API users and .forwardersession files to avoid this ban.

Sample
Viable option:
Have multiple api_id and hash stored in the .env file and anytime a floodwait error is over X amount of seconds (300 etc) then switch to the next api_id / hash in the file:
api_id_1=302XXX
api_hash_1=7exxxxxxx
api_id_2=303XXX
api_hash_2=7fxxxxxxx

Trying to forward messages from long peer ID's raises "OverflowError: Python int too large to convert to SQLite INTEGER"

Bug description
When trying to forward messages from sources whose ID's are too long an OverflowError is raised with the following message:

OverflowError: Python int too large to convert to SQLite INTEGER

The complete error message is here: buginfo1.txt

Some groups and users don't have personalized URLs or usernames and, instead, can be identified by a long number, like the following: 941282734_16703767399832056981. Although we can use the phone_number in the case of a user, I can't think of a similar workaround for the case of a group.

To Reproduce

  1. Find a group or user without a username and use Telegram Web to get their ID. That will be the number at the end of the URL.
  2. Set this ID as the source of a forward task at tgcf.config.yml.
  3. Run tgcf past -l. The error is raised.

Expected behavior
The messages should be forward despite the peer ID's length.

System information:
Ubuntu 20.04 running on top of WSL2.
tgcf 0.1.28
Python 3.8.5
pip freeze -> buginfo2.txt

Proposed solution
Maybe there is a way to translate this long ID into some other smaller identifier. There could be some functionality to parse a Telegram Web URL of a group or username and transform it to this smaller identifier. Or maybe there is a way to change the SQLite database to something that can handle bigger numbers.

Add regex support

having regex will enable more powerful text filtering and replacement.

regex will allow a generic solution to #129

Automatically wait after hitting FloodWait Error instead of quitting

I want to clone some big Telegram channels. Your program works pretty well on small ones, but on very big channels with many posts, it takes very long, weeks long. It happens because the program stops after copying some posts. And I have to start it manually.

Obviously, I can't stand all day in front of the computer to do that. So I can only copy limited posts daily. Can you modify the program to start automatically after it waits? That will save a lot of time.

Another useful feature will be to deploy on Heroku because even if the program is able to run automatically on PC it still takes days of running continuously to clone very big channels. The electricity bill goes up quickly :(

IsADirectoryError: [Errno 21] Is a directory: 'tgcf.config.yml' when doing docker run

Describe the bug
When running docker container with following command, it throws following error

INFO:telethon.crypto.libssl:Failed to load SSL library: <class 'OSError'> (no library called "ssl" found)
INFO:root:tgcf.config.yml detected.
Traceback (most recent call last):
  File "/venv/bin/tgcf", line 8, in <module>
    sys.exit(app())
  File "/venv/lib/python3.9/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/venv/lib/python3.9/site-packages/typer/main.py", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "/venv/lib/python3.9/site-packages/tgcf/cli.py", line 81, in main
    from tgcf.live import start_sync  # pylint: disable=import-outside-toplevel
  File "/venv/lib/python3.9/site-packages/tgcf/live.py", line 9, in <module>
    from tgcf import config, const
  File "/venv/lib/python3.9/site-packages/tgcf/config.py", line 148, in <module>
    CONFIG = read_config()
  File "/venv/lib/python3.9/site-packages/tgcf/config.py", line 94, in read_config
    with open(CONFIG_FILE_NAME) as file:
IsADirectoryError: [Errno 21] Is a directory: 'tgcf.config.yml'

To Reproduce
docker run -v tgcf.config.yml:/app/tgcf.config.yml -d --env-file .env aahnik/tgcf

System information:
Windows

After google this error, I tried following command, it started running but not forwarding messages

docker run -v tgcf.config.yml:/app/ -d --env-file .env aahnik/tgcf:minimal

struct.error: 'i' format requires -2147483648 <= number <= 2147483647

2021-02-25 00:55:25,058 - telethon.network.mtprotosender - INFO - Connecting to 91.108.56.129:443/TcpFull...
2021-02-25 00:55:25,144 - telethon.network.mtprotosender - INFO - Connection to 91.108.56.129:443/TcpFull complete!
2021-02-25 00:55:25,432 - telethon.network.mtprotosender - ERROR - Request caused struct.error: 'i' format requires -2147483648 <= number <= 2147483647: GetUsersRequest(id=[InputUser(user_id=1001245027408, access_hash=0)])
2021-02-25 00:55:25,432 - telethon.network.mtprotosender - INFO - Disconnecting from 91.108.56.129:443/TcpFull...
2021-02-25 00:55:25,433 - telethon.network.mtprotosender - INFO - Disconnection from 91.108.56.129:443/TcpFull complete!
Traceback (most recent call last):
File "/Users/apple/trading/telegram-chat-forward/forwarder.py", line 78, in
asyncio.run(forward_job())
File "/usr/local/Cellar/[email protected]/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/Cellar/[email protected]/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/apple/trading/telegram-chat-forward/forwarder.py", line 49, in forward_job
async for message in client.iter_messages(intify(from_chat), reverse=True, offset_id=offset):
File "/usr/local/lib/python3.9/site-packages/telethon/requestiter.py", line 58, in anext
if await self._init(**self.kwargs):
File "/usr/local/lib/python3.9/site-packages/telethon/client/messages.py", line 26, in _init
self.entity = await self.client.get_input_entity(entity)
File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 440, in get_input_entity
users = await self(functions.users.GetUsersRequest([
File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 58, in _call
future = sender.send(request, ordered=ordered)
File "/usr/local/lib/python3.9/site-packages/telethon/network/mtprotosender.py", line 174, in send
state = RequestState(request)
File "/usr/local/lib/python3.9/site-packages/telethon/network/requeststate.py", line 17, in init
self.data = bytes(request)
File "/usr/local/lib/python3.9/site-packages/telethon/tl/tlobject.py", line 194, in bytes
return self._bytes()
File "/usr/local/lib/python3.9/site-packages/telethon/tl/functions/users.py", line 72, in _bytes
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/local/lib/python3.9/site-packages/telethon/tl/functions/users.py", line 72, in
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/local/lib/python3.9/site-packages/telethon/tl/types/init.py", line 11133, in _bytes
struct.pack('<i', self.user_id),
struct.error: 'i' format requires -2147483648 <= number <= 2147483647

pipx installs something totally different from this tgcf on debian buster

chrisc@Watchdog:$ pipx install tgcf
  installed package tgcf 0.0.1, Python 3.7.3
  These apps are now globally available
    - tgcf
done! 
chrisc@Watchdog:$ tgcf --version
Usage: tgcf [OPTIONS] COMMAND [ARGS]...
Try 'tgcf --help' for help.

Error: no such option: --version
chrisc@Watchdog:$ tgcf --help
Usage: tgcf [OPTIONS] COMMAND [ARGS]...

Options:
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.

Commands:
  goodbye
  hello

Getting an error when trying to run forwarder.py

I've followed all the steps but I'm getting this error after I try to run the forwarder.py:

Traceback (most recent call last):
  File "forwarder.py", line 10, in <module>
    from settings import API_ID, API_HASH, forwards, get_forward, update_offset, STRING_SESSION
  File "/telegram-chat-forward/settings.py", line 12, in <module>
    assert API_ID and API_HASH
AssertionError

Buttons are not forwarded

There is a channel with inline buttons. If you click on the button, a notification appears with information. I would like to forward information from a notification or the information button itself. I attach screenshots with an example of a button.

first screen
second screen

Ability to convert non-streamable video to streamable video

Is your feature request related to a problem? Please describe.
Now, when forwarding videos uploaded as files in the source channel they arrive the same in the destination channel. Is more convenient to store videos as streaming videos than as files, because they are readily available to watch, in the second case a user has to download them for watching.

Describe the solution you'd like
I will like an option that during forwarding, this type of videos to be changed from files to streamable videos.

"Async with" outside async function

Run fails with "async with" error.

Traceback (most recent call last):
  File "forwarder.py", line 6, in <module>
    from telethon.tl.patched import MessageService
  File "/home/chrisc/telegram-chat-forward/telethon.py", line 24
    async with client:
    ^
SyntaxError: 'async with' outside async function

using python 3.7

Case insensitive text filtering

I just want to start off saying: thank you very much @aahnik everything is working perfectly!

Just a nice to have feature would be to have the whitelist and blacklist filters, have an optional match-case / match whole word option.

Implement persistence for storing the record of forwarded messages

When a message is forwarded, tgcf remembers that it forwarded the message. This helps in edit/delete/reply sync.

The data is currently stored in memory, and thus gets lost when tgcf restarts.

Options for persistence:

  • Local only: Dumping the python object to a binary file would be awesome.
  • When connected to mongo db: save the python dictionary to mongo

Forwarding posts from specific user(s) of a chat

This bot seems really great, but is there some way I could forward only posts by specific user or users from a group?

I want to cut down on the noise, and only select a few good posters for forwarding.
Is there some way to do that?

Edit:
Question 2:
How to make this bot run live, so it forwards as new messages appear?

Non integer chat ids are not working for tgcf live mode for source

Problem

Non-integer chat ids are not working for tgcf live mode

forwards:
  - source: aahnikdaw
    dest: [-1001198424910]

a configuration like this fails in live mode, although succeeds in past mode.

Probable reason

message handlers have something like this on top:

    if chat_id not in from_to:
        return

the chat_id is not in from_to as, from_to is now having the string username or other type of things.

Probable solution

some conversion should take place, and comparison must be done for same type

related docs https://docs.telethon.dev/en/latest/concepts/entities.html

Discord Forward

There are 2 ways to do this.

One:
Make a bot, that needs to join the server and choose a channel where to send the messages.

Two:
Setup a webhook to a certain channel, and send all the messages via Webhook to it (20 messages per minute limit), but this would be really fast to make with a plugin I believe.

yaml.reader.ReaderError: unacceptable character, special characters are not allowed

After tgcf live i got:

    raise ReaderError(self.name, position, ord(character),
yaml.reader.ReaderError: unacceptable character #x0082: special characters are not allowed
  in "tgcf.config.yml", position 225

tgcf.config.yml:

plugins:
  filter:
    text:
      blacklist: ["тест"]

problem in the word "тест", in previous versions everything is ok

The script is skipping files?

I run the script on my PC for 14-15 hours a day on 3 consecutive days and I managed to clone a channel. But after I realized that some files were skipped, a few hundred were missing from the destination channel. Do you have any idea why is this happening? There is a way to know if the script skips some files and to record which are those so we can copy them manually?

RuntimeWarning: coroutine 'sleep' was never awaited

A wait of 2060 seconds is required (caused by SendMessageRequest)
forwarder.py:64: RuntimeWarning: coroutine 'sleep' was never awaited
  asyncio.sleep(delay=fwe.seconds)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

A wait of 2058 seconds is required (caused by SendMessageRequest)
A wait of 2058 seconds is required (caused by SendMessageRequest)
...
A wait of 2057 seconds is required (caused by SendMessageRequest)
A wait of 2057 seconds is required (caused by SendMessageRequest)
...
A wait of 2052 seconds is required (caused by SendMediaRequest)
A wait of 2052 seconds is required (caused by SendMessageRequest)

2021-02-18 16:40:06,400 - root - INFO - Completed working with name
2021-02-18 16:40:06,406 - telethon.client.uploads - INFO - Uploading file of 53 bytes in 1 chunks of 131072
2021-02-18 16:40:06,588 - telethon.network.mtprotosender - INFO - Disconnecting from 149.154.175.56:443/TcpFull...
2021-02-18 16:40:06,589 - telethon.network.mtprotosender - INFO - Disconnection from 149.154.175.56:443/TcpFull complete!
Traceback (most recent call last):
  File "forwarder.py", line 83, in <module>
    asyncio.run(forward_job())
  File "F:\Program Files\Python\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "F:\Program Files\Python\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "forwarder.py", line 72, in forward_job
    await client.send_file('me', 'config.ini', caption='This is your config file for telegram-chat-forward.')
  File "F:\Program Files\Python\lib\site-packages\telethon\client\uploads.py", line 382, in send_file
    return self._get_response_message(request, await self(request), entity)
  File "F:\Program Files\Python\lib\site-packages\telethon\client\users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "F:\Program Files\Python\lib\site-packages\telethon\client\users.py", line 50, in _call
    raise errors.FloodWaitError(request=r, capture=diff)
telethon.errors.rpcerrorlist.FloodWaitError: A wait of 2052 seconds is required (caused by SendMediaRequest)

Text replacement while forwarding

If you want to replace certain words, while forwarding, then create replace.yml file in the same directory as forwarder.py

inside the file put the combinations you want, like these:

"some word": "new word"
"horrible": "happy"

This will result all "someword" to be replace by "new word"

Prevent forwarding duplicate content

I realize now that I have a lot of duplicates in my private channel, God knows how many. It is possible to prevent future files to be forwarding from the source channel if they are already in the destination channel?

There is a way to identify all duplicate that already exists in a channel and remove them, either automatically or in an interactive manner?

Clash of identical visible names of chat

Hello and thank you for your work. I've been using your script and is working really good. But i encountered a problem. Telegram allows identical names for chats visible names, only their user-names are unique. So i wanted to copy files from 3 public channels to my private channel, but these public channels names are the same. So the script only copied files from one of this channels.

How does your script differentiate between channels that have identical visible names? There must be a way to separate them and uniquely identify them. Is there a possibility to use user-names of channels instead of visible names?

Feature Request - Automated Captioning Of Videos With Their Real Names

Many videos in TG channels are not captioned even if they have names that are only visible when you open the video. Even worse, they are uploaded in random order. If someone wants to watch a course with 70 videos have to open each video to search for the first one and then the second etc. Very annoying!

It would make life much easier if the script could auto-captioning files with their names when forwarding.

Custom message template

I want to implement captioning in a generic way so that the use cases of everybody are met.

#40 Remove captions of files while sending
#55 Automated Captioning Of Videos With Their Real Names
#86 Dynamic custom Caption
#153 Forwarding media after removing the caption
#169 Caption the name of the source in the message

So, what I want to do is implement a plugin for preparing the message text as per a certain template as configured by the user.

For the user, this would be something in the lines of:

plugins:
    template: "{message}\nSent by {sender}\n{filename if filename else ''}"

The string will be compiled as a python fstring. The fstring compilation will allow people to introduce some logic in the template. We may rather use jinja for templating.

The link_preview can be set to true or false by this plugin.

Also, the wiki needs to be updated with examples of common use cases.

Make delete sync optional

Hello, I would like to request a feature.

  1. If I pass the message'hello' from A to B
  2. and then delete'hello' from A,
  3. it seems to be deleted from B as well. (sync function)

This feature is usually useful and convenient.
However, can I turn this feature off when I want to? I have set a group as source where chats are automatically deleted every minute, so there are some problems. Thank you:)

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.