Skip to main content

Hikka Filters

Filters for updates-handlers for Telegram UserBot Hikka

external-install-basic-ui-elements-2.3-sbts2018-outline-color-sbts2018 Install

Install via GitHub:

pip3 install https://github.com/Den4ikSuperOstryyPer4ik/hikka_filters/archive/main.zip --upgrade

Stable version from PyPi:

pip3 install hikka-filters

For Windows: pip3 > pip

Usage

# requires: hikka-filters>=0.2.0

from .. import loader, utils
from hikka_filters import check_filters, user, chat, text, media, content_types, args

@loader.tds
class TestModule(loader.Module):
    """Test module for `hikka-filters` library"""

    strings = {
        "name": "TestHikkaModule"
    }

    @loader.watcher()
    @check_filters(media)
    async def media_watcher(self, message):
        """Watcher for messages with media"""
        ...
    
    @loader.watcher()
    @check_filters(content_types("forwarded") & text(startswith="!", endswith="cmd", lower=True))
    async def forwarded_cmd_watcher(self, message):
        """Watcher for forwarded messages with text starstwith "!" and endswith "cmd" """
        ...
    
    @loader.command()
    @check_filters(args)
    async def command(self, message):
        """Command with args: `(args = message.args = utils.get_args_raw(message))`"""
        args = message.args
        ...
    
    @loader.watcher()
    @check_filters(chat([ID1, ID2, ID3]))
    async def watcher_in_chats_with_ids(self, message):
        """Watcher for messages in chats with IDs"""
        ...
    
    @loader.watcher()
    @check_filters(user([ID1, ID2, ID3]))
    async def watcher_for_sended_users_with_ids(self, message):
        """Watcher for users, sended message, by IDs"""
        ...

File hikka_test_module.py

Thanks @hikariatama for making a great userbot for Telegram: Hikka!

Metadata

Release files for hikka-filters 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hikka-filters 0.2.0
File Size Uploaded Provenance Actions
hikka_filters-0.2.0.tar.gz 18.3 kB Without provenance Details for hikka_filters-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hikka-filters 0.2.0
File Interpreter ABI Platform Actions
hikka_filters-0.2.0-py3-none-any.whl Python 3 none any Details for hikka_filters-0.2.0-py3-none-any.whl

Total release size: 36.8 kB

Release files / hikka_filters-0.2.0.tar.gz

Download URL hikka_filters-0.2.0.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e46447e1d581fabfde8a7bafaaabb30c4627024074b1c13ba35ab569f0223736
BLAKE2b-256 checksum
How to use checksums
d87b22a47bef88291276c3b05e83ad51866fc3a5dad60ac47b4f8e692cbb747d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / hikka_filters-0.2.0-py3-none-any.whl

Download URL hikka_filters-0.2.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55374d9f3d61d3f118baf300fe99b1ea42fc32060e0e0c1f4e1a9ba05a99c5e5
BLAKE2b-256 checksum
How to use checksums
ee5fd94d11a0340700c6387701423438a7fd5bd89fa6a2f417b0ff0eb83fcd2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for hikka-filters 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page