Closed aahnik closed 3 years ago
This feature can be used by using the filter
plugin and specifying the files you want to filter
example inside your config file:
plugins:
filter:
files:
whitelist: [document]
you can use a blacklist instead of a whitelist also
blacklist: [video]
The valid file types are :
audio
gif
video
video_note
sticker
contact
photo
document
nofile
if a message has no files in it, then the type is nofile
, you may add nofile
to whitelist or blacklist, just like the other types.
And for text only??
And for text only??
another valid type is nofile
i added the feature, then I saw your comment !😅
hi @ankit-sinha-18 @warmkenley @ThatDevCoder
make sure to use the latest tgcf 0.1.27 or above, to test this feature!
and please help me by sharing tgcf on social media.
Thank you for this update, I will test the new feature and give feedback. But I have a few questions. How about the archives? They are in the document category? Non-streamable videos or videos sent as files, belong to video type? Does the document category include pdf, epub, mobi?
Hi @tissole, please experiment, and answer your own questions.
I will add more details in the wiki soon.
OK. I will blacklist (gif, sticker, video-note, contact, no file). Curious about the results.
wow!!! thank you:)
hi @ankit-sinha-18 @warmkenley @ThatDevCoder
make sure to use the latest tgcf 0.1.27 or above, to test this feature!
and please help me by sharing tgcf on social media.
Hi @aahnik , I have tested new version of tgcf 0.1.28
.
Review For tgcf 0.1.28
.
I have checked all filters ( audio
,gif
, video
, video
, note
, sticker
, contact
, photo
, document
, nofile
) are working perfectly.
whitelist
and blacklist
for users , text and file are also working good.
In past
mode, delay
is also working for different values.
In live
mode, delete_sync
is working.
But delete_sync
won't work for previous messages if bot will restart. And, It will also not work,
if admin will delete multiple messages in source
at once, then only the first message will get deleted in dest
, not all.
thank you @ankit-sinha-18 for your review. this is very helpful.
if admin will delete multiple messages in source at once, then only the first message will get deleted in dest , not all.
this is a critical piece of information, and I did not know this. thanks for your help!
i have create a new issue for this #128
Hi ,
If a message contains both image and text.. Is this possible to block the image only and send the text to the destination channel?
allow only certain types of files, or ban certain types of files.
this is requested by multiple people #116 , #61 , #6