Giter Site home page Giter Site logo

Filtering by file type about tgcf HOT 11 CLOSED

aahnik avatar aahnik commented on May 18, 2024
Filtering by file type

from tgcf.

Comments (11)

aahnik avatar aahnik commented on May 18, 2024 1

And for text only??

another valid type is nofile

i added the feature, then I saw your comment !😅

from tgcf.

aahnik avatar aahnik commented on May 18, 2024

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.

from tgcf.

ankit-sinha-18 avatar ankit-sinha-18 commented on May 18, 2024

And for text only??

from tgcf.

aahnik avatar aahnik commented on May 18, 2024

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.

from tgcf.

tissole avatar tissole commented on May 18, 2024

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?

from tgcf.

aahnik avatar aahnik commented on May 18, 2024

Hi @tissole, please experiment, and answer your own questions.

I will add more details in the wiki soon.

from tgcf.

tissole avatar tissole commented on May 18, 2024

OK. I will blacklist (gif, sticker, video-note, contact, no file). Curious about the results.

from tgcf.

 avatar commented on May 18, 2024

wow!!! thank you:)

from tgcf.

ankit-sinha-18 avatar ankit-sinha-18 commented on May 18, 2024

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.

from tgcf.

aahnik avatar aahnik commented on May 18, 2024

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

from tgcf.

mujahidazamcsm avatar mujahidazamcsm commented on May 18, 2024

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?

from tgcf.

Related Issues (20)

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.