diff --git a/poetry.lock b/poetry.lock index 0886468..49b8921 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,44 +1,53 @@ +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. + [[package]] -name = "apscheduler" -version = "3.6.3" -description = "In-process task scheduler with Cron-like capabilities" +name = "anyio" +version = "3.7.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + { file = "anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0" }, + { file = "anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce" }, +] [package.dependencies] -pytz = "*" -setuptools = ">=0.7" -six = ">=1.4.0" -tzlocal = ">=1.2" +idna = ">=2.8" +sniffio = ">=1.1" [package.extras] -asyncio = ["trollius"] -doc = ["sphinx", "sphinx-rtd-theme"] -gevent = ["gevent"] -mongodb = ["pymongo (>=2.8)"] -redis = ["redis (>=3.0)"] -rethinkdb = ["rethinkdb (>=2.4.0)"] -sqlalchemy = ["sqlalchemy (>=0.8)"] -testing = ["mock", "pytest", "pytest-asyncio", "pytest-asyncio (<0.6)", "pytest-cov", "pytest-tornado5"] -tornado = ["tornado (>=4.3)"] -twisted = ["twisted"] -zookeeper = ["kazoo"] +doc = ["Sphinx (>=6.1.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme", "sphinxcontrib-jquery"] +test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (<0.22)"] [[package]] name = "black" -version = "22.10.0" +version = "22.12.0" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.7" +files = [ + { file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d" }, + { file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351" }, + { file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f" }, + { file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4" }, + { file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2" }, + { file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350" }, + { file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d" }, + { file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc" }, + { file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320" }, + { file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148" }, + { file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf" }, + { file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f" }, +] [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -46,21 +55,17 @@ d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] -[[package]] -name = "cachetools" -version = "4.2.2" -description = "Extensible memoizing collections and decorators" -category = "main" -optional = false -python-versions = "~=3.5" - [[package]] name = "certifi" -version = "2022.9.24" +version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = ">=3.6" +files = [ + { file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716" }, + { file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7" }, +] [[package]] name = "charset-normalizer" @@ -69,9 +74,13 @@ description = "The Real First Universal Charset Detector. Open, modern and activ category = "main" optional = false python-versions = ">=3.5.0" +files = [ + { file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597" }, + { file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df" }, +] [package.extras] -unicode_backport = ["unicodedata2"] +unicode-backport = ["unicodedata2"] [[package]] name = "click" @@ -80,45 +89,73 @@ description = "Composable command line interface toolkit" category = "dev" optional = false python-versions = ">=3.7" +files = [ + { file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48" }, + { file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e" }, +] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + { file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" }, + { file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" }, +] [[package]] name = "dnspython" -version = "2.2.1" +version = "2.3.0" description = "DNS toolkit" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.7,<4.0" +files = [ + { file = "dnspython-2.3.0-py3-none-any.whl", hash = "sha256:89141536394f909066cabd112e3e1a37e4e654db00a25308b0f130bc3152eb46" }, + { file = "dnspython-2.3.0.tar.gz", hash = "sha256:224e32b03eb46be70e12ef6d64e0be123a64e621ab4c0822ff6d450d52a540b9" }, +] [package.extras] curio = ["curio (>=1.2,<2.0)", "sniffio (>=1.1,<2.0)"] -dnssec = ["cryptography (>=2.6,<37.0)"] -doh = ["h2 (>=4.1.0)", "httpx (>=0.21.1)", "requests (>=2.23.0,<3.0.0)", "requests-toolbelt (>=0.9.1,<0.10.0)"] +dnssec = ["cryptography (>=2.6,<40.0)"] +doh = ["h2 (>=4.1.0)", "httpx (>=0.21.1)", "requests (>=2.23.0,<3.0.0)", "requests-toolbelt (>=0.9.1,<0.11.0)"] +doq = ["aioquic (>=0.9.20)"] idna = ["idna (>=2.1,<4.0)"] -trio = ["trio (>=0.14,<0.20)"] +trio = ["trio (>=0.14,<0.23)"] wmi = ["wmi (>=1.5.1,<2.0.0)"] [[package]] name = "emoji" -version = "1.6.1" +version = "2.5.1" description = "Emoji for Python" category = "main" optional = false -python-versions = "*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + { file = "emoji-2.5.1.tar.gz", hash = "sha256:8e5ec80f56dd1fe38f4c4847b9ea6f18d4ad94d0b8dd135b0b2355ddf56d6d62" }, +] [package.extras] dev = ["coverage", "coveralls", "pytest"] +[[package]] +name = "h11" +version = "0.14.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + { file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761" }, + { file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d" }, +] + [[package]] name = "hentai" version = "3.2.10" @@ -126,11 +163,61 @@ description = "Implements a wrapper class around nhentai's RESTful API." category = "main" optional = false python-versions = ">=3.7" +files = [ + { file = "hentai-3.2.10-py3-none-any.whl", hash = "sha256:62ffe034bc6f0e7ed4cc17cd0d2e689c816dafb39e831d952206b8a3c95e9979" }, + { file = "hentai-3.2.10.tar.gz", hash = "sha256:1b9f4e03fad69a4a61502534db81683e299969af9d986ec643d092771e537846" }, +] [package.dependencies] requests = "2.27.1" tqdm = "4.63.0" +[[package]] +name = "httpcore" +version = "0.17.2" +description = "A minimal low-level HTTP client." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + { file = "httpcore-0.17.2-py3-none-any.whl", hash = "sha256:5581b9c12379c4288fe70f43c710d16060c10080617001e6b22a3b6dbcbefd36" }, + { file = "httpcore-0.17.2.tar.gz", hash = "sha256:125f8375ab60036db632f34f4b627a9ad085048eef7cb7d2616fea0f739f98af" }, +] + +[package.dependencies] +anyio = ">=3.0,<5.0" +certifi = "*" +h11 = ">=0.13,<0.15" +sniffio = ">=1.0.0,<2.0.0" + +[package.extras] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] + +[[package]] +name = "httpx" +version = "0.24.1" +description = "The next generation HTTP client." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + { file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd" }, + { file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd" }, +] + +[package.dependencies] +certifi = "*" +httpcore = ">=0.15.0,<0.18.0" +idna = "*" +sniffio = "*" + +[package.extras] +brotli = ["brotli", "brotlicffi"] +cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] + [[package]] name = "idna" version = "3.4" @@ -138,6 +225,10 @@ description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false python-versions = ">=3.5" +files = [ + { file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" }, + { file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4" }, +] [[package]] name = "mongoengine" @@ -146,61 +237,183 @@ description = "MongoEngine is a Python Object-Document Mapper for working with M category = "main" optional = false python-versions = ">=3.6" +files = [ + { file = "mongoengine-0.24.2-py3-none-any.whl", hash = "sha256:f5c4e1b206b2ccffe4adc7a6283ed26dd799bd115a5fb1d2e885a075132cdb88" }, + { file = "mongoengine-0.24.2.tar.gz", hash = "sha256:c76d49658575bb995682e2e77c8ef7cda63faf939415b32ee923745d120f8b02" }, +] [package.dependencies] pymongo = ">=3.4,<5.0" [[package]] name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.5" +files = [ + { file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d" }, + { file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" }, +] [[package]] name = "pathspec" -version = "0.10.1" +version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." category = "dev" optional = false python-versions = ">=3.7" +files = [ + { file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293" }, + { file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687" }, +] [[package]] name = "pillow" -version = "9.2.0" +version = "9.5.0" description = "Python Imaging Library (Fork)" category = "main" optional = false python-versions = ">=3.7" +files = [ + { file = "Pillow-9.5.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:ace6ca218308447b9077c14ea4ef381ba0b67ee78d64046b3f19cf4e1139ad16" }, + { file = "Pillow-9.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d3d403753c9d5adc04d4694d35cf0391f0f3d57c8e0030aac09d7678fa8030aa" }, + { file = "Pillow-9.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ba1b81ee69573fe7124881762bb4cd2e4b6ed9dd28c9c60a632902fe8db8b38" }, + { file = "Pillow-9.5.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe7e1c262d3392afcf5071df9afa574544f28eac825284596ac6db56e6d11062" }, + { file = "Pillow-9.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f36397bf3f7d7c6a3abdea815ecf6fd14e7fcd4418ab24bae01008d8d8ca15e" }, + { file = "Pillow-9.5.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:252a03f1bdddce077eff2354c3861bf437c892fb1832f75ce813ee94347aa9b5" }, + { file = "Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:85ec677246533e27770b0de5cf0f9d6e4ec0c212a1f89dfc941b64b21226009d" }, + { file = "Pillow-9.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b416f03d37d27290cb93597335a2f85ed446731200705b22bb927405320de903" }, + { file = "Pillow-9.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1781a624c229cb35a2ac31cc4a77e28cafc8900733a864870c49bfeedacd106a" }, + { file = "Pillow-9.5.0-cp310-cp310-win32.whl", hash = "sha256:8507eda3cd0608a1f94f58c64817e83ec12fa93a9436938b191b80d9e4c0fc44" }, + { file = "Pillow-9.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:d3c6b54e304c60c4181da1c9dadf83e4a54fd266a99c70ba646a9baa626819eb" }, + { file = "Pillow-9.5.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:7ec6f6ce99dab90b52da21cf0dc519e21095e332ff3b399a357c187b1a5eee32" }, + { file = "Pillow-9.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:560737e70cb9c6255d6dcba3de6578a9e2ec4b573659943a5e7e4af13f298f5c" }, + { file = "Pillow-9.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96e88745a55b88a7c64fa49bceff363a1a27d9a64e04019c2281049444a571e3" }, + { file = "Pillow-9.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d9c206c29b46cfd343ea7cdfe1232443072bbb270d6a46f59c259460db76779a" }, + { file = "Pillow-9.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cfcc2c53c06f2ccb8976fb5c71d448bdd0a07d26d8e07e321c103416444c7ad1" }, + { file = "Pillow-9.5.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:a0f9bb6c80e6efcde93ffc51256d5cfb2155ff8f78292f074f60f9e70b942d99" }, + { file = "Pillow-9.5.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:8d935f924bbab8f0a9a28404422da8af4904e36d5c33fc6f677e4c4485515625" }, + { file = "Pillow-9.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fed1e1cf6a42577953abbe8e6cf2fe2f566daebde7c34724ec8803c4c0cda579" }, + { file = "Pillow-9.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c1170d6b195555644f0616fd6ed929dfcf6333b8675fcca044ae5ab110ded296" }, + { file = "Pillow-9.5.0-cp311-cp311-win32.whl", hash = "sha256:54f7102ad31a3de5666827526e248c3530b3a33539dbda27c6843d19d72644ec" }, + { file = "Pillow-9.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:cfa4561277f677ecf651e2b22dc43e8f5368b74a25a8f7d1d4a3a243e573f2d4" }, + { file = "Pillow-9.5.0-cp311-cp311-win_arm64.whl", hash = "sha256:965e4a05ef364e7b973dd17fc765f42233415974d773e82144c9bbaaaea5d089" }, + { file = "Pillow-9.5.0-cp312-cp312-win32.whl", hash = "sha256:22baf0c3cf0c7f26e82d6e1adf118027afb325e703922c8dfc1d5d0156bb2eeb" }, + { file = "Pillow-9.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:432b975c009cf649420615388561c0ce7cc31ce9b2e374db659ee4f7d57a1f8b" }, + { file = "Pillow-9.5.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:5d4ebf8e1db4441a55c509c4baa7a0587a0210f7cd25fcfe74dbbce7a4bd1906" }, + { file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:375f6e5ee9620a271acb6820b3d1e94ffa8e741c0601db4c0c4d3cb0a9c224bf" }, + { file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99eb6cafb6ba90e436684e08dad8be1637efb71c4f2180ee6b8f940739406e78" }, + { file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dfaaf10b6172697b9bceb9a3bd7b951819d1ca339a5ef294d1f1ac6d7f63270" }, + { file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:763782b2e03e45e2c77d7779875f4432e25121ef002a41829d8868700d119392" }, + { file = "Pillow-9.5.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:35f6e77122a0c0762268216315bf239cf52b88865bba522999dc38f1c52b9b47" }, + { file = "Pillow-9.5.0-cp37-cp37m-win32.whl", hash = "sha256:aca1c196f407ec7cf04dcbb15d19a43c507a81f7ffc45b690899d6a76ac9fda7" }, + { file = "Pillow-9.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322724c0032af6692456cd6ed554bb85f8149214d97398bb80613b04e33769f6" }, + { file = "Pillow-9.5.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:a0aa9417994d91301056f3d0038af1199eb7adc86e646a36b9e050b06f526597" }, + { file = "Pillow-9.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f8286396b351785801a976b1e85ea88e937712ee2c3ac653710a4a57a8da5d9c" }, + { file = "Pillow-9.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c830a02caeb789633863b466b9de10c015bded434deb3ec87c768e53752ad22a" }, + { file = "Pillow-9.5.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbd359831c1657d69bb81f0db962905ee05e5e9451913b18b831febfe0519082" }, + { file = "Pillow-9.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8fc330c3370a81bbf3f88557097d1ea26cd8b019d6433aa59f71195f5ddebbf" }, + { file = "Pillow-9.5.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:7002d0797a3e4193c7cdee3198d7c14f92c0836d6b4a3f3046a64bd1ce8df2bf" }, + { file = "Pillow-9.5.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:229e2c79c00e85989a34b5981a2b67aa079fd08c903f0aaead522a1d68d79e51" }, + { file = "Pillow-9.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9adf58f5d64e474bed00d69bcd86ec4bcaa4123bfa70a65ce72e424bfb88ed96" }, + { file = "Pillow-9.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:662da1f3f89a302cc22faa9f14a262c2e3951f9dbc9617609a47521c69dd9f8f" }, + { file = "Pillow-9.5.0-cp38-cp38-win32.whl", hash = "sha256:6608ff3bf781eee0cd14d0901a2b9cc3d3834516532e3bd673a0a204dc8615fc" }, + { file = "Pillow-9.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:e49eb4e95ff6fd7c0c402508894b1ef0e01b99a44320ba7d8ecbabefddcc5569" }, + { file = "Pillow-9.5.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:482877592e927fd263028c105b36272398e3e1be3269efda09f6ba21fd83ec66" }, + { file = "Pillow-9.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3ded42b9ad70e5f1754fb7c2e2d6465a9c842e41d178f262e08b8c85ed8a1d8e" }, + { file = "Pillow-9.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c446d2245ba29820d405315083d55299a796695d747efceb5717a8b450324115" }, + { file = "Pillow-9.5.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8aca1152d93dcc27dc55395604dcfc55bed5f25ef4c98716a928bacba90d33a3" }, + { file = "Pillow-9.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:608488bdcbdb4ba7837461442b90ea6f3079397ddc968c31265c1e056964f1ef" }, + { file = "Pillow-9.5.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:60037a8db8750e474af7ffc9faa9b5859e6c6d0a50e55c45576bf28be7419705" }, + { file = "Pillow-9.5.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:07999f5834bdc404c442146942a2ecadd1cb6292f5229f4ed3b31e0a108746b1" }, + { file = "Pillow-9.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a127ae76092974abfbfa38ca2d12cbeddcdeac0fb71f9627cc1135bedaf9d51a" }, + { file = "Pillow-9.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:489f8389261e5ed43ac8ff7b453162af39c3e8abd730af8363587ba64bb2e865" }, + { file = "Pillow-9.5.0-cp39-cp39-win32.whl", hash = "sha256:9b1af95c3a967bf1da94f253e56b6286b50af23392a886720f563c547e48e964" }, + { file = "Pillow-9.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:77165c4a5e7d5a284f10a6efaa39a0ae8ba839da344f20b111d62cc932fa4e5d" }, + { file = "Pillow-9.5.0-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:833b86a98e0ede388fa29363159c9b1a294b0905b5128baf01db683672f230f5" }, + { file = "Pillow-9.5.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aaf305d6d40bd9632198c766fb64f0c1a83ca5b667f16c1e79e1661ab5060140" }, + { file = "Pillow-9.5.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0852ddb76d85f127c135b6dd1f0bb88dbb9ee990d2cd9aa9e28526c93e794fba" }, + { file = "Pillow-9.5.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:91ec6fe47b5eb5a9968c79ad9ed78c342b1f97a091677ba0e012701add857829" }, + { file = "Pillow-9.5.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:cb841572862f629b99725ebaec3287fc6d275be9b14443ea746c1dd325053cbd" }, + { file = "Pillow-9.5.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:c380b27d041209b849ed246b111b7c166ba36d7933ec6e41175fd15ab9eb1572" }, + { file = "Pillow-9.5.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c9af5a3b406a50e313467e3565fc99929717f780164fe6fbb7704edba0cebbe" }, + { file = "Pillow-9.5.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5671583eab84af046a397d6d0ba25343c00cd50bce03787948e0fff01d4fd9b1" }, + { file = "Pillow-9.5.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:84a6f19ce086c1bf894644b43cd129702f781ba5751ca8572f08aa40ef0ab7b7" }, + { file = "Pillow-9.5.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1e7723bd90ef94eda669a3c2c19d549874dd5badaeefabefd26053304abe5799" }, + { file = "Pillow-9.5.0.tar.gz", hash = "sha256:bf548479d336726d7a0eceb6e767e179fbde37833ae42794602631a070d630f1" }, +] [package.extras] -docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-issues (>=3.0.1)", "sphinx-removed-in", "sphinxext-opengraph"] +docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] [[package]] name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "3.6.0" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" +files = [ + { file = "platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38" }, + { file = "platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640" }, +] [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"] [[package]] name = "pydantic" -version = "1.10.2" +version = "1.10.9" description = "Data validation and settings management using python type hints" category = "main" optional = false python-versions = ">=3.7" +files = [ + { file = "pydantic-1.10.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e692dec4a40bfb40ca530e07805b1208c1de071a18d26af4a2a0d79015b352ca" }, + { file = "pydantic-1.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3c52eb595db83e189419bf337b59154bdcca642ee4b2a09e5d7797e41ace783f" }, + { file = "pydantic-1.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:939328fd539b8d0edf244327398a667b6b140afd3bf7e347cf9813c736211896" }, + { file = "pydantic-1.10.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b48d3d634bca23b172f47f2335c617d3fcb4b3ba18481c96b7943a4c634f5c8d" }, + { file = "pydantic-1.10.9-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f0b7628fb8efe60fe66fd4adadd7ad2304014770cdc1f4934db41fe46cc8825f" }, + { file = "pydantic-1.10.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e1aa5c2410769ca28aa9a7841b80d9d9a1c5f223928ca8bec7e7c9a34d26b1d4" }, + { file = "pydantic-1.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:eec39224b2b2e861259d6f3c8b6290d4e0fbdce147adb797484a42278a1a486f" }, + { file = "pydantic-1.10.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d111a21bbbfd85c17248130deac02bbd9b5e20b303338e0dbe0faa78330e37e0" }, + { file = "pydantic-1.10.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e9aec8627a1a6823fc62fb96480abe3eb10168fd0d859ee3d3b395105ae19a7" }, + { file = "pydantic-1.10.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07293ab08e7b4d3c9d7de4949a0ea571f11e4557d19ea24dd3ae0c524c0c334d" }, + { file = "pydantic-1.10.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ee829b86ce984261d99ff2fd6e88f2230068d96c2a582f29583ed602ef3fc2c" }, + { file = "pydantic-1.10.9-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b466a23009ff5cdd7076eb56aca537c745ca491293cc38e72bf1e0e00de5b91" }, + { file = "pydantic-1.10.9-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7847ca62e581e6088d9000f3c497267868ca2fa89432714e21a4fb33a04d52e8" }, + { file = "pydantic-1.10.9-cp311-cp311-win_amd64.whl", hash = "sha256:7845b31959468bc5b78d7b95ec52fe5be32b55d0d09983a877cca6aedc51068f" }, + { file = "pydantic-1.10.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:517a681919bf880ce1dac7e5bc0c3af1e58ba118fd774da2ffcd93c5f96eaece" }, + { file = "pydantic-1.10.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67195274fd27780f15c4c372f4ba9a5c02dad6d50647b917b6a92bf00b3d301a" }, + { file = "pydantic-1.10.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2196c06484da2b3fded1ab6dbe182bdabeb09f6318b7fdc412609ee2b564c49a" }, + { file = "pydantic-1.10.9-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6257bb45ad78abacda13f15bde5886efd6bf549dd71085e64b8dcf9919c38b60" }, + { file = "pydantic-1.10.9-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3283b574b01e8dbc982080d8287c968489d25329a463b29a90d4157de4f2baaf" }, + { file = "pydantic-1.10.9-cp37-cp37m-win_amd64.whl", hash = "sha256:5f8bbaf4013b9a50e8100333cc4e3fa2f81214033e05ac5aa44fa24a98670a29" }, + { file = "pydantic-1.10.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9cd67fb763248cbe38f0593cd8611bfe4b8ad82acb3bdf2b0898c23415a1f82" }, + { file = "pydantic-1.10.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f50e1764ce9353be67267e7fd0da08349397c7db17a562ad036aa7c8f4adfdb6" }, + { file = "pydantic-1.10.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73ef93e5e1d3c8e83f1ff2e7fdd026d9e063c7e089394869a6e2985696693766" }, + { file = "pydantic-1.10.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:128d9453d92e6e81e881dd7e2484e08d8b164da5507f62d06ceecf84bf2e21d3" }, + { file = "pydantic-1.10.9-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ad428e92ab68798d9326bb3e5515bc927444a3d71a93b4a2ca02a8a5d795c572" }, + { file = "pydantic-1.10.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fab81a92f42d6d525dd47ced310b0c3e10c416bbfae5d59523e63ea22f82b31e" }, + { file = "pydantic-1.10.9-cp38-cp38-win_amd64.whl", hash = "sha256:963671eda0b6ba6926d8fc759e3e10335e1dc1b71ff2a43ed2efd6996634dafb" }, + { file = "pydantic-1.10.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:970b1bdc6243ef663ba5c7e36ac9ab1f2bfecb8ad297c9824b542d41a750b298" }, + { file = "pydantic-1.10.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7e1d5290044f620f80cf1c969c542a5468f3656de47b41aa78100c5baa2b8276" }, + { file = "pydantic-1.10.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83fcff3c7df7adff880622a98022626f4f6dbce6639a88a15a3ce0f96466cb60" }, + { file = "pydantic-1.10.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0da48717dc9495d3a8f215e0d012599db6b8092db02acac5e0d58a65248ec5bc" }, + { file = "pydantic-1.10.9-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0a2aabdc73c2a5960e87c3ffebca6ccde88665616d1fd6d3db3178ef427b267a" }, + { file = "pydantic-1.10.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9863b9420d99dfa9c064042304868e8ba08e89081428a1c471858aa2af6f57c4" }, + { file = "pydantic-1.10.9-cp39-cp39-win_amd64.whl", hash = "sha256:e7c9900b43ac14110efa977be3da28931ffc74c27e96ee89fbcaaf0b0fe338e1" }, + { file = "pydantic-1.10.9-py3-none-any.whl", hash = "sha256:6cafde02f6699ce4ff643417d1a9223716ec25e228ddc3b436fe7e2d25a1f305" }, + { file = "pydantic-1.10.9.tar.gz", hash = "sha256:95c70da2cd3b6ddf3b9645ecaa8d98f3d80c606624b6d245558d202cd23ea3be" }, +] [package.dependencies] -python-dotenv = {version = ">=0.10.4", optional = true, markers = "extra == \"dotenv\""} -typing-extensions = ">=4.1.0" +python-dotenv = { version = ">=0.10.4", optional = true, markers = "extra == \"dotenv\"" } +typing-extensions = ">=4.2.0" [package.extras] dotenv = ["python-dotenv (>=0.10.4)"] @@ -208,19 +421,97 @@ email = ["email-validator (>=1.0.3)"] [[package]] name = "pymongo" -version = "4.2.0" +version = "4.3.3" description = "Python driver for MongoDB " category = "main" optional = false python-versions = ">=3.7" +files = [ + { file = "pymongo-4.3.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:74731c9e423c93cbe791f60c27030b6af6a948cef67deca079da6cd1bb583a8e" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux1_i686.whl", hash = "sha256:66413c50d510e5bcb0afc79880d1693a2185bcea003600ed898ada31338c004e" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:9b87b23570565a6ddaa9244d87811c2ee9cffb02a753c8a2da9c077283d85845" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux2014_i686.whl", hash = "sha256:695939036a320f4329ccf1627edefbbb67cc7892b8222d297b0dd2313742bfee" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux2014_ppc64le.whl", hash = "sha256:ffcc8394123ea8d43fff8e5d000095fe7741ce3f8988366c5c919c4f5eb179d3" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux2014_s390x.whl", hash = "sha256:943f208840777f34312c103a2d1caab02d780c4e9be26b3714acf6c4715ba7e1" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux2014_x86_64.whl", hash = "sha256:01f7cbe88d22440b6594c955e37312d932fd632ffed1a86d0c361503ca82cc9d" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdb87309de97c63cb9a69132e1cb16be470e58cffdfbad68fdd1dc292b22a840" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d86c35d94b5499689354ccbc48438a79f449481ee6300f3e905748edceed78e7" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a966d5304b7d90c45c404914e06bbf02c5bf7e99685c6c12f0047ef2aa837142" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be1d2ce7e269215c3ee9a215e296b7a744aff4f39233486d2c4d77f5f0c561a6" }, + { file = "pymongo-4.3.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:55b6163dac53ef1e5d834297810c178050bd0548a4136cd4e0f56402185916ca" }, + { file = "pymongo-4.3.3-cp310-cp310-win32.whl", hash = "sha256:dc0cff74cd36d7e1edba91baa09622c35a8a57025f2f2b7a41e3f83b1db73186" }, + { file = "pymongo-4.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:cafa52873ae12baa512a8721afc20de67a36886baae6a5f394ddef0ce9391f91" }, + { file = "pymongo-4.3.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:599d3f6fbef31933b96e2d906b0f169b3371ff79ea6aaf6ecd76c947a3508a3d" }, + { file = "pymongo-4.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0640b4e9d008e13956b004d1971a23377b3d45491f87082161c92efb1e6c0d6" }, + { file = "pymongo-4.3.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:341221e2f2866a5960e6f8610f4cbac0bb13097f3b1a289aa55aba984fc0d969" }, + { file = "pymongo-4.3.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e7fac06a539daef4fcf5d8288d0d21b412f9b750454cd5a3cf90484665db442a" }, + { file = "pymongo-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3a51901066696c4af38c6c63a1f0aeffd5e282367ff475de8c191ec9609b56d" }, + { file = "pymongo-4.3.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3055510fdfdb1775bc8baa359783022f70bb553f2d46e153c094dfcb08578ff" }, + { file = "pymongo-4.3.3-cp311-cp311-win32.whl", hash = "sha256:524d78673518dcd352a91541ecd2839c65af92dc883321c2109ef6e5cd22ef23" }, + { file = "pymongo-4.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:b8a03af1ce79b902a43f5f694c4ca8d92c2a4195db0966f08f266549e2fc49bc" }, + { file = "pymongo-4.3.3-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:39b03045c71f761aee96a12ebfbc2f4be89e724ff6f5e31c2574c1a0e2add8bd" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6fcfbf435eebf8a1765c6d1f46821740ebe9f54f815a05c8fc30d789ef43cb12" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:7d43ac9c7eeda5100fb0a7152fab7099c9cf9e5abd3bb36928eb98c7d7a339c6" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:3b93043b14ba7eb08c57afca19751658ece1cfa2f0b7b1fb5c7a41452fbb8482" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:c09956606c08c4a7c6178a04ba2dd9388fcc5db32002ade9c9bc865ab156ab6d" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux2014_ppc64le.whl", hash = "sha256:b0cfe925610f2fd59555bb7fc37bd739e4b197d33f2a8b2fae7b9c0c6640318c" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:4d00b91c77ceb064c9b0459f0d6ea5bfdbc53ea9e17cf75731e151ef25a830c7" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:c6258a3663780ae47ba73d43eb63c79c40ffddfb764e09b56df33be2f9479837" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c29e758f0e734e1e90357ae01ec9c6daf19ff60a051192fe110d8fb25c62600e" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f3621a46cdc7a9ba8080422262398a91762a581d27e0647746588d3f995c88" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:47f7aa217b25833cd6f0e72b0d224be55393c2692b4f5e0561cb3beeb10296e9" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c2fdc855149efe7cdcc2a01ca02bfa24761c640203ea94df467f3baf19078be" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5effd87c7d363890259eac16c56a4e8da307286012c076223997f8cc4a8c435b" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6dd1cf2995fdbd64fc0802313e8323f5fa18994d51af059b5b8862b73b5e53f0" }, + { file = "pymongo-4.3.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:bb869707d8e30645ed6766e44098600ca6cdf7989c22a3ea2b7966bb1d98d4b2" }, + { file = "pymongo-4.3.3-cp37-cp37m-win32.whl", hash = "sha256:49210feb0be8051a64d71691f0acbfbedc33e149f0a5d6e271fddf6a12493fed" }, + { file = "pymongo-4.3.3-cp37-cp37m-win_amd64.whl", hash = "sha256:54c377893f2cbbffe39abcff5ff2e917b082c364521fa079305f6f064e1a24a9" }, + { file = "pymongo-4.3.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c184ec5be465c0319440734491e1aa4709b5f3ba75fdfc9dbbc2ae715a7f6829" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:dca34367a4e77fcab0693e603a959878eaf2351585e7d752cac544bc6b2dee46" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cd6a4afb20fb3c26a7bfd4611a0bbb24d93cbd746f5eb881f114b5e38fd55501" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:0c466710871d0026c190fc4141e810cf9d9affbf4935e1d273fbdc7d7cda6143" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:d07d06dba5b5f7d80f9cc45501456e440f759fe79f9895922ed486237ac378a8" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux2014_ppc64le.whl", hash = "sha256:711bc52cb98e7892c03e9b669bebd89c0a890a90dbc6d5bb2c47f30239bac6e9" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:34b040e095e1671df0c095ec0b04fc4ebb19c4c160f87c2b55c079b16b1a6b00" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:4ed00f96e147f40b565fe7530d1da0b0f3ab803d5dd5b683834500fa5d195ec4" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef888f48eb9203ee1e04b9fb27429017b290fb916f1e7826c2f7808c88798394" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:316498b642c00401370b2156b5233b256f9b33799e0a8d9d0b8a7da217a20fca" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa7e202feb683dad74f00dea066690448d0cfa310f8a277db06ec8eb466601b5" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52896e22115c97f1c829db32aa2760b0d61839cfe08b168c2b1d82f31dbc5f55" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c051fe37c96b9878f37fa58906cb53ecd13dcb7341d3a85f1e2e2f6b10782d9" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5134d33286c045393c7beb51be29754647cec5ebc051cf82799c5ce9820a2ca2" }, + { file = "pymongo-4.3.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a9c2885b4a8e6e39db5662d8b02ca6dcec796a45e48c2de12552841f061692ba" }, + { file = "pymongo-4.3.3-cp38-cp38-win32.whl", hash = "sha256:a6cd6f1db75eb07332bd3710f58f5fce4967eadbf751bad653842750a61bda62" }, + { file = "pymongo-4.3.3-cp38-cp38-win_amd64.whl", hash = "sha256:d5571b6978750601f783cea07fb6b666837010ca57e5cefa389c1d456f6222e2" }, + { file = "pymongo-4.3.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:81d1a7303bd02ca1c5be4aacd4db73593f573ba8e0c543c04c6da6275fd7a47e" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:016c412118e1c23fef3a1eada4f83ae6e8844fd91986b2e066fc1b0013cdd9ae" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:8fd6e191b92a10310f5a6cfe10d6f839d79d192fb02480bda325286bd1c7b385" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:e2961b05f9c04a53da8bfc72f1910b6aec7205fcf3ac9c036d24619979bbee4b" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:b38a96b3eed8edc515b38257f03216f382c4389d022a8834667e2bc63c0c0c31" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux2014_ppc64le.whl", hash = "sha256:c1a70c51da9fa95bd75c167edb2eb3f3c4d27bc4ddd29e588f21649d014ec0b7" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:8a06a0c02f5606330e8f2e2f3b7949877ca7e4024fa2bff5a4506bec66c49ec7" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:6c2216d8b6a6d019c6f4b1ad55f890e5e77eb089309ffc05b6911c09349e7474" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eac0a143ef4f28f49670bf89cb15847eb80b375d55eba401ca2f777cd425f338" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:08fc250b5552ee97ceeae0f52d8b04f360291285fc7437f13daa516ce38fdbc6" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704d939656e21b073bfcddd7228b29e0e8a93dd27b54240eaafc0b9a631629a6" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1074f1a6f23e28b983c96142f2d45be03ec55d93035b471c26889a7ad2365db3" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b16250238de8dafca225647608dddc7bbb5dce3dd53b4d8e63c1cc287394c2f" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7761cacb8745093062695b11574effea69db636c2fd0a9269a1f0183712927b4" }, + { file = "pymongo-4.3.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:fd7bb378d82b88387dc10227cfd964f6273eb083e05299e9b97cbe075da12d11" }, + { file = "pymongo-4.3.3-cp39-cp39-win32.whl", hash = "sha256:dc24d245026a72d9b4953729d31813edd4bd4e5c13622d96e27c284942d33f24" }, + { file = "pymongo-4.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:fc28e8d85d392a06434e9a934908d97e2cf453d69488d2bcd0bfb881497fd975" }, + { file = "pymongo-4.3.3.tar.gz", hash = "sha256:34e95ffb0a68bffbc3b437f2d1f25fc916fef3df5cdeed0992da5f42fae9b807" }, +] + +[package.dependencies] +dnspython = ">=1.16.0,<3.0.0" [package.extras] aws = ["pymongo-auth-aws (<2.0.0)"] -encryption = ["pymongocrypt (>=1.3.0,<2.0.0)"] +encryption = ["pymongo-auth-aws (<2.0.0)", "pymongocrypt (>=1.3.0,<2.0.0)"] gssapi = ["pykerberos"] ocsp = ["certifi", "pyopenssl (>=17.2.0)", "requests (<3.0.0)", "service-identity (>=18.1.0)"] snappy = ["python-snappy"] -srv = ["dnspython (>=1.16.0,<3.0.0)"] zstd = ["zstandard"] [[package]] @@ -230,64 +521,74 @@ description = "A cross-platform clipboard module for Python. (Only handles plain category = "main" optional = false python-versions = "*" +files = [ + { file = "pyperclip-1.8.2.tar.gz", hash = "sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57" }, +] [[package]] name = "python-decouple" -version = "3.6" +version = "3.8" description = "Strict separation of settings from code." category = "main" optional = false python-versions = "*" +files = [ + { file = "python-decouple-3.8.tar.gz", hash = "sha256:ba6e2657d4f376ecc46f77a3a615e058d93ba5e465c01bbe57289bfb7cce680f" }, + { file = "python_decouple-3.8-py3-none-any.whl", hash = "sha256:d0d45340815b25f4de59c974b855bb38d03151d81b037d9e3f463b0c9f8cbd66" }, +] [[package]] name = "python-dotenv" -version = "0.21.0" +version = "1.0.0" description = "Read key-value pairs from a .env file and set them as environment variables" category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + { file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba" }, + { file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a" }, +] [package.extras] cli = ["click (>=5.0)"] [[package]] name = "python-telegram-bot" -version = "13.14" +version = "20.3" description = "We have made you a wrapper you can't refuse" category = "main" optional = false python-versions = ">=3.7" +files = [ + { file = "python-telegram-bot-20.3.tar.gz", hash = "sha256:73e46a534be9d1c790ce8b494765cca18a5c2f3f5b4932d83bcb06bb0051eb4a" }, + { file = "python_telegram_bot-20.3-py3-none-any.whl", hash = "sha256:1185edee387db7b08027e87b67fa9a3cc3263ae5ab5bb55513acd1bca5c3cf4b" }, +] [package.dependencies] -APScheduler = "3.6.3" -cachetools = "4.2.2" -certifi = "*" -pytz = ">=2018.6" -tornado = "6.1" +httpx = ">=0.24.0,<0.25.0" [package.extras] -json = ["ujson"] -passport = ["cryptography (!=3.4,!=3.4.1,!=3.4.2,!=3.4.3)"] -socks = ["PySocks"] +all = ["APScheduler (>=3.10.1,<3.11.0)", "aiolimiter (>=1.0.0,<1.1.0)", "cachetools (>=5.3.0,<5.4.0)", "cryptography (>=39.0.1)", "httpx[http2]", "httpx[socks]", "pytz (>=2018.6)", "tornado (>=6.2,<7.0)"] +callback-data = ["cachetools (>=5.3.0,<5.4.0)"] +ext = ["APScheduler (>=3.10.1,<3.11.0)", "aiolimiter (>=1.0.0,<1.1.0)", "cachetools (>=5.3.0,<5.4.0)", "pytz (>=2018.6)", "tornado (>=6.2,<7.0)"] +http2 = ["httpx[http2]"] +job-queue = ["APScheduler (>=3.10.1,<3.11.0)", "pytz (>=2018.6)"] +passport = ["cryptography (>=39.0.1)"] +rate-limiter = ["aiolimiter (>=1.0.0,<1.1.0)"] +socks = ["httpx[socks]"] +webhooks = ["tornado (>=6.2,<7.0)"] [[package]] name = "pytz" -version = "2022.4" +version = "2023.3" description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" - -[[package]] -name = "pytz-deprecation-shim" -version = "0.1.0.post0" -description = "Shims to make deprecation of pytz easier" -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" - -[package.dependencies] -tzdata = {version = "*", markers = "python_version >= \"3.6\""} +files = [ + { file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb" }, + { file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588" }, +] [[package]] name = "requests" @@ -296,6 +597,10 @@ description = "Python HTTP for Humans." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + { file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d" }, + { file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61" }, +] [package.dependencies] certifi = ">=2017.4.17" @@ -305,28 +610,19 @@ urllib3 = ">=1.21.1,<1.27" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<5)"] [[package]] -name = "setuptools" -version = "65.5.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" +name = "sniffio" +version = "1.3.0" +description = "Sniff out which async library your code is running under" category = "main" optional = false python-versions = ">=3.7" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mock", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + { file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384" }, + { file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101" }, +] [[package]] name = "spongemock" @@ -335,17 +631,25 @@ description = "Mock some text like spongebob would. mOCk SoMe TexT lIKe SpONGebO category = "main" optional = false python-versions = "*" +files = [ + { file = "spongemock-0.3.4-py2.py3-none-any.whl", hash = "sha256:6a7df0a929a8d0f55cae1b2cfb45db471775f6fda0f2c2239d9935dbe6ac500b" }, + { file = "spongemock-0.3.4.tar.gz", hash = "sha256:40c1316d9ece635d727ac2b3c6e22e5f9d85ba402ee4dc6eeef5a8e8c17ff892" }, +] [package.dependencies] pyperclip = ">=1.5.27" [[package]] name = "telegraph" -version = "2.1.0" +version = "2.2.0" description = "Telegraph API wrapper" category = "main" optional = false python-versions = "*" +files = [ + { file = "telegraph-2.2.0-py3-none-any.whl", hash = "sha256:d20b2a5d7cfdd66890c8c3fd60aa8585cabb7c6b03579d3eb1cd8af056ed9971" }, + { file = "telegraph-2.2.0.tar.gz", hash = "sha256:012908f18208c451c7189f4bda7c39a1369241ac436c7543bb6c3fccbe9cfd5d" }, +] [package.dependencies] requests = "*" @@ -353,22 +657,6 @@ requests = "*" [package.extras] aio = ["httpx"] -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -category = "dev" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "tornado" -version = "6.1" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "main" -optional = false -python-versions = ">= 3.5" - [[package]] name = "tqdm" version = "4.63.0" @@ -376,6 +664,10 @@ description = "Fast, Extensible Progress Meter" category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +files = [ + { file = "tqdm-4.63.0-py2.py3-none-any.whl", hash = "sha256:e643e071046f17139dea55b880dc9b33822ce21613b4a4f5ea57f202833dbc29" }, + { file = "tqdm-4.63.0.tar.gz", hash = "sha256:1d9835ede8e394bb8c9dcbffbca02d717217113adc679236873eeaac5bc0b3cd" }, +] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -387,43 +679,27 @@ telegram = ["requests"] [[package]] name = "typing-extensions" -version = "4.4.0" +version = "4.6.3" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" - -[[package]] -name = "tzdata" -version = "2022.5" -description = "Provider of IANA time zone data" -category = "main" -optional = false -python-versions = ">=2" - -[[package]] -name = "tzlocal" -version = "4.2" -description = "tzinfo object for the local timezone" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -pytz-deprecation-shim = "*" -tzdata = {version = "*", markers = "platform_system == \"Windows\""} - -[package.extras] -devenv = ["black", "pyroma", "pytest-cov", "zest.releaser"] -test = ["pytest (>=4.3)", "pytest-mock (>=3.3)"] +files = [ + { file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26" }, + { file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5" }, +] [[package]] name = "urllib3" -version = "1.26.12" +version = "1.26.16" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + { file = "urllib3-1.26.16-py2.py3-none-any.whl", hash = "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f" }, + { file = "urllib3-1.26.16.tar.gz", hash = "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14" }, +] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] @@ -437,367 +713,11 @@ description = "̖̘A ̩̼͜͡ś̛̺̦̃m̡̥̫a̛̳̹l̵̷͐ͪl ̶̫l̞̆̇i͈ category = "main" optional = false python-versions = "*" +files = [ + { file = "zalgo_text-0.6.tar.gz", hash = "sha256:4917b5053a014e3251e95e2f6fd32ed29770ccc2d89921dcab147eb8fc6be224" }, +] [metadata] -lock-version = "1.1" -python-versions = "3.10.8" -content-hash = "ae7cc51d599cbd994d0f03ea510d954ee43f29ec3437a8354d95986194790888" - -[metadata.files] -apscheduler = [ - {file = "APScheduler-3.6.3-py2.py3-none-any.whl", hash = "sha256:e8b1ecdb4c7cb2818913f766d5898183c7cb8936680710a4d3a966e02262e526"}, - {file = "APScheduler-3.6.3.tar.gz", hash = "sha256:3bb5229eed6fbbdafc13ce962712ae66e175aa214c69bed35a06bffcf0c5e244"}, -] -black = [ - {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"}, - {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"}, - {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"}, - {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"}, - {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"}, - {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"}, - {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"}, - {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"}, - {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"}, - {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"}, - {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"}, - {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"}, - {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"}, - {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"}, - {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"}, - {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"}, - {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"}, - {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"}, - {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"}, - {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"}, - {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"}, -] -cachetools = [ - {file = "cachetools-4.2.2-py3-none-any.whl", hash = "sha256:2cc0b89715337ab6dbba85b5b50effe2b0c74e035d83ee8ed637cf52f12ae001"}, - {file = "cachetools-4.2.2.tar.gz", hash = "sha256:61b5ed1e22a0924aed1d23b478f37e8d52549ff8a961de2909c69bf950020cff"}, -] -certifi = [ - {file = "certifi-2022.9.24-py3-none-any.whl", hash = "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"}, - {file = "certifi-2022.9.24.tar.gz", hash = "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"}, - {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, -] -click = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, -] -colorama = [ - {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, - {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, -] -dnspython = [ - {file = "dnspython-2.2.1-py3-none-any.whl", hash = "sha256:a851e51367fb93e9e1361732c1d60dab63eff98712e503ea7d92e6eccb109b4f"}, - {file = "dnspython-2.2.1.tar.gz", hash = "sha256:0f7569a4a6ff151958b64304071d370daa3243d15941a7beedf0c9fe5105603e"}, -] -emoji = [ - {file = "emoji-1.6.1.tar.gz", hash = "sha256:53d61a8e4c025f6c295ab99c842302c66d47952199c4fde66dd060dee3ad4324"}, -] -hentai = [ - {file = "hentai-3.2.10-py3-none-any.whl", hash = "sha256:62ffe034bc6f0e7ed4cc17cd0d2e689c816dafb39e831d952206b8a3c95e9979"}, - {file = "hentai-3.2.10.tar.gz", hash = "sha256:1b9f4e03fad69a4a61502534db81683e299969af9d986ec643d092771e537846"}, -] -idna = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] -mongoengine = [ - {file = "mongoengine-0.24.2-py3-none-any.whl", hash = "sha256:f5c4e1b206b2ccffe4adc7a6283ed26dd799bd115a5fb1d2e885a075132cdb88"}, - {file = "mongoengine-0.24.2.tar.gz", hash = "sha256:c76d49658575bb995682e2e77c8ef7cda63faf939415b32ee923745d120f8b02"}, -] -mypy-extensions = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] -pathspec = [ - {file = "pathspec-0.10.1-py3-none-any.whl", hash = "sha256:46846318467efc4556ccfd27816e004270a9eeeeb4d062ce5e6fc7a87c573f93"}, - {file = "pathspec-0.10.1.tar.gz", hash = "sha256:7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d"}, -] -pillow = [ - {file = "Pillow-9.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:a9c9bc489f8ab30906d7a85afac4b4944a572a7432e00698a7239f44a44e6efb"}, - {file = "Pillow-9.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:510cef4a3f401c246cfd8227b300828715dd055463cdca6176c2e4036df8bd4f"}, - {file = "Pillow-9.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7888310f6214f19ab2b6df90f3f06afa3df7ef7355fc025e78a3044737fab1f5"}, - {file = "Pillow-9.2.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:831e648102c82f152e14c1a0938689dbb22480c548c8d4b8b248b3e50967b88c"}, - {file = "Pillow-9.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1cc1d2451e8a3b4bfdb9caf745b58e6c7a77d2e469159b0d527a4554d73694d1"}, - {file = "Pillow-9.2.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:136659638f61a251e8ed3b331fc6ccd124590eeff539de57c5f80ef3a9594e58"}, - {file = "Pillow-9.2.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:6e8c66f70fb539301e064f6478d7453e820d8a2c631da948a23384865cd95544"}, - {file = "Pillow-9.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:37ff6b522a26d0538b753f0b4e8e164fdada12db6c6f00f62145d732d8a3152e"}, - {file = "Pillow-9.2.0-cp310-cp310-win32.whl", hash = "sha256:c79698d4cd9318d9481d89a77e2d3fcaeff5486be641e60a4b49f3d2ecca4e28"}, - {file = "Pillow-9.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:254164c57bab4b459f14c64e93df11eff5ded575192c294a0c49270f22c5d93d"}, - {file = "Pillow-9.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:adabc0bce035467fb537ef3e5e74f2847c8af217ee0be0455d4fec8adc0462fc"}, - {file = "Pillow-9.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:336b9036127eab855beec9662ac3ea13a4544a523ae273cbf108b228ecac8437"}, - {file = "Pillow-9.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50dff9cc21826d2977ef2d2a205504034e3a4563ca6f5db739b0d1026658e004"}, - {file = "Pillow-9.2.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cb6259196a589123d755380b65127ddc60f4c64b21fc3bb46ce3a6ea663659b0"}, - {file = "Pillow-9.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b0554af24df2bf96618dac71ddada02420f946be943b181108cac55a7a2dcd4"}, - {file = "Pillow-9.2.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:15928f824870535c85dbf949c09d6ae7d3d6ac2d6efec80f3227f73eefba741c"}, - {file = "Pillow-9.2.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:bdd0de2d64688ecae88dd8935012c4a72681e5df632af903a1dca8c5e7aa871a"}, - {file = "Pillow-9.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5b87da55a08acb586bad5c3aa3b86505f559b84f39035b233d5bf844b0834b1"}, - {file = "Pillow-9.2.0-cp311-cp311-win32.whl", hash = "sha256:b6d5e92df2b77665e07ddb2e4dbd6d644b78e4c0d2e9272a852627cdba0d75cf"}, - {file = "Pillow-9.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6bf088c1ce160f50ea40764f825ec9b72ed9da25346216b91361eef8ad1b8f8c"}, - {file = "Pillow-9.2.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:2c58b24e3a63efd22554c676d81b0e57f80e0a7d3a5874a7e14ce90ec40d3069"}, - {file = "Pillow-9.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eef7592281f7c174d3d6cbfbb7ee5984a671fcd77e3fc78e973d492e9bf0eb3f"}, - {file = "Pillow-9.2.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dcd7b9c7139dc8258d164b55696ecd16c04607f1cc33ba7af86613881ffe4ac8"}, - {file = "Pillow-9.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a138441e95562b3c078746a22f8fca8ff1c22c014f856278bdbdd89ca36cff1b"}, - {file = "Pillow-9.2.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:93689632949aff41199090eff5474f3990b6823404e45d66a5d44304e9cdc467"}, - {file = "Pillow-9.2.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:f3fac744f9b540148fa7715a435d2283b71f68bfb6d4aae24482a890aed18b59"}, - {file = "Pillow-9.2.0-cp37-cp37m-win32.whl", hash = "sha256:fa768eff5f9f958270b081bb33581b4b569faabf8774726b283edb06617101dc"}, - {file = "Pillow-9.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:69bd1a15d7ba3694631e00df8de65a8cb031911ca11f44929c97fe05eb9b6c1d"}, - {file = "Pillow-9.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:030e3460861488e249731c3e7ab59b07c7853838ff3b8e16aac9561bb345da14"}, - {file = "Pillow-9.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:74a04183e6e64930b667d321524e3c5361094bb4af9083db5c301db64cd341f3"}, - {file = "Pillow-9.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d33a11f601213dcd5718109c09a52c2a1c893e7461f0be2d6febc2879ec2402"}, - {file = "Pillow-9.2.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fd6f5e3c0e4697fa7eb45b6e93996299f3feee73a3175fa451f49a74d092b9f"}, - {file = "Pillow-9.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a647c0d4478b995c5e54615a2e5360ccedd2f85e70ab57fbe817ca613d5e63b8"}, - {file = "Pillow-9.2.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:4134d3f1ba5f15027ff5c04296f13328fecd46921424084516bdb1b2548e66ff"}, - {file = "Pillow-9.2.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:bc431b065722a5ad1dfb4df354fb9333b7a582a5ee39a90e6ffff688d72f27a1"}, - {file = "Pillow-9.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:1536ad017a9f789430fb6b8be8bf99d2f214c76502becc196c6f2d9a75b01b76"}, - {file = "Pillow-9.2.0-cp38-cp38-win32.whl", hash = "sha256:2ad0d4df0f5ef2247e27fc790d5c9b5a0af8ade9ba340db4a73bb1a4a3e5fb4f"}, - {file = "Pillow-9.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:ec52c351b35ca269cb1f8069d610fc45c5bd38c3e91f9ab4cbbf0aebc136d9c8"}, - {file = "Pillow-9.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:0ed2c4ef2451de908c90436d6e8092e13a43992f1860275b4d8082667fbb2ffc"}, - {file = "Pillow-9.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ad2f835e0ad81d1689f1b7e3fbac7b01bb8777d5a985c8962bedee0cc6d43da"}, - {file = "Pillow-9.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea98f633d45f7e815db648fd7ff0f19e328302ac36427343e4432c84432e7ff4"}, - {file = "Pillow-9.2.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7761afe0126d046974a01e030ae7529ed0ca6a196de3ec6937c11df0df1bc91c"}, - {file = "Pillow-9.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a54614049a18a2d6fe156e68e188da02a046a4a93cf24f373bffd977e943421"}, - {file = "Pillow-9.2.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:5aed7dde98403cd91d86a1115c78d8145c83078e864c1de1064f52e6feb61b20"}, - {file = "Pillow-9.2.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:13b725463f32df1bfeacbf3dd197fb358ae8ebcd8c5548faa75126ea425ccb60"}, - {file = "Pillow-9.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:808add66ea764ed97d44dda1ac4f2cfec4c1867d9efb16a33d158be79f32b8a4"}, - {file = "Pillow-9.2.0-cp39-cp39-win32.whl", hash = "sha256:337a74fd2f291c607d220c793a8135273c4c2ab001b03e601c36766005f36885"}, - {file = "Pillow-9.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:fac2d65901fb0fdf20363fbd345c01958a742f2dc62a8dd4495af66e3ff502a4"}, - {file = "Pillow-9.2.0-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:ad2277b185ebce47a63f4dc6302e30f05762b688f8dc3de55dbae4651872cdf3"}, - {file = "Pillow-9.2.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c7b502bc34f6e32ba022b4a209638f9e097d7a9098104ae420eb8186217ebbb"}, - {file = "Pillow-9.2.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d1f14f5f691f55e1b47f824ca4fdcb4b19b4323fe43cc7bb105988cad7496be"}, - {file = "Pillow-9.2.0-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:dfe4c1fedfde4e2fbc009d5ad420647f7730d719786388b7de0999bf32c0d9fd"}, - {file = "Pillow-9.2.0-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:f07f1f00e22b231dd3d9b9208692042e29792d6bd4f6639415d2f23158a80013"}, - {file = "Pillow-9.2.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1802f34298f5ba11d55e5bb09c31997dc0c6aed919658dfdf0198a2fe75d5490"}, - {file = "Pillow-9.2.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17d4cafe22f050b46d983b71c707162d63d796a1235cdf8b9d7a112e97b15bac"}, - {file = "Pillow-9.2.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:96b5e6874431df16aee0c1ba237574cb6dff1dcb173798faa6a9d8b399a05d0e"}, - {file = "Pillow-9.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:0030fdbd926fb85844b8b92e2f9449ba89607231d3dd597a21ae72dc7fe26927"}, - {file = "Pillow-9.2.0.tar.gz", hash = "sha256:75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04"}, -] -platformdirs = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, -] -pydantic = [ - {file = "pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb6ad4489af1bac6955d38ebcb95079a836af31e4c4f74aba1ca05bb9f6027bd"}, - {file = "pydantic-1.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1f5a63a6dfe19d719b1b6e6106561869d2efaca6167f84f5ab9347887d78b98"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:352aedb1d71b8b0736c6d56ad2bd34c6982720644b0624462059ab29bd6e5912"}, - {file = "pydantic-1.10.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19b3b9ccf97af2b7519c42032441a891a5e05c68368f40865a90eb88833c2559"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e9069e1b01525a96e6ff49e25876d90d5a563bc31c658289a8772ae186552236"}, - {file = "pydantic-1.10.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:355639d9afc76bcb9b0c3000ddcd08472ae75318a6eb67a15866b87e2efa168c"}, - {file = "pydantic-1.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:ae544c47bec47a86bc7d350f965d8b15540e27e5aa4f55170ac6a75e5f73b644"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a4c805731c33a8db4b6ace45ce440c4ef5336e712508b4d9e1aafa617dc9907f"}, - {file = "pydantic-1.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d49f3db871575e0426b12e2f32fdb25e579dea16486a26e5a0474af87cb1ab0a"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37c90345ec7dd2f1bcef82ce49b6235b40f282b94d3eec47e801baf864d15525"}, - {file = "pydantic-1.10.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b5ba54d026c2bd2cb769d3468885f23f43710f651688e91f5fb1edcf0ee9283"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05e00dbebbe810b33c7a7362f231893183bcc4251f3f2ff991c31d5c08240c42"}, - {file = "pydantic-1.10.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2d0567e60eb01bccda3a4df01df677adf6b437958d35c12a3ac3e0f078b0ee52"}, - {file = "pydantic-1.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:c6f981882aea41e021f72779ce2a4e87267458cc4d39ea990729e21ef18f0f8c"}, - {file = "pydantic-1.10.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4aac8e7103bf598373208f6299fa9a5cfd1fc571f2d40bf1dd1955a63d6eeb5"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a7b66c3f499108b448f3f004801fcd7d7165fb4200acb03f1c2402da73ce4c"}, - {file = "pydantic-1.10.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bedf309630209e78582ffacda64a21f96f3ed2e51fbf3962d4d488e503420254"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9300fcbebf85f6339a02c6994b2eb3ff1b9c8c14f502058b5bf349d42447dcf5"}, - {file = "pydantic-1.10.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:216f3bcbf19c726b1cc22b099dd409aa371f55c08800bcea4c44c8f74b73478d"}, - {file = "pydantic-1.10.2-cp37-cp37m-win_amd64.whl", hash = "sha256:dd3f9a40c16daf323cf913593083698caee97df2804aa36c4b3175d5ac1b92a2"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b97890e56a694486f772d36efd2ba31612739bc6f3caeee50e9e7e3ebd2fdd13"}, - {file = "pydantic-1.10.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9cabf4a7f05a776e7793e72793cd92cc865ea0e83a819f9ae4ecccb1b8aa6116"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06094d18dd5e6f2bbf93efa54991c3240964bb663b87729ac340eb5014310624"}, - {file = "pydantic-1.10.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc78cc83110d2f275ec1970e7a831f4e371ee92405332ebfe9860a715f8336e1"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ee433e274268a4b0c8fde7ad9d58ecba12b069a033ecc4645bb6303c062d2e9"}, - {file = "pydantic-1.10.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7c2abc4393dea97a4ccbb4ec7d8658d4e22c4765b7b9b9445588f16c71ad9965"}, - {file = "pydantic-1.10.2-cp38-cp38-win_amd64.whl", hash = "sha256:0b959f4d8211fc964772b595ebb25f7652da3f22322c007b6fed26846a40685e"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c33602f93bfb67779f9c507e4d69451664524389546bacfe1bee13cae6dc7488"}, - {file = "pydantic-1.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5760e164b807a48a8f25f8aa1a6d857e6ce62e7ec83ea5d5c5a802eac81bad41"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6eb843dcc411b6a2237a694f5e1d649fc66c6064d02b204a7e9d194dff81eb4b"}, - {file = "pydantic-1.10.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b8795290deaae348c4eba0cebb196e1c6b98bdbe7f50b2d0d9a4a99716342fe"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e0bedafe4bc165ad0a56ac0bd7695df25c50f76961da29c050712596cf092d6d"}, - {file = "pydantic-1.10.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e05aed07fa02231dbf03d0adb1be1d79cabb09025dd45aa094aa8b4e7b9dcda"}, - {file = "pydantic-1.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:c1ba1afb396148bbc70e9eaa8c06c1716fdddabaf86e7027c5988bae2a829ab6"}, - {file = "pydantic-1.10.2-py3-none-any.whl", hash = "sha256:1b6ee725bd6e83ec78b1aa32c5b1fa67a3a65badddde3976bca5fe4568f27709"}, - {file = "pydantic-1.10.2.tar.gz", hash = "sha256:91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410"}, -] -pymongo = [ - {file = "pymongo-4.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1c81414b706627f15e921e29ae2403aab52e33e36ed92ed989c602888d7c3b90"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux1_i686.whl", hash = "sha256:c549bb519456ee230e92f415c5b4d962094caac0fdbcc4ed22b576f66169764e"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:70216ec4c248213ae95ea499b6314c385ce01a5946c448fb22f6c8395806e740"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux2014_i686.whl", hash = "sha256:8a86e8c2ac2ec87141e1c6cb00bdb18a4560f06e5f96769abcd1dda24dc0e764"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux2014_ppc64le.whl", hash = "sha256:314b556afd72eb21a6a10bd1f45ef252509f014f80207db59c97372103c88237"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux2014_s390x.whl", hash = "sha256:902e2c9030cb042c49750bc70d72d830d42c64ea0df5ff8630c171e065c93dd7"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux2014_x86_64.whl", hash = "sha256:c69ef5906dcd6ec565d4d887ba97ceb2a84f3b614307ee3b4780cb1ea40b1867"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07564178ecc203a84f63e72972691af6c0c82d2dc0c9da66ba711695276089ba"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f47d5f10922cf7f7dfcd1406bd0926cef6d866a75953c3745502dffd7ac197dd"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4cadaaa5c19ad23fc84559e90284f2eb003c36958ebb2c06f286b678f441285f"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d94f535df9f539615bc3dbbef185ded3b609373bb44ca1afffcabac70202678a"}, - {file = "pymongo-4.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:147a23cd96feb67606ac957744d8d25b013426cdc3c7164a4f99bd8253f649e3"}, - {file = "pymongo-4.2.0-cp310-cp310-win32.whl", hash = "sha256:ecdcb0d4e9b08b739035f57a09330efc6f464bd7f942b63897395d996ca6ebd5"}, - {file = "pymongo-4.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:8c223aea52c359cc8fdee5bd3475532590755c269ec4d4fe581acd47a44e9952"}, - {file = "pymongo-4.2.0-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:fe0820d169635e41c14a5d21514282e0b93347878666ec9d5d3bf0eed0649948"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:e39cacee70a98758f9b2da53ee175378f07c60113b1fa4fae40cbaee5583181e"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:701d331060dae72bf3ebdb82924405d14136a69282ccb00c89fc69dee21340b4"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:e08fe1731f5429435b8dea1db9663f9ed1812915ff803fc9991c7c4841ed62ad"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:60c470a58c5b62b1b12a5f5458f8e2f2f67b94e198d03dc5352f854d9230c394"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux2014_ppc64le.whl", hash = "sha256:b211e161b6cc2790e0d640ad38e0429d06c944e5da23410f4dc61809dba25095"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:ed90a9de4431cbfb2f3b2ef0c5fd356e61c85117b2be4db3eae28cb409f6e2d5"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:68e1e49a5675748233f7b05330f092582cd52f2850b4244939fd75ba640593ed"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:764fc15418d94bce5c2f8ebdbf66544f96f42efb1364b61e715e5b33281b388d"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e64442aba81ed4df1ca494b87bf818569a1280acaa73071c68014f7a884e83f1"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:83168126ae2457d1a19b2af665cafa7ef78c2dcff192d7d7b5dad6b36c73ae24"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69d0180bca594e81cdb4a2af328bdb4046f59e10aaeef7619496fe64f2ec918c"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80cbf0b043061451660099fff9001a7faacb2c9c983842b4819526e2f944dc6c"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e1b8f5e2f9637492b0da4d51f78ecb17786e61d6c461ead8542c944750faf4f9"}, - {file = "pymongo-4.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1a957cdc2b26eeed4d8f1889a40c6023dd1bd94672dd0f5ce327314f2caaefd4"}, - {file = "pymongo-4.2.0-cp37-cp37m-win32.whl", hash = "sha256:6bd5888997ea3eae9830c6cc7964b61dcfbc50eb3a5a6ce56ad5f86d5579b11c"}, - {file = "pymongo-4.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:dc24737d24ce0de762bee9c2a884639819485f679bbac8ab5be9c161ef6f9b2c"}, - {file = "pymongo-4.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:193cc97d44b1e6d2253ea94e30c6f94f994efb7166e2452af4df55825266e88b"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e152c26ffc30331e9d57591fc4c05453c209aa20ba299d1deb7173f7d1958c22"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8a9bc4dcfc2bda69ee88cdb7a89b03f2b8eca668519b704384a264dea2db4209"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8cbb868e88c4eee1c53364bb343d226a3c0e959e791e6828030cb78f46cfcbe3"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:2bfe6b59f431f40fa545547616f4acf0c0c4b64518b1f951083e3bad06eb368b"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux2014_ppc64le.whl", hash = "sha256:ff66014687598823b6b23751884b4aa67eb934445406d95894dfc60cb7bfcc18"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:31c50da4a080166bc29403aa91f4c76e0889b4f24928d1b60508a37c1bf87f9a"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:ccfdc7722df445c49dc6b5d514c3544cad99b53189165f7546793933050ac7fb"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc7ebc37b03956a070260665079665eae69e5e96007694214f3a2107af96816a"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8b4a782aac43948308087b962c9ecb030ba98886ce6dee3ad7aafe8c5e1ce80"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1c23527f8e13f526fededbb96f2e7888f179fe27c51d41c2724f7059b75b2fa"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83cc3c35aeeceb67143914db67f685206e1aa37ea837d872f4bc28d7f80917c9"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e09cdf5aad507c8faa30d97884cc42932ed3a9c2b7f22cc3ccc607bae03981b3"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0f53253f4777cbccc426e669a2af875f26c95bd090d88593287b9a0a8ac7fa25"}, - {file = "pymongo-4.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:21238b19243a42f9a34a6d39e7580ceebc6da6d2f3cf729c1cff9023cb61a5f1"}, - {file = "pymongo-4.2.0-cp38-cp38-win32.whl", hash = "sha256:766acb5b1a19eae0f7467bcd3398748f110ea5309cdfc59faa5185dcc7fd4dca"}, - {file = "pymongo-4.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:10f09c4f09757c2e2a707ad7304f5d69cb8fdf7cbfb644dbacfe5bbe8afe311b"}, - {file = "pymongo-4.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a6bf01b9237f794fa3bdad5089474067d28be7e199b356a18d3f247a45775f26"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d8bb745321716e7a11220a67c88212ecedde4021e1de4802e563baef9df921d2"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3be53e9888e759c49ae35d747ff77a04ff82b894dd64601e0f3a5a159b406245"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:a3efdf154844244e0dabe902cf1827fdced55fa5b144adec2a86e5ce50a99b97"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:a7eb5b06744b911b6668b427c8abc71b6d624e72d3dfffed00988fa1b4340f97"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux2014_ppc64le.whl", hash = "sha256:b0be613d926c5dbb0d3fc6b58e4f2be4979f80ae76fda6e47309f011b388fe0c"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:e7dcb73f683c155885a3488646fcead3a895765fed16e93c9b80000bc69e96cb"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:b537dd282de1b53d9ae7cf9f3df36420c8618390f2da92100391f3ba8f3c141a"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d98d2a8283c9928a9e5adf2f3c0181e095579e9732e1613aaa55d386e2bcb6c5"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76892bbce743eb9f90360b3626ea92f13d338010a1004b4488e79e555b339921"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:124d0e880b66f9b0778613198e89984984fdd37a3030a9007e5f459a42dfa2d3"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:773467d25c293f8e981b092361dab5fd800e1ba318403b7959d35004c67faedc"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6673ab3fbf3135cc1a8c0f70d480db5b2378c3a70af8d602f73f76b8338bdf97"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:153b8f8705970756226dfeeb7bb9637e0ad54a4d79b480b4c8244e34e16e1662"}, - {file = "pymongo-4.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:01721da74558f2f64a9f162ee063df403ed656b7d84229268d8e4ae99cfba59c"}, - {file = "pymongo-4.2.0-cp39-cp39-win32.whl", hash = "sha256:a25c0eb2d610b20e276e684be61c337396813b636b69373c17314283cb1a3b14"}, - {file = "pymongo-4.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:44b36ccb90aac5ea50be23c1a6e8f24fbfc78afabdef114af16c6e0a80981364"}, - {file = "pymongo-4.2.0.tar.gz", hash = "sha256:72f338f6aabd37d343bd9d1fdd3de921104d395766bcc5cdc4039e4c2dd97766"}, -] -pyperclip = [ - {file = "pyperclip-1.8.2.tar.gz", hash = "sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57"}, -] -python-decouple = [ - {file = "python-decouple-3.6.tar.gz", hash = "sha256:2838cdf77a5cf127d7e8b339ce14c25bceb3af3e674e039d4901ba16359968c7"}, - {file = "python_decouple-3.6-py3-none-any.whl", hash = "sha256:6cf502dc963a5c642ea5ead069847df3d916a6420cad5599185de6bab11d8c2e"}, -] -python-dotenv = [ - {file = "python-dotenv-0.21.0.tar.gz", hash = "sha256:b77d08274639e3d34145dfa6c7008e66df0f04b7be7a75fd0d5292c191d79045"}, - {file = "python_dotenv-0.21.0-py3-none-any.whl", hash = "sha256:1684eb44636dd462b66c3ee016599815514527ad99965de77f43e0944634a7e5"}, -] -python-telegram-bot = [ - {file = "python-telegram-bot-13.14.tar.gz", hash = "sha256:e9391d43eb1123de2677a9d24ea878a9d5327d65b2419afba653f476d26aecc3"}, - {file = "python_telegram_bot-13.14-py3-none-any.whl", hash = "sha256:79abc66355af2310bbaaf7f41746230b996434e287f21f27070c92978dc0964f"}, -] -pytz = [ - {file = "pytz-2022.4-py2.py3-none-any.whl", hash = "sha256:2c0784747071402c6e99f0bafdb7da0fa22645f06554c7ae06bf6358897e9c91"}, - {file = "pytz-2022.4.tar.gz", hash = "sha256:48ce799d83b6f8aab2020e369b627446696619e79645419610b9facd909b3174"}, -] -pytz-deprecation-shim = [ - {file = "pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl", hash = "sha256:8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6"}, - {file = "pytz_deprecation_shim-0.1.0.post0.tar.gz", hash = "sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d"}, -] -requests = [ - {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, - {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, -] -setuptools = [ - {file = "setuptools-65.5.0-py3-none-any.whl", hash = "sha256:f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356"}, - {file = "setuptools-65.5.0.tar.gz", hash = "sha256:512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -spongemock = [ - {file = "spongemock-0.3.4-py2.py3-none-any.whl", hash = "sha256:6a7df0a929a8d0f55cae1b2cfb45db471775f6fda0f2c2239d9935dbe6ac500b"}, - {file = "spongemock-0.3.4.tar.gz", hash = "sha256:40c1316d9ece635d727ac2b3c6e22e5f9d85ba402ee4dc6eeef5a8e8c17ff892"}, -] -telegraph = [ - {file = "telegraph-2.1.0-py3-none-any.whl", hash = "sha256:fed87d8fbc4edf1f57de575d9f9bf1baf0a626341e97b8452e59144c0decd8ba"}, - {file = "telegraph-2.1.0.tar.gz", hash = "sha256:7ea37bc8708da3fe366827cabfd93bec58b6fa080cd65dec7fb5f97285225690"}, -] -tomli = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] -tornado = [ - {file = "tornado-6.1-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:d371e811d6b156d82aa5f9a4e08b58debf97c302a35714f6f45e35139c332e32"}, - {file = "tornado-6.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:0d321a39c36e5f2c4ff12b4ed58d41390460f798422c4504e09eb5678e09998c"}, - {file = "tornado-6.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9de9e5188a782be6b1ce866e8a51bc76a0fbaa0e16613823fc38e4fc2556ad05"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:61b32d06ae8a036a6607805e6720ef00a3c98207038444ba7fd3d169cd998910"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:3e63498f680547ed24d2c71e6497f24bca791aca2fe116dbc2bd0ac7f191691b"}, - {file = "tornado-6.1-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:6c77c9937962577a6a76917845d06af6ab9197702a42e1346d8ae2e76b5e3675"}, - {file = "tornado-6.1-cp35-cp35m-win32.whl", hash = "sha256:6286efab1ed6e74b7028327365cf7346b1d777d63ab30e21a0f4d5b275fc17d5"}, - {file = "tornado-6.1-cp35-cp35m-win_amd64.whl", hash = "sha256:fa2ba70284fa42c2a5ecb35e322e68823288a4251f9ba9cc77be04ae15eada68"}, - {file = "tornado-6.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0a00ff4561e2929a2c37ce706cb8233b7907e0cdc22eab98888aca5dd3775feb"}, - {file = "tornado-6.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:748290bf9112b581c525e6e6d3820621ff020ed95af6f17fedef416b27ed564c"}, - {file = "tornado-6.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:e385b637ac3acaae8022e7e47dfa7b83d3620e432e3ecb9a3f7f58f150e50921"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:25ad220258349a12ae87ede08a7b04aca51237721f63b1808d39bdb4b2164558"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:65d98939f1a2e74b58839f8c4dab3b6b3c1ce84972ae712be02845e65391ac7c"}, - {file = "tornado-6.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:e519d64089b0876c7b467274468709dadf11e41d65f63bba207e04217f47c085"}, - {file = "tornado-6.1-cp36-cp36m-win32.whl", hash = "sha256:b87936fd2c317b6ee08a5741ea06b9d11a6074ef4cc42e031bc6403f82a32575"}, - {file = "tornado-6.1-cp36-cp36m-win_amd64.whl", hash = "sha256:cc0ee35043162abbf717b7df924597ade8e5395e7b66d18270116f8745ceb795"}, - {file = "tornado-6.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7250a3fa399f08ec9cb3f7b1b987955d17e044f1ade821b32e5f435130250d7f"}, - {file = "tornado-6.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:ed3ad863b1b40cd1d4bd21e7498329ccaece75db5a5bf58cd3c9f130843e7102"}, - {file = "tornado-6.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:dcef026f608f678c118779cd6591c8af6e9b4155c44e0d1bc0c87c036fb8c8c4"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:70dec29e8ac485dbf57481baee40781c63e381bebea080991893cd297742b8fd"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:d3f7594930c423fd9f5d1a76bee85a2c36fd8b4b16921cae7e965f22575e9c01"}, - {file = "tornado-6.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:3447475585bae2e77ecb832fc0300c3695516a47d46cefa0528181a34c5b9d3d"}, - {file = "tornado-6.1-cp37-cp37m-win32.whl", hash = "sha256:e7229e60ac41a1202444497ddde70a48d33909e484f96eb0da9baf8dc68541df"}, - {file = "tornado-6.1-cp37-cp37m-win_amd64.whl", hash = "sha256:cb5ec8eead331e3bb4ce8066cf06d2dfef1bfb1b2a73082dfe8a161301b76e37"}, - {file = "tornado-6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:20241b3cb4f425e971cb0a8e4ffc9b0a861530ae3c52f2b0434e6c1b57e9fd95"}, - {file = "tornado-6.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:c77da1263aa361938476f04c4b6c8916001b90b2c2fdd92d8d535e1af48fba5a"}, - {file = "tornado-6.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:fba85b6cd9c39be262fcd23865652920832b61583de2a2ca907dbd8e8a8c81e5"}, - {file = "tornado-6.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:1e8225a1070cd8eec59a996c43229fe8f95689cb16e552d130b9793cb570a288"}, - {file = "tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d14d30e7f46a0476efb0deb5b61343b1526f73ebb5ed84f23dc794bdb88f9d9f"}, - {file = "tornado-6.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8f959b26f2634a091bb42241c3ed8d3cedb506e7c27b8dd5c7b9f745318ddbb6"}, - {file = "tornado-6.1-cp38-cp38-win32.whl", hash = "sha256:34ca2dac9e4d7afb0bed4677512e36a52f09caa6fded70b4e3e1c89dbd92c326"}, - {file = "tornado-6.1-cp38-cp38-win_amd64.whl", hash = "sha256:6196a5c39286cc37c024cd78834fb9345e464525d8991c21e908cc046d1cc02c"}, - {file = "tornado-6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f0ba29bafd8e7e22920567ce0d232c26d4d47c8b5cf4ed7b562b5db39fa199c5"}, - {file = "tornado-6.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:33892118b165401f291070100d6d09359ca74addda679b60390b09f8ef325ffe"}, - {file = "tornado-6.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7da13da6f985aab7f6f28debab00c67ff9cbacd588e8477034c0652ac141feea"}, - {file = "tornado-6.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:e0791ac58d91ac58f694d8d2957884df8e4e2f6687cdf367ef7eb7497f79eaa2"}, - {file = "tornado-6.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:66324e4e1beede9ac79e60f88de548da58b1f8ab4b2f1354d8375774f997e6c0"}, - {file = "tornado-6.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:a48900ecea1cbb71b8c71c620dee15b62f85f7c14189bdeee54966fbd9a0c5bd"}, - {file = "tornado-6.1-cp39-cp39-win32.whl", hash = "sha256:d3d20ea5782ba63ed13bc2b8c291a053c8d807a8fa927d941bd718468f7b950c"}, - {file = "tornado-6.1-cp39-cp39-win_amd64.whl", hash = "sha256:548430be2740e327b3fe0201abe471f314741efcb0067ec4f2d7dcfb4825f3e4"}, - {file = "tornado-6.1.tar.gz", hash = "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791"}, -] -tqdm = [ - {file = "tqdm-4.63.0-py2.py3-none-any.whl", hash = "sha256:e643e071046f17139dea55b880dc9b33822ce21613b4a4f5ea57f202833dbc29"}, - {file = "tqdm-4.63.0.tar.gz", hash = "sha256:1d9835ede8e394bb8c9dcbffbca02d717217113adc679236873eeaac5bc0b3cd"}, -] -typing-extensions = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] -tzdata = [ - {file = "tzdata-2022.5-py2.py3-none-any.whl", hash = "sha256:323161b22b7802fdc78f20ca5f6073639c64f1a7227c40cd3e19fd1d0ce6650a"}, - {file = "tzdata-2022.5.tar.gz", hash = "sha256:e15b2b3005e2546108af42a0eb4ccab4d9e225e2dfbf4f77aad50c70a4b1f3ab"}, -] -tzlocal = [ - {file = "tzlocal-4.2-py3-none-any.whl", hash = "sha256:89885494684c929d9191c57aa27502afc87a579be5cdd3225c77c463ea043745"}, - {file = "tzlocal-4.2.tar.gz", hash = "sha256:ee5842fa3a795f023514ac2d801c4a81d1743bbe642e3940143326b3a00addd7"}, -] -urllib3 = [ - {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, - {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, -] -zalgo-text = [ - {file = "zalgo_text-0.6.tar.gz", hash = "sha256:4917b5053a014e3251e95e2f6fd32ed29770ccc2d89921dcab147eb8fc6be224"}, -] +lock-version = "2.0" +python-versions = "^3.11" +content-hash = "574d1e91526175046a3629086e41783bfcab7d83d4d20e8a149702a81eadc722" diff --git a/pyproject.toml b/pyproject.toml index 07c5679..ae83c00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,18 +9,19 @@ authors = ["ksdfg "] license = "GPL-3.0" [tool.poetry.dependencies] -python = "3.10.8" +python = "^3.11" dnspython = "^2.2.1" -emoji = "1.6.1" mongoengine = "^0.24.2" Pillow = "^9.2.0" python-decouple = "^3.6" -python-telegram-bot = "^13.14" +python-telegram-bot = "^20.0" spongemock = "^0.3.4" zalgo-text = "^0.6" hentai = "^3.2.10" telegraph = "^2.1.0" -pydantic = {extras = ["dotenv"], version = "^1.10.2"} +pydantic = { extras = ["dotenv"], version = "^1.10.2" } +emoji = "^2.5.1" +pytz = "^2023.3" [tool.poetry.group.dev.dependencies] black = "^22.8.0" diff --git a/telebot/__init__.py b/telebot/__init__.py index df54b06..a486a63 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -1,5 +1,5 @@ from pydantic import HttpUrl, BaseSettings -from telegram.ext import Updater +from telegram.ext import Application # class for configuration of a bot @@ -29,6 +29,5 @@ class Config: # create config object config = Config() -# create updater and dispatcher -updater = Updater(config.TOKEN, use_context=True) -dispatcher = updater.dispatcher +# create updater and application +application = Application.builder().token(config.TOKEN).build() diff --git a/telebot/__main__.py b/telebot/__main__.py index 3b6f49d..14f7e16 100644 --- a/telebot/__main__.py +++ b/telebot/__main__.py @@ -1,27 +1,31 @@ +import asyncio + from mongoengine import connect -from telebot import updater, config +from telebot import config, application from telebot.modules import imported_mods, bot_commands # log all imported modules print("Imported modules :", ", ".join(sorted(mod.__mod_name__ for mod in imported_mods.values()))) if __name__ == "__main__": + loop = asyncio.get_event_loop() + # set bot commands to be displayed print("Commands set :", *(cmd.command for cmd in bot_commands)) - updater.bot.set_my_commands(bot_commands) + loop.run_until_complete(application.bot.set_my_commands(bot_commands)) # connect to database connect(config.DATABASE_NAME, "default", host=config.DATABASE_URL) # start bot if config.WEBHOOK_URL: - updater.bot.delete_webhook() # in case there's one up - updater.start_webhook( + loop.run_until_complete(application.bot.delete_webhook()) # in case there's one up + application.run_webhook( listen="0.0.0.0", port=config.PORT, url_path=config.TOKEN, webhook_url=config.WEBHOOK_URL + config.TOKEN ) else: - updater.start_polling() + application.run_polling() print("neko chan go nyan nyan") - updater.idle() + application.idle() diff --git a/telebot/modules/admin.py b/telebot/modules/admin.py index 4f6e529..e43363c 100644 --- a/telebot/modules/admin.py +++ b/telebot/modules/admin.py @@ -6,12 +6,13 @@ from emoji import emojize from pytz import timezone -from telegram import Update, ChatPermissions, ChatMember, ParseMode +from telegram import Update, ChatPermissions, ChatMember +from telegram.constants import ParseMode from telegram.error import BadRequest -from telegram.ext import CallbackContext, CommandHandler -from telegram.utils.helpers import escape_markdown, mention_markdown +from telegram.ext import CallbackContext, CommandHandler, ContextTypes +from telegram.helpers import escape_markdown, mention_markdown -from telebot import dispatcher +from telebot import application from telebot.modules.db.chat_commands import enable_commands_for_chat, disable_commands_for_chat from telebot.modules.db.exceptions import get_command_exception_chats from telebot.modules.db.mute import add_muted_member, remove_muted_member @@ -43,7 +44,7 @@ def wrapper(func: Callable): @wraps(func) def inner(update: Update, context: CallbackContext, *args, **kwargs): if update.effective_chat.type not in types: - update.effective_message.reply_text(f"Sorry, can't do that in a {update.effective_chat.type}...") + await update.effective_message.reply_text(f"Sorry, can't do that in a {update.effective_chat.type}...") return func(update, context, *args, **kwargs) @@ -65,16 +66,16 @@ def wrapper(update: Update, context: CallbackContext, *args, **kwargs): "admin" ): # check bot - if not update.effective_chat.get_member(context.bot.id).can_restrict_members: - update.effective_message.reply_markdown( + if not await update.effective_chat.get_member(context.bot.id).can_restrict_members: + await update.effective_message.reply_markdown( "Ask your sugar daddy to give me perms required to use the method `CanRestrictMembers`." ) return # check user - user = update.effective_chat.get_member(update.effective_user.id) + user = await update.effective_chat.get_member(update.effective_user.id) if not user.can_restrict_members and user.status != "creator": - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give you perms required to use the method `CanRestrictMembers`." ) return @@ -117,7 +118,7 @@ def get_datetime_form_args(args: List[str], username: str = "") -> Optional[date @check_user_admin @check_bot_admin @can_restrict -def mute(update: Update, context: CallbackContext): +async def mute(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Mute a user, temporarily or permanently :param update: object representing the incoming update. @@ -131,18 +132,18 @@ def mute(update: Update, context: CallbackContext): user_id, username = get_user_from_message(update.effective_message) kwargs["user_id"] = user_id except UserError: - update.effective_message.reply_text( + await update.effective_message.reply_text( "Reply to a message by the user or give username of user you want to mute..." ) return except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return # check if user is trying to mute an admin - user = update.effective_chat.get_member(kwargs["user_id"]) + user = await update.effective_chat.get_member(kwargs["user_id"]) if user.status in ("administrator", "creator"): - update.effective_message.reply_text("I can't mute an admin, baka!") + await update.effective_message.reply_text("I can't mute an admin, baka!") return # set muted permissions @@ -161,12 +162,12 @@ def mute(update: Update, context: CallbackContext): try: kwargs["until_date"] = get_datetime_form_args(context.args, username) except TimeFormatException: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Please give the unit of time as one of the following\n\n`m` = minutes\n`h` = hours\n`d` = days" ) return except ValueError: - update.effective_message.reply_text("Time needs to be a number, baka!") + await update.effective_message.reply_text("Time needs to be a number, baka!") return # add muted member in db @@ -177,7 +178,7 @@ def mute(update: Update, context: CallbackContext): until_date=kwargs["until_date"] if "until_date" in kwargs.keys() else None, ): # mute member - context.bot.restrict_chat_member(**kwargs) + await context.bot.restrict_chat_member(**kwargs) reply = ( f"Sewed up @{escape_markdown(username)}'s mouth :smiling_face_with_horns:\nIf you want to be un-muted, " f"bribe an admin with some catnip to do it for you..." @@ -185,9 +186,9 @@ def mute(update: Update, context: CallbackContext): if kwargs["until_date"]: reply += f" or wait till `{kwargs['until_date'].strftime('%c')} IST`" - update.effective_message.reply_markdown(emojize(reply)) + await update.effective_message.reply_markdown(emojize(reply)) else: - update.effective_message.reply_text("Couldn't save record in db....") + await update.effective_message.reply_text("Couldn't save record in db....") @bot_action("un mute") @@ -195,7 +196,7 @@ def mute(update: Update, context: CallbackContext): @check_user_admin @check_bot_admin @can_restrict -def unmute(update: Update, context: CallbackContext): +async def unmute(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Unmute a muted user :param update: object representing the incoming update. @@ -209,26 +210,26 @@ def unmute(update: Update, context: CallbackContext): user_id, username = get_user_from_message(update.effective_message) kwargs["user_id"] = user_id except UserError: - update.effective_message.reply_text( + await update.effective_message.reply_text( "Reply to a message by the user or give username of user you want to unmute..." ) return except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return # set default permissions - kwargs["permissions"] = context.bot.get_chat(update.effective_chat.id).permissions + kwargs["permissions"] = await context.bot.get_chat(update.effective_chat.id).permissions # unmute member if remove_muted_member(chat=kwargs["chat_id"], user=kwargs["user_id"]): - context.bot.restrict_chat_member(**kwargs) - update.effective_message.reply_text(f"@{username} can now go nyan nyan") + await context.bot.restrict_chat_member(**kwargs) + await update.effective_message.reply_text(f"@{username} can now go nyan nyan") else: - update.effective_message.reply_text("Couldn't remove record from db....") + await update.effective_message.reply_text("Couldn't remove record from db....") -def ban_kick(update: Update, context: CallbackContext): +async def ban_kick(update: Update, context: ContextTypes.DEFAULT_TYPE): """ ban or kick a user from a chat :param update: object representing the incoming update. @@ -244,31 +245,31 @@ def ban_kick(update: Update, context: CallbackContext): user_id, username = get_user_from_message(update.effective_message) kwargs["user_id"] = user_id except UserError: - update.effective_message.reply_text( + await update.effective_message.reply_text( f"Reply to a message by the user or give username of user you want to {action}..." ) return except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return # check if user is trying to ban the bot if kwargs["user_id"] == context.bot.id: - update.effective_message.reply_markdown(f"Try to {action} me again, I'll meow meow your buttocks.") + await update.effective_message.reply_markdown(f"Try to {action} me again, I'll meow meow your buttocks.") return - user = update.effective_chat.get_member(kwargs["user_id"]) + user = await update.effective_chat.get_member(kwargs["user_id"]) # check if user is in the group if user.status == "left": - update.effective_message.reply_text( + await update.effective_message.reply_text( f"If you can't steal catnip from an empty can, you can't {action} someone who isn't in the group." ) return # check if user is trying to ban an admin if user.status in ("administrator", "creator"): - update.effective_message.reply_markdown(f"Try to {action} an admin again, I might just {action} __you__.") + await update.effective_message.reply_markdown(f"Try to {action} an admin again, I might just {action} __you__.") return # get datetime till when we have to mute user @@ -276,12 +277,12 @@ def ban_kick(update: Update, context: CallbackContext): try: kwargs["until_date"] = get_datetime_form_args(context.args, username) except TimeFormatException: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Please give the unit of time as one of the following\n\n`m` = minutes\n`h` = hours\n`d` = days" ) return except ValueError: - update.effective_message.reply_text("Time needs to be a number, baka!") + await update.effective_message.reply_text("Time needs to be a number, baka!") return # announce ban @@ -295,14 +296,14 @@ def ban_kick(update: Update, context: CallbackContext): if action == "ban": # if user is being banned, troll them with banhammer video with open(join(dirname(__file__), "assets", "ban.mp4"), "rb") as f: - update.effective_message.reply_video(video=f, caption=emojize(reply), parse_mode=ParseMode.HTML) + await update.effective_message.reply_video(video=f, caption=emojize(reply), parse_mode=ParseMode.HTML) else: - update.effective_message.reply_text(emojize(reply), parse_mode=ParseMode.HTML) + await update.effective_message.reply_text(emojize(reply), parse_mode=ParseMode.HTML) # ban user - context.bot.ban_chat_member(**kwargs) + await context.bot.ban_chat_member(**kwargs) if action == "kick": - context.bot.unban_chat_member(kwargs["chat_id"], kwargs["user_id"]) + await context.bot.unban_chat_member(kwargs["chat_id"], kwargs["user_id"]) @bot_action("ban") @@ -310,7 +311,7 @@ def ban_kick(update: Update, context: CallbackContext): @check_user_admin @check_bot_admin @can_restrict -def ban(update: Update, context: CallbackContext): +async def ban(update: Update, context: ContextTypes.DEFAULT_TYPE): """ ban a user from a chat :param update: object representing the incoming update. @@ -324,7 +325,7 @@ def ban(update: Update, context: CallbackContext): @check_user_admin @check_bot_admin @can_restrict -def unban(update: Update, context: CallbackContext): +async def unban(update: Update, context: ContextTypes.DEFAULT_TYPE): """ unban a user from a chat :param update: object representing the incoming update. @@ -337,17 +338,17 @@ def unban(update: Update, context: CallbackContext): try: kwargs["user_id"], username = get_user_from_message(update.effective_message) except UserError: - update.effective_message.reply_text( + await update.effective_message.reply_text( f"Reply to a message by the user or give username of user you want to unban..." ) return except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return - context.bot.unban_chat_member(kwargs["chat_id"], kwargs["user_id"]) + await context.bot.unban_chat_member(kwargs["chat_id"], kwargs["user_id"]) - update.effective_message.reply_text( + await update.effective_message.reply_text( f"Someone go to the litter and tell {username} that he's been unbanned....\n\nfor now." ) @@ -357,7 +358,7 @@ def unban(update: Update, context: CallbackContext): @check_user_admin @check_bot_admin @can_restrict -def kick(update: Update, context: CallbackContext): +async def kick(update: Update, context: ContextTypes.DEFAULT_TYPE): """ kick a user from a chat :param update: object representing the incoming update. @@ -370,7 +371,7 @@ def kick(update: Update, context: CallbackContext): @for_chat_types("supergroup", "channel") @check_user_admin @check_bot_admin -def promote(update: Update, context: CallbackContext): +async def promote(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Promote a user to give him admin rights :param update: object representing the incoming update. @@ -378,19 +379,19 @@ def promote(update: Update, context: CallbackContext): """ # check if user has enough perms if update.effective_chat.id not in get_command_exception_chats("admin"): - user = update.effective_chat.get_member(update.effective_user.id) + user = await update.effective_chat.get_member(update.effective_user.id) if not user.can_promote_members and user.status != "creator": - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give you perms required to use the method `CanPromoteMembers`." ) return # get bot member object to check it's perms - bot: ChatMember = update.effective_chat.get_member(context.bot.id) + bot: ChatMember = await update.effective_chat.get_member(context.bot.id) # check if bot can promote users if not bot.can_promote_members: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give me perms required to use the method `CanPromoteMembers`." ) return @@ -399,18 +400,18 @@ def promote(update: Update, context: CallbackContext): try: user_id, username = get_user_from_message(update.effective_message) except UserError: - update.effective_message.reply_text( + await update.effective_message.reply_text( "Reply to a message by the user or give username of user you want to promote..." ) return except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return # promote member reply = "" try: - context.bot.promote_chat_member( + await context.bot.promote_chat_member( chat_id=update.effective_chat.id, user_id=user_id, can_change_info=bot.can_change_info, @@ -427,13 +428,13 @@ def promote(update: Update, context: CallbackContext): # get all args other than the username if useful_args := [arg for arg in context.args if username not in arg]: title = " ".join(useful_args) - context.bot.set_chat_administrator_custom_title(update.effective_chat.id, user_id, title) + await context.bot.set_chat_administrator_custom_title(update.effective_chat.id, user_id, title) reply += f"\nThey have been granted the title of `{title}`." - update.effective_message.reply_markdown(reply.strip()) + await update.effective_message.reply_markdown(reply.strip()) except BadRequest: - update.effective_message.reply_text( + await update.effective_message.reply_text( "This cat can't meow at it's superiors.... and neither can I change their perms or title." ) @@ -442,7 +443,7 @@ def promote(update: Update, context: CallbackContext): @for_chat_types("supergroup", "channel") @check_user_admin @check_bot_admin -def demote(update: Update, context: CallbackContext): +async def demote(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Demote a user to remove admin rights :param update: object representing the incoming update. @@ -450,19 +451,19 @@ def demote(update: Update, context: CallbackContext): """ # check if user has enough perms if update.effective_chat.id not in get_command_exception_chats("admin"): - user = update.effective_chat.get_member(update.effective_user.id) + user = await update.effective_chat.get_member(update.effective_user.id) if not user.can_promote_members and user.status != "creator": - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give you perms required to use the method `CanPromoteMembers`." ) return # get bot member object to check it's perms - bot: ChatMember = update.effective_chat.get_member(context.bot.id) + bot: ChatMember = await update.effective_chat.get_member(context.bot.id) # check if bot can demote users if not bot.can_promote_members: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give me perms required to use the method `CanPromoteMembers`." ) return @@ -471,21 +472,21 @@ def demote(update: Update, context: CallbackContext): try: user_id, username = get_user_from_message(update.effective_message) except UserError: - update.effective_message.reply_text( + await update.effective_message.reply_text( "Reply to a message by the user or give username of user you want to demote..." ) return except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return # demote member - if update.effective_chat.get_member(user_id).status != "administrator": - update.effective_message.reply_text("What are you gonna demote a pleb to?") + if await update.effective_chat.get_member(user_id).status != "administrator": + await update.effective_message.reply_text("What are you gonna demote a pleb to?") return try: - context.bot.promote_chat_member( + await context.bot.promote_chat_member( chat_id=update.effective_chat.id, user_id=user_id, can_change_info=False, @@ -498,7 +499,7 @@ def demote(update: Update, context: CallbackContext): can_promote_members=False, ) - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( emojize( f"{mention_markdown(user_id, username)} has been thrown down from the council of admins to rot with the" f" rest of you plebs :grinning_cat_face_with_smiling_eyes:" @@ -506,7 +507,7 @@ def demote(update: Update, context: CallbackContext): ) except BadRequest: - update.effective_message.reply_text( + await update.effective_message.reply_text( "This cat can't meow at it's superiors.... and neither can I change their perms or title." ) @@ -515,7 +516,7 @@ def demote(update: Update, context: CallbackContext): @for_chat_types("supergroup", "channel") @check_user_admin @check_bot_admin -def pin(update: Update, context: CallbackContext): +async def pin(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Pin a message in the chat :param update: object representing the incoming update. @@ -523,9 +524,9 @@ def pin(update: Update, context: CallbackContext): """ # check if user has enough perms if update.effective_chat.id not in get_command_exception_chats("admin"): - user = update.effective_chat.get_member(update.effective_user.id) + user = await update.effective_chat.get_member(update.effective_user.id) if not user.can_pin_messages and user.status != "creator": - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give you perms required to use the method `CanPinMessages`." ) return @@ -533,19 +534,19 @@ def pin(update: Update, context: CallbackContext): # check if bot has perms to pin a message if ( update.effective_chat.type == "supergroup" - and not update.effective_chat.get_member(context.bot.id).can_pin_messages + and not await update.effective_chat.get_member(context.bot.id).can_pin_messages ) or ( update.effective_chat.type == "channel" - and not update.effective_chat.get_member(context.bot.id).can_edit_messages + and not await update.effective_chat.get_member(context.bot.id).can_edit_messages ): - update.effective_message.reply_text( + await update.effective_message.reply_text( "Bribe your sugar daddy with some catnip and ask him to allow me to pin messages..." ) return # check if there is a message to pin if not update.effective_message.reply_to_message: - update.effective_message.reply_text("I'm a cat, not a psychic! Reply to the message you want to pin...") + await update.effective_message.reply_text("I'm a cat, not a psychic! Reply to the message you want to pin...") return # for future usage @@ -561,7 +562,7 @@ def pin(update: Update, context: CallbackContext): disable_notification = None # pin the message - context.bot.pin_chat_message( + await context.bot.pin_chat_message( update.effective_chat.id, update.effective_message.reply_to_message.message_id, disable_notification=disable_notification, @@ -570,7 +571,7 @@ def pin(update: Update, context: CallbackContext): @bot_action("enable") @check_user_admin -def enable_command(update: Update, context: CallbackContext): +async def enable_command(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Enable commands for given chat :param update: object representing the incoming update. @@ -578,7 +579,9 @@ def enable_command(update: Update, context: CallbackContext): """ # check if any commands were passed if not context.args: - update.effective_message.reply_text("I'm a cat, not a psychic! Mention the commands you want to enable...") + await update.effective_message.reply_text( + "I'm a cat, not a psychic! Mention the commands you want to enable..." + ) return # enable commands in db @@ -587,14 +590,14 @@ def enable_command(update: Update, context: CallbackContext): # format response and send to user if len(responses) > 1: - update.effective_message.reply_markdown("\n".join(f"- {response}" for response in responses)) + await update.effective_message.reply_markdown("\n".join(f"- {response}" for response in responses)) else: - update.effective_message.reply_markdown(responses[0]) + await update.effective_message.reply_markdown(responses[0]) @bot_action("disable") @check_user_admin -def disable_command(update: Update, context: CallbackContext): +async def disable_command(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Disable commands for given chat :param update: object representing the incoming update. @@ -602,7 +605,9 @@ def disable_command(update: Update, context: CallbackContext): """ # check if any commands were passed if not context.args: - update.effective_message.reply_text("I'm a cat, not a psychic! Mention the commands you want to disable...") + await update.effective_message.reply_text( + "I'm a cat, not a psychic! Mention the commands you want to disable..." + ) return # disable commands in db @@ -611,9 +616,9 @@ def disable_command(update: Update, context: CallbackContext): # format response and send to user if len(responses) > 1: - update.effective_message.reply_markdown("\n".join(f"- {response}" for response in responses)) + await update.effective_message.reply_markdown("\n".join(f"- {response}" for response in responses)) else: - update.effective_message.reply_markdown(responses[0]) + await update.effective_message.reply_markdown(responses[0]) __mod_name__ = "Admin" @@ -695,13 +700,13 @@ def disable_command(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("promote", promote, run_async=True)) -dispatcher.add_handler(CommandHandler("demote", demote, run_async=True)) -dispatcher.add_handler(CommandHandler("mute", mute, run_async=True)) -dispatcher.add_handler(CommandHandler("unmute", unmute, run_async=True)) -dispatcher.add_handler(CommandHandler("ban", ban, run_async=True)) -dispatcher.add_handler(CommandHandler("unban", unban, run_async=True)) -dispatcher.add_handler(CommandHandler("kick", kick, run_async=True)) -dispatcher.add_handler(CommandHandler("pin", pin, run_async=True)) -dispatcher.add_handler(CommandHandler("enable", enable_command, run_async=True)) -dispatcher.add_handler(CommandHandler("disable", disable_command, run_async=True)) +application.add_handler(CommandHandler("promote", promote, block=False)) +application.add_handler(CommandHandler("demote", demote, block=False)) +application.add_handler(CommandHandler("mute", mute, block=False)) +application.add_handler(CommandHandler("unmute", unmute, block=False)) +application.add_handler(CommandHandler("ban", ban, block=False)) +application.add_handler(CommandHandler("unban", unban, block=False)) +application.add_handler(CommandHandler("kick", kick, block=False)) +application.add_handler(CommandHandler("pin", pin, block=False)) +application.add_handler(CommandHandler("enable", enable_command, block=False)) +application.add_handler(CommandHandler("disable", disable_command, block=False)) diff --git a/telebot/modules/basics.py b/telebot/modules/basics.py index a5840dc..8994b08 100644 --- a/telebot/modules/basics.py +++ b/telebot/modules/basics.py @@ -3,10 +3,10 @@ from emoji import emojize from telegram import Update -from telegram.ext import CallbackContext, CommandHandler -from telegram.utils.helpers import escape_markdown +from telegram.ext import CommandHandler, ContextTypes +from telegram.helpers import escape_markdown -from telebot import updater, dispatcher +from telebot import application from telebot.modules import imported_mods from telebot.utils import ( bot_action, @@ -23,30 +23,30 @@ f""" NyaHello World! :cat: -I'm *{updater.bot.first_name}*, a cute little bot that does rendum shit. +I'm *{application.bot.first_name}*, a cute little bot that does rendum shit. """, use_aliases=True, ) @bot_action("start") -def start(update: Update, context: CallbackContext): +async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Reply with the start message on running /start :param update: object representing the incoming update. :param context: object containing data about the command call. """ - update.message.reply_markdown(START_TEXT) + await update.message.reply_markdown(START_TEXT) @bot_action("list modules") -def list_modules(update: Update, context: CallbackContext): +async def list_modules(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Reply with all the imported modules :param update: object representing the incoming update. :param context: object containing data about the command call. """ - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "The list of Active Modules is as follows :\n\n`" + "`\n`".join(mod.__mod_name__.title() for mod in imported_mods.values()) + "`" @@ -54,7 +54,7 @@ def list_modules(update: Update, context: CallbackContext): @bot_action("help") -def help(update: Update, context: CallbackContext): +async def help(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Reply with help message for the specified modules :param update: object representing the incoming update. @@ -101,12 +101,12 @@ def help(update: Update, context: CallbackContext): "run /help followed by the module names, space separated." ) - update.message.reply_markdown(text_blob) + await update.message.reply_markdown(text_blob) @bot_action("talk") @check_command("talk") -def talk(update: Update, context: CallbackContext) -> None: +async def talk(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Repeat a given word random number of times :param update: object representing the incoming update. @@ -122,12 +122,12 @@ def talk(update: Update, context: CallbackContext) -> None: if word != "meow": spem += "\n\nmeow" - update.message.reply_markdown(f"`{spem}`") + await update.message.reply_markdown(f"`{spem}`") @bot_action("file id") @check_command("fileid") -def get_file_id(update: Update, context: CallbackContext) -> None: +async def get_file_id(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Function to get chat and user ID :param update: object representing the incoming update. @@ -145,15 +145,15 @@ def get_file_id(update: Update, context: CallbackContext) -> None: elif msg.voice: file = msg.voice else: - update.effective_message.reply_text("Find the cat that can find your file, cuz this cat can't.") + await update.effective_message.reply_text("Find the cat that can find your file, cuz this cat can't.") return - update.effective_message.reply_markdown(f"`{file.file_id}`") + await update.effective_message.reply_markdown(f"`{file.file_id}`") @bot_action("id") @check_command("id") -def info(update: Update, context: CallbackContext): +async def info(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Function to get user details :param update: object representing the incoming update. @@ -162,11 +162,11 @@ def info(update: Update, context: CallbackContext): # get user to display info of try: user_id, _ = get_user_from_message(update.effective_message) - user = update.effective_chat.get_member(user_id).user + user = await update.effective_chat.get_member(user_id).user except UserError: user = update.effective_user except UserRecordError as e: - update.effective_message.reply_text(e.message) + await update.effective_message.reply_text(e.message) return # make info string @@ -180,7 +180,7 @@ def info(update: Update, context: CallbackContext): reply += user.mention_markdown(name="Click here to properly check this kitten out") # send user info - update.effective_message.reply_markdown(reply) + await update.effective_message.reply_markdown(reply) __mod_name__ = "Basics" @@ -206,9 +206,9 @@ def info(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("start", start, run_async=True)) -dispatcher.add_handler(CommandHandler(["talk"], talk, run_async=True)) -dispatcher.add_handler(CommandHandler("help", help, run_async=True)) -dispatcher.add_handler(CommandHandler("modules", list_modules, run_async=True)) -dispatcher.add_handler(CommandHandler("id", info, run_async=True)) -dispatcher.add_handler(CommandHandler("fileid", get_file_id, run_async=True)) +application.add_handler(CommandHandler("start", start, block=False)) +application.add_handler(CommandHandler(["talk"], talk, block=False)) +application.add_handler(CommandHandler("help", help, block=False)) +application.add_handler(CommandHandler("modules", list_modules, block=False)) +application.add_handler(CommandHandler("id", info, block=False)) +application.add_handler(CommandHandler("fileid", get_file_id, block=False)) diff --git a/telebot/modules/db/chat_commands.py b/telebot/modules/db/chat_commands.py index 24ea498..b7b28e8 100644 --- a/telebot/modules/db/chat_commands.py +++ b/telebot/modules/db/chat_commands.py @@ -1,5 +1,5 @@ from mongoengine import Document, IntField, StringField, ListField -from telegram.utils.helpers import escape_markdown +from telegram.helpers import escape_markdown class ChatCommand(Document): diff --git a/telebot/modules/db/exceptions.py b/telebot/modules/db/exceptions.py index e05860b..2634692 100644 --- a/telebot/modules/db/exceptions.py +++ b/telebot/modules/db/exceptions.py @@ -4,7 +4,7 @@ from mongoengine import Document, StringField, ListField, IntField # create models for this module -from telegram.utils.helpers import escape_markdown +from telegram.helpers import escape_markdown class Exceptions(Document): diff --git a/telebot/modules/delete.py b/telebot/modules/delete.py index faff76e..4b35a10 100644 --- a/telebot/modules/delete.py +++ b/telebot/modules/delete.py @@ -5,9 +5,9 @@ from telegram import Update from telegram.error import BadRequest -from telegram.ext import CallbackContext, CommandHandler +from telegram.ext import CallbackContext, CommandHandler, ContextTypes -from telebot import dispatcher +from telebot import application from telebot.modules.db.exceptions import get_command_exception_chats from telebot.modules.db.users import add_user from telebot.utils import ( @@ -31,9 +31,9 @@ def wrapper(update: Update, context: CallbackContext, *args, **kwargs): # check if bot has perms to delete a message if ( update.effective_chat.type != "private" - and not update.effective_chat.get_member(context.bot.id).can_delete_messages + and not await update.effective_chat.get_member(context.bot.id).can_delete_messages ): - update.effective_message.reply_text( + await update.effective_message.reply_text( "Bribe your sugar daddy with some catnip and ask him to allow me to delete messages..." ) return @@ -57,9 +57,9 @@ def wrapper(update: Update, context: CallbackContext, *args, **kwargs): and update.effective_message.reply_to_message.from_user.id != update.effective_user.id and update.effective_chat.id not in get_command_exception_chats("delete") ): - user = update.effective_chat.get_member(update.effective_user.id) + user = await update.effective_chat.get_member(update.effective_user.id) if not user.can_delete_messages and user.status != "creator": - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Ask your sugar daddy to give you perms required to use the method `CanDeleteMessages`, " "or add an exception to module `delete`." ) @@ -77,7 +77,7 @@ def wrapper(update: Update, context: CallbackContext, *args, **kwargs): @check_user_can_delete @check_bot_admin @check_bot_can_delete -def delete(update: Update, context: CallbackContext): +async def delete(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Delete the quoted message :param update: object representing the incoming update. @@ -92,12 +92,12 @@ def delete(update: Update, context: CallbackContext): # delete message try: - context.bot.delete_message(update.effective_chat.id, update.effective_message.reply_to_message.message_id) - context.bot.delete_message(update.effective_chat.id, update.effective_message.message_id) + await context.bot.delete_message(update.effective_chat.id, update.effective_message.reply_to_message.message_id) + await context.bot.delete_message(update.effective_chat.id, update.effective_message.message_id) except BadRequest as e: if match("^Message can't be deleted", e.message): print_exc() - update.effective_message.reply_text( + await update.effective_message.reply_text( "I don't know why but I can't delete that...\nTelegram is high on catnip as usual." ) else: @@ -111,7 +111,7 @@ def delete(update: Update, context: CallbackContext): @check_user_can_delete @check_bot_admin @check_bot_can_delete -def purge(update: Update, context: CallbackContext): +async def purge(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Delete all messages from quoted message :param update: object representing the incoming update. @@ -126,13 +126,13 @@ def purge(update: Update, context: CallbackContext): # delete messages for id_ in range(update.effective_message.message_id, update.effective_message.reply_to_message.message_id - 1, -1): try: - context.bot.delete_message(update.effective_chat.id, id_) + await context.bot.delete_message(update.effective_chat.id, id_) except BadRequest: continue # Don't send message after purge if silent/quiet is specified if not (context.args and context.args[0].lower() in ("silent", "quiet")): - update.effective_chat.send_message("Just like we do it in china....") + await update.effective_chat.send_message("Just like we do it in china....") __help__ = """ @@ -155,6 +155,6 @@ def purge(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("del", delete, run_async=True)) -dispatcher.add_handler(CommandHandler("delete", delete, run_async=True)) -dispatcher.add_handler(CommandHandler("purge", purge, run_async=True)) +application.add_handler(CommandHandler("del", delete, block=False)) +application.add_handler(CommandHandler("delete", delete, block=False)) +application.add_handler(CommandHandler("purge", purge, block=False)) diff --git a/telebot/modules/exceptions.py b/telebot/modules/exceptions.py index d4fbbfc..3594a2c 100644 --- a/telebot/modules/exceptions.py +++ b/telebot/modules/exceptions.py @@ -1,7 +1,7 @@ from telegram import Update -from telegram.ext import CommandHandler, CallbackContext +from telegram.ext import CommandHandler, ContextTypes -from telebot import dispatcher +from telebot import application from telebot.modules.db.exceptions import ( add_command_exception_chats, del_command_exception_chats, @@ -12,58 +12,60 @@ @bot_action("list exceptions") @check_command("exceptions") -def list_exceptions(update: Update, context: CallbackContext): +async def list_exceptions(update: Update, context: ContextTypes.DEFAULT_TYPE): """ List all exceptions :param update: object representing the incoming update. :param context: object containing data about the command call. """ if update.effective_chat.type == "private": - update.effective_message.reply_text("You can't list exceptions in private chats.") + await update.effective_message.reply_text("You can't list exceptions in private chats.") return commands = ", ".join(get_exceptions_for_chat(update.effective_chat.id)) if commands: - update.effective_message.reply_markdown(f"You have exceptions set for the following commands:\n`{commands}`") + await update.effective_message.reply_markdown( + f"You have exceptions set for the following commands:\n`{commands}`" + ) else: - update.effective_message.reply_text("You don't have any exceptions set!") + await update.effective_message.reply_text("You don't have any exceptions set!") @bot_action("add exception") @check_command("except") @check_user_admin -def add_exception(update: Update, context: CallbackContext): +async def add_exception(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Add exceptions in a chat :param update: object representing the incoming update. :param context: object containing data about the command call. """ if update.effective_chat.type == "private": - update.effective_message.reply_text("You can't add exceptions in private chats.") + await update.effective_message.reply_text("You can't add exceptions in private chats.") return for command in context.args: reply = add_command_exception_chats(command, update.effective_chat.id) print(reply) - update.effective_message.reply_markdown(reply) + await update.effective_message.reply_markdown(reply) @bot_action("delete exceptions") @check_command("delexcept") @check_user_admin -def del_exception(update: Update, context: CallbackContext): +async def del_exception(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Delete exceptions in a chat :param update: object representing the incoming update. :param context: object containing data about the command call. """ if update.effective_chat.type == "private": - update.effective_message.reply_text("You can't delete exceptions in private chats.") + await update.effective_message.reply_text("You can't delete exceptions in private chats.") return for command in context.args: reply = del_command_exception_chats(command, update.effective_chat.id) - update.effective_message.reply_markdown(reply) + await update.effective_message.reply_markdown(reply) __mod_name__ = "Exceptions" @@ -85,6 +87,6 @@ def del_exception(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("exceptions", list_exceptions, run_async=True)) -dispatcher.add_handler(CommandHandler("except", add_exception, run_async=True)) -dispatcher.add_handler(CommandHandler("delexcept", del_exception, run_async=True)) +application.add_handler(CommandHandler("exceptions", list_exceptions, block=False)) +application.add_handler(CommandHandler("except", add_exception, block=False)) +application.add_handler(CommandHandler("delexcept", del_exception, block=False)) diff --git a/telebot/modules/filter.py b/telebot/modules/filter.py index 0f78fa2..6fff71e 100644 --- a/telebot/modules/filter.py +++ b/telebot/modules/filter.py @@ -2,9 +2,9 @@ from emoji import emojize from telegram import Update -from telegram.ext import CallbackContext, CommandHandler, MessageHandler, Filters +from telegram.ext import CommandHandler, MessageHandler, ContextTypes, filters -from telebot import dispatcher +from telebot import application from telebot.modules.db.exceptions import get_command_exception_chats from telebot.modules.db.filter import get_triggers_for_chat, add_filter, get_filter, del_filter from telebot.modules.db.users import add_user @@ -13,7 +13,7 @@ @bot_action("list filters") @check_command("filters") -def list_filters(update: Update, context: CallbackContext): +async def list_filters(update: Update, context: ContextTypes.DEFAULT_TYPE): """ List all the filter triggers in a chat :param update: object representing the incoming update. @@ -25,17 +25,17 @@ def list_filters(update: Update, context: CallbackContext): filters = get_triggers_for_chat(update.effective_chat.id) if filters: - update.message.reply_markdown( + await update.message.reply_markdown( "Active filter triggers in this chat are as follows -\n`" + "`\n`".join(filters) + "`" ) else: - update.message.reply_markdown(emojize("No active filters in this chat :crying_cat_face:")) + await update.message.reply_markdown(emojize("No active filters in this chat :crying_cat_face:")) @bot_action("add filter") @check_command("filter") @check_user_admin -def add_filter_handler(update: Update, context: CallbackContext): +async def add_filter_handler(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Add a filter in a chat :param update: object representing the incoming update. @@ -120,7 +120,7 @@ def add_filter_handler(update: Update, context: CallbackContext): @bot_action("delete filters") @check_command("stop") @check_user_admin -def del_filter_handler(update: Update, context: CallbackContext): +async def del_filter_handler(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Delete a filter from the chat :param update: object representing the incoming update. @@ -133,15 +133,15 @@ def del_filter_handler(update: Update, context: CallbackContext): if context.args: # iterate over the triggers given and delete them from DB for trigger in context.args: - update.effective_message.reply_markdown(del_filter(chat=update.effective_chat.id, trigger=trigger)) + await update.effective_message.reply_markdown(del_filter(chat=update.effective_chat.id, trigger=trigger)) else: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "I can't stop meowing if you don't tell me what to stop meowing to, baka!" ) @bot_action("respond to filter") -def reply(update: Update, context: CallbackContext) -> None: +async def reply(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Reply when a filter is triggered :param update: object representing the incoming update. @@ -217,7 +217,7 @@ def reply(update: Update, context: CallbackContext) -> None: ) # create handlers -dispatcher.add_handler(CommandHandler("filters", list_filters, run_async=True)) -dispatcher.add_handler(CommandHandler("filter", add_filter_handler, run_async=True)) -dispatcher.add_handler(CommandHandler("stop", del_filter_handler, run_async=True)) -dispatcher.add_handler(MessageHandler(Filters.all, reply, run_async=True), group=69) +application.add_handler(CommandHandler("filters", list_filters, block=False)) +application.add_handler(CommandHandler("filter", add_filter_handler, block=False)) +application.add_handler(CommandHandler("stop", del_filter_handler, block=False)) +application.add_handler(MessageHandler(filters.ALL, reply, block=False), group=69) diff --git a/telebot/modules/memes.py b/telebot/modules/memes.py index e976f14..c6cb48e 100644 --- a/telebot/modules/memes.py +++ b/telebot/modules/memes.py @@ -5,39 +5,43 @@ from spongemock.spongemock import mock as mock_text from telegram import Update from telegram.error import BadRequest -from telegram.ext import CallbackContext, CommandHandler +from telegram.ext import CommandHandler, ContextTypes from zalgo_text.zalgo import zalgo -from telebot import dispatcher +from telebot import application from telebot.modules.db.users import add_user from telebot.utils import bot_action, CommandDescription, check_command @bot_action("runs") @check_command("runs") -def runs(update: Update, context: CallbackContext) -> None: +async def runs(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Insulting reply whenever someone uses /runs :param update: object representing the incoming update. :param context: object containing data about the command call. """ - update.effective_message.reply_markdown("I'm a cute kitty, and here we have a fat pussy.") - update.effective_chat.send_sticker("CAACAgUAAxkBAAIJK19CjPoyyX9QwwHfNOZMnqww1hxXAALfAAPd6BozJDBFCIENpGkbBA") + await update.effective_message.reply_markdown("I'm a cute kitty, and here we have a fat pussy.") + await update.effective_chat.send_sticker("CAACAgUAAxkBAAIJK19CjPoyyX9QwwHfNOZMnqww1hxXAALfAAPd6BozJDBFCIENpGkbBA") @bot_action("mock") @check_command("mock") -def mock(update: Update, context: CallbackContext) -> None: +async def mock(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Mock a message like spongebob, and reply :param update: object representing the incoming update. :param context: object containing data about the command call. """ if context.args: - update.effective_message.reply_text(mock_text(update.effective_message.text.replace("/mock ", "").strip())) + await update.effective_message.reply_text( + mock_text(update.effective_message.text.replace("/mock ", "").strip()) + ) elif update.effective_message.reply_to_message and update.effective_message.reply_to_message.text: - update.effective_message.reply_to_message.reply_text(mock_text(update.effective_message.reply_to_message.text)) + await update.effective_message.reply_to_message.reply_text( + mock_text(update.effective_message.reply_to_message.text) + ) # for future usage add_user( user_id=update.effective_message.reply_to_message.from_user.id, @@ -45,12 +49,12 @@ def mock(update: Update, context: CallbackContext) -> None: ) else: - update.effective_message.reply_text("I don't see anything to mock here other than your ugly face...") + await update.effective_message.reply_text("I don't see anything to mock here other than your ugly face...") @bot_action("zalgofy") @check_command("zalgofy") -def zalgofy(update: Update, context: CallbackContext) -> None: +async def zalgofy(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Corrupt the way the text looks, and reply :param update: object representing the incoming update. @@ -59,10 +63,14 @@ def zalgofy(update: Update, context: CallbackContext) -> None: transform = zalgo().zalgofy if context.args: - update.effective_message.reply_text(transform(update.effective_message.text.replace("/zalgofy ", "").strip())) + await update.effective_message.reply_text( + transform(update.effective_message.text.replace("/zalgofy ", "").strip()) + ) elif update.effective_message.reply_to_message and update.effective_message.reply_to_message.text: - update.effective_message.reply_to_message.reply_text(transform(update.effective_message.reply_to_message.text)) + await update.effective_message.reply_to_message.reply_text( + transform(update.effective_message.reply_to_message.text) + ) # for future usage add_user( user_id=update.effective_message.reply_to_message.from_user.id, @@ -70,12 +78,12 @@ def zalgofy(update: Update, context: CallbackContext) -> None: ) else: - update.effective_message.reply_text("Gimme a message to zalgofy before I claw your tits off...") + await update.effective_message.reply_text("Gimme a message to zalgofy before I claw your tits off...") @bot_action("owo") @check_command("owo") -def owo(update: Update, context: CallbackContext) -> None: +async def owo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Change a message to look like it was said by a moe weeb :param update: object representing the incoming update. @@ -126,20 +134,20 @@ def transform(text: str): if context.args: try: - update.effective_message.reply_markdown_v2( + await update.effective_message.reply_markdown_v2( transform(update.effective_message.text_markdown_v2.replace("/owo ", "").strip()) ) except BadRequest as e: print(e) # in case we messed up markdown while replacing characters and adding kaomoji - update.effective_message.reply_text( + await update.effective_message.reply_text( "Gommenye, I over-owo'd myself.... please try again. " "If it still doesn't work, then this must be the language of god's you're trying to translate...." ) elif update.effective_message.reply_to_message and update.effective_message.reply_to_message.text: try: - update.effective_message.reply_to_message.reply_markdown( + await update.effective_message.reply_to_message.reply_markdown( transform(update.effective_message.reply_to_message.text_markdown) ) # for future usage @@ -150,36 +158,36 @@ def transform(text: str): except BadRequest as e: print(e) # in case we messed up markdown while replacing characters and adding kaomoji - update.effective_message.reply_text( + await update.effective_message.reply_text( "Gommenye, I over-owo'd myself.... please try again. " "If it still doesn't work, then this must be the language of god's you're trying to translate...." ) else: - update.effective_message.reply_text( + await update.effective_message.reply_text( "Gommenye, I don't nyaruhodo what normie text you want to henshin into the moe weeb dialect" ) @bot_action("stretch") @check_command("stretch") -def stretch(update: Update, context: CallbackContext): +async def stretch(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Stretch the vowels in a message by a random count :param update: object representing the incoming update. :param context: object containing data about the command call. """ if context.args: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( sub( r"([aeiouAEIOUaeiouAEIOU])", (r"\1" * randint(3, 10)), - update.effective_message.text_markdown.replace("/stretch ", "").strip(), + await update.effective_message.text_markdown.replace("/stretch ", "").strip(), ) ) elif update.effective_message.reply_to_message and update.effective_message.reply_to_message.text: - update.effective_message.reply_to_message.reply_markdown( + await update.effective_message.reply_to_message.reply_markdown( sub( r"([aeiouAEIOUaeiouAEIOU])", (r"\1" * randint(3, 10)), @@ -193,14 +201,14 @@ def stretch(update: Update, context: CallbackContext): ) else: - update.effective_message.reply_text( + await update.effective_message.reply_text( "If you're not gonna give me something to meme then bring some catnip atleast..." ) @bot_action("vapor") @check_command("vapor") -def vapor(update: Update, context: CallbackContext): +async def vapor(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Make a message look more aesthetic :param update: object representing the incoming update. @@ -209,7 +217,7 @@ def vapor(update: Update, context: CallbackContext): if not context.args and not ( update.effective_message.reply_to_message and update.effective_message.reply_to_message.text ): - update.effective_message.reply_text( + await update.effective_message.reply_text( "If you're not gonna give me something to meme then bring some catnip atleast..." ) return @@ -229,14 +237,14 @@ def vapor(update: Update, context: CallbackContext): # reply with more aesthetics if context.args: - update.effective_message.reply_markdown(f"`{aesthetic_text}`") + await update.effective_message.reply_markdown(f"`{aesthetic_text}`") else: - update.effective_message.reply_to_message.reply_markdown(f"`{aesthetic_text}`") + await update.effective_message.reply_to_message.reply_markdown(f"`{aesthetic_text}`") @bot_action("sadge") @check_command("sadge") -def sadge(update: Update, context: CallbackContext) -> None: +async def sadge(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Quotes from Bennett Foddy's Getting over it :param update: object representing the incoming update. @@ -247,9 +255,9 @@ def sadge(update: Update, context: CallbackContext) -> None: # If user replied to an original message, let quote be a reply to that message if update.effective_message.reply_to_message: - update.effective_message.reply_to_message.reply_markdown(f"```\n{choice(bennett_foddy)}\n```") + await update.effective_message.reply_to_message.reply_markdown(f"```\n{choice(bennett_foddy)}\n```") else: - update.effective_chat.send_message(f"```\n{choice(bennett_foddy)}\n```", parse_mode="markdown") + await update.effective_chat.send_message(f"```\n{choice(bennett_foddy)}\n```", parse_mode="markdown") __help__ = """ @@ -278,10 +286,10 @@ def sadge(update: Update, context: CallbackContext) -> None: ) # create handlers -dispatcher.add_handler(CommandHandler("runs", runs, run_async=True)) -dispatcher.add_handler(CommandHandler("mock", mock, run_async=True)) -dispatcher.add_handler(CommandHandler("zalgofy", zalgofy, run_async=True)) -dispatcher.add_handler(CommandHandler("owo", owo, run_async=True)) -dispatcher.add_handler(CommandHandler("stretch", stretch, run_async=True)) -dispatcher.add_handler(CommandHandler("vapor", vapor, run_async=True)) -dispatcher.add_handler(CommandHandler("sadge", sadge, run_async=True)) +application.add_handler(CommandHandler("runs", runs, block=False)) +application.add_handler(CommandHandler("mock", mock, block=False)) +application.add_handler(CommandHandler("zalgofy", zalgofy, block=False)) +application.add_handler(CommandHandler("owo", owo, block=False)) +application.add_handler(CommandHandler("stretch", stretch, block=False)) +application.add_handler(CommandHandler("vapor", vapor, block=False)) +application.add_handler(CommandHandler("sadge", sadge, block=False)) diff --git a/telebot/modules/nhentai.py b/telebot/modules/nhentai.py index c305e33..deef43a 100644 --- a/telebot/modules/nhentai.py +++ b/telebot/modules/nhentai.py @@ -2,11 +2,12 @@ from hentai import Hentai, Format, Tag from requests.exceptions import RetryError, ConnectionError -from telegram import Update, ParseMode, InlineKeyboardButton, InlineKeyboardMarkup -from telegram.ext import CommandHandler, CallbackContext +from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup +from telegram.constants import ParseMode +from telegram.ext import CommandHandler, ContextTypes from telegraph import Telegraph -from telebot import dispatcher +from telebot import application from telebot.modules.db.exceptions import get_command_exception_chats from telebot.utils import bot_action, CommandDescription, check_command @@ -22,7 +23,7 @@ def _generate_anchor_tags(tags: list[Tag]) -> str: @bot_action("sauce") @check_command("sauce") -def sauce(update: Update, context: CallbackContext) -> None: +async def sauce(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Fetch the doujin for all the sauces given by user, make telegraph article and send it to user for easy reading :param update: object representing the incoming update. @@ -30,7 +31,7 @@ def sauce(update: Update, context: CallbackContext) -> None: """ # check if any args were given if not context.args: - update.effective_message.reply_text("Please give some codes to fetch, this cat can't read your mind...") + await update.effective_message.reply_text("Please give some codes to fetch, this cat can't read your mind...") return # check if exception for sauce is added in current chat @@ -41,7 +42,7 @@ def sauce(update: Update, context: CallbackContext) -> None: try: code = int(digits) except ValueError: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"If you don't know that sauce codes must be only digits, you shouldn't be using this command. " f"`{digits}` is not a sauce, just a sign of your ignorance." ) @@ -50,13 +51,13 @@ def sauce(update: Update, context: CallbackContext) -> None: # check if doujin exists try: if not Hentai.exists(code): - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"Doujin for `{code}` doesn't exist, Donald... Please don't use your nuclear launch codes here 😿" ) continue except (RetryError, ConnectionError): with open(join(dirname(__file__), "assets", "horni_jail.jpg"), "rb") as f: - update.effective_message.reply_photo( + await update.effective_message.reply_photo( photo=f, caption="Cloudflare won't release any doujins from the horni jail known to most as a browser...", reply_markup=InlineKeyboardMarkup.from_button( @@ -98,15 +99,15 @@ def sauce(update: Update, context: CallbackContext) -> None: # send message if exception: - update.message.reply_html(text=text_blob, reply_markup=markup) + await update.message.reply_html(text=text_blob, reply_markup=markup) else: - context.bot.send_message( + await context.bot.send_message( chat_id=update.effective_user.id, text=text_blob, parse_mode=ParseMode.HTML, reply_markup=markup ) # if called from a chat without exception in it, then send him a reminder to check it if not exception and update.effective_chat.type != "private": - update.message.reply_text( + await update.message.reply_text( "Let's enjoy this together, without anybody else distracting us...", reply_markup=InlineKeyboardMarkup.from_button( InlineKeyboardButton(text="Go to Private Chat", url=context.bot.link) @@ -129,4 +130,4 @@ def sauce(update: Update, context: CallbackContext) -> None: ) # create handlers -dispatcher.add_handler(CommandHandler("sauce", sauce, run_async=True)) +application.add_handler(CommandHandler("sauce", sauce, block=False)) diff --git a/telebot/modules/notes.py b/telebot/modules/notes.py index 41cf177..9fef2ca 100644 --- a/telebot/modules/notes.py +++ b/telebot/modules/notes.py @@ -1,8 +1,8 @@ from emoji import emojize from telegram import Update -from telegram.ext import CallbackContext, CommandHandler, MessageHandler, Filters +from telegram.ext import CommandHandler, MessageHandler, ContextTypes, filters -from telebot import dispatcher +from telebot import application from telebot.modules.db.exceptions import get_command_exception_chats from telebot.modules.db.notes import get_note, get_notes_for_chat, add_note, del_note from telebot.modules.db.users import add_user @@ -11,7 +11,7 @@ @bot_action("get note") @check_command("get") -def fetch_note(update: Update, context: CallbackContext): +async def fetch_note(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Fetch note :param update: object representing the incoming update. @@ -26,7 +26,7 @@ def fetch_note(update: Update, context: CallbackContext): elif context.args: name = context.args[0] else: - update.effective_message.reply_text("I can't fetch a note if you don't tell me it's name, baka!") + await update.effective_message.reply_text("I can't fetch a note if you don't tell me it's name, baka!") return # get note @@ -35,24 +35,24 @@ def fetch_note(update: Update, context: CallbackContext): # send reply according to type match content_type: case "text": - update.effective_message.reply_markdown(content) + await update.effective_message.reply_markdown(content) case "sticker": - update.effective_message.reply_sticker(content) + await update.effective_message.reply_sticker(content) case "document": - update.effective_message.reply_document(content) + await update.effective_message.reply_document(content) case "photo": - update.effective_message.reply_photo(content) + await update.effective_message.reply_photo(content) case "audio": - update.effective_message.reply_audio(content) + await update.effective_message.reply_audio(content) case "voice": - update.effective_message.reply_voice(content) + await update.effective_message.reply_voice(content) case "video": - update.effective_message.reply_video(content) + await update.effective_message.reply_video(content) @bot_action("notes") @check_command("notes") -def notes_for_chat(update: Update, context: CallbackContext): +async def notes_for_chat(update: Update, context: ContextTypes.DEFAULT_TYPE): """ List out all the notes in a chat :param update: object representing the incoming update. @@ -71,16 +71,18 @@ def notes_for_chat(update: Update, context: CallbackContext): reply += f"\n- `{note}`" reply += emojize("\n\nI remember all of this! Praise me lots! :grinning_cat_face:") - update.effective_message.reply_markdown(reply) + await update.effective_message.reply_markdown(reply) else: - update.effective_message.reply_text("No one told me to remember anything, so I got high on catnip instead.....") + await update.effective_message.reply_text( + "No one told me to remember anything, so I got high on catnip instead....." + ) @bot_action("add note") @check_command("save") @check_user_admin -def add_note_in_chat(update: Update, context: CallbackContext): +async def add_note_in_chat(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Add a note in the chat :param update: object representing the incoming update. @@ -163,7 +165,7 @@ def add_note_in_chat(update: Update, context: CallbackContext): @bot_action("delete note") @check_command("clear") @check_user_admin -def del_note_in_chat(update: Update, context: CallbackContext): +async def del_note_in_chat(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Delete a note from the chat :param update: object representing the incoming update. @@ -176,9 +178,9 @@ def del_note_in_chat(update: Update, context: CallbackContext): if context.args: # iterate over the triggers given and delete them from DB for name in context.args: - update.effective_message.reply_markdown(del_note(chat=update.effective_chat.id, name=name)) + await update.effective_message.reply_markdown(del_note(chat=update.effective_chat.id, name=name)) else: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Oi, you can't make me forget something without reminding me of what to forget, baka!" ) @@ -223,9 +225,9 @@ def del_note_in_chat(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("get", fetch_note, run_async=True)) -dispatcher.add_handler(MessageHandler(Filters.regex(r"^#[^\s].+$"), fetch_note, run_async=True)) -dispatcher.add_handler(CommandHandler("notes", notes_for_chat, run_async=True)) -dispatcher.add_handler(CommandHandler("saved", notes_for_chat, run_async=True)) -dispatcher.add_handler(CommandHandler("save", add_note_in_chat, run_async=True)) -dispatcher.add_handler(CommandHandler("clear", del_note_in_chat, run_async=True)) +application.add_handler(CommandHandler("get", fetch_note, block=False)) +application.add_handler(MessageHandler(filters.Regex(r"^#[^\s].+$"), fetch_note, block=False)) +application.add_handler(CommandHandler("notes", notes_for_chat, block=False)) +application.add_handler(CommandHandler("saved", notes_for_chat, block=False)) +application.add_handler(CommandHandler("save", add_note_in_chat, block=False)) +application.add_handler(CommandHandler("clear", del_note_in_chat, block=False)) diff --git a/telebot/modules/quote.py b/telebot/modules/quote.py index 15118e2..05bdd0d 100644 --- a/telebot/modules/quote.py +++ b/telebot/modules/quote.py @@ -8,14 +8,14 @@ from PIL import ImageFont, ImageDraw, Image, ImageFilter from telegram import Update, Message -from telegram.ext import CommandHandler, CallbackContext +from telegram.ext import CommandHandler, ContextTypes -from telebot import dispatcher +from telebot import application from telebot.modules.db.users import add_user from telebot.utils import bot_action, CommandDescription, check_command -def _message_to_sticker(update: Update, context: CallbackContext) -> str: +async def _message_to_sticker(update: Update, context: ContextTypes.DEFAULT_TYPE) -> str: """ Function to make the sticker from message and save it on disk as png image :param update: object representing the incoming update. @@ -85,9 +85,9 @@ def get_message_data(rep_msg: Message) -> Tuple[str, str, Tuple[int, int, int]]: try: # Get users Profile Photo - profile_pic = update.effective_message.reply_to_message.from_user.get_profile_photos().photos[0][0] + profile_pic = await update.effective_message.reply_to_message.from_user.get_profile_photos().photos[0][0] - file_pp = context.bot.getFile(profile_pic) + file_pp = await context.bot.getFile(profile_pic) file_pp.download(f"{file_name}_dp.jpg") except IndexError: @@ -294,19 +294,19 @@ def get_concat_h(img1: Image, img2: Image): @bot_action("quote") @check_command("quote") -def quote(update: Update, context: CallbackContext): +async def quote(update: Update, context: ContextTypes.DEFAULT_TYPE): """ convert message into quote and reply :param update: object representing the incoming update. :param context: object containing data about the command call. """ - context.bot.send_chat_action(update.effective_chat.id, "upload_photo") # tell chat that a sticker is incoming + await context.bot.send_chat_action(update.effective_chat.id, "upload_photo") # tell chat that a sticker is incoming # make sticker and save on disk try: file_name = _message_to_sticker(update, context) except AttributeError: - update.effective_message.reply_text( + await update.effective_message.reply_text( "Please reply to a message to get its quote...\nThis cat can't read your mind!" ) return @@ -318,7 +318,7 @@ def quote(update: Update, context: CallbackContext): ) # send generated image as sticker - update.effective_message.reply_sticker(sticker=open(file_name, "rb")) + await update.effective_message.reply_sticker(sticker=open(file_name, "rb")) # remove stored image if isfile(file_name): @@ -334,4 +334,4 @@ def quote(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("quote", quote, run_async=True)) +application.add_handler(CommandHandler("quote", quote, block=False)) diff --git a/telebot/modules/regex.py b/telebot/modules/regex.py index 721eac0..fd93ad7 100644 --- a/telebot/modules/regex.py +++ b/telebot/modules/regex.py @@ -1,17 +1,18 @@ from re import compile, search from subprocess import Popen, PIPE, check_output, CalledProcessError, STDOUT -from telegram import MAX_MESSAGE_LENGTH, Update -from telegram.ext import CallbackContext, MessageHandler, Filters +from telegram import Update +from telegram.constants import MessageLimit +from telegram.ext import MessageHandler, filters, ContextTypes -from telebot import dispatcher +from telebot import application from telebot.modules.db.exceptions import get_exceptions_for_chat from telebot.utils import bot_action, CommandDescription, check_command @bot_action("regex") @check_command("regex") -def regex(update: Update, context: CallbackContext): +async def regex(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Replace text using sed and regex :param update: object representing the incoming update. @@ -25,7 +26,7 @@ def regex(update: Update, context: CallbackContext): update.effective_message.reply_to_message and (update.effective_message.reply_to_message.text or update.effective_message.reply_to_message.caption) ): - update.effective_message.reply_text("Gimme text to replace stuff in, baka!") + await update.effective_message.reply_text("Gimme text to replace stuff in, baka!") return # make sure `s` command is properly terminated @@ -46,43 +47,43 @@ def regex(update: Update, context: CallbackContext): text_input = Popen(("echo", content), stdout=PIPE, stderr=STDOUT) result = check_output(("sed", "-r", command), stdin=text_input.stdout, stderr=STDOUT) except CalledProcessError as e: - update.effective_message.reply_markdown(f"```{e.output.decode()}```") + await update.effective_message.reply_markdown(f"```{e.output.decode()}```") return # reply with the output text if update.effective_message.reply_to_message.document: - update.effective_message.reply_to_message.reply_document( + await update.effective_message.reply_to_message.reply_document( document=update.effective_message.reply_to_message.document, filename=update.effective_message.reply_to_message.document.file_name, caption=result.decode("utf-8"), reply_markup=update.effective_message.reply_to_message.reply_markup, ) elif update.effective_message.reply_to_message.photo: - update.effective_message.reply_to_message.reply_photo( + await update.effective_message.reply_to_message.reply_photo( photo=update.effective_message.reply_to_message.photo[-1].file_id, caption=result.decode("utf-8"), reply_markup=update.effective_message.reply_to_message.reply_markup, ) elif update.effective_message.reply_to_message.audio: - update.effective_message.reply_to_message.reply_audio( + await update.effective_message.reply_to_message.reply_audio( audio=update.effective_message.reply_to_message.audio, caption=result.decode("utf-8"), reply_markup=update.effective_message.reply_to_message.reply_markup, ) elif update.effective_message.reply_to_message.voice: - update.effective_message.reply_to_message.reply_voice( + await update.effective_message.reply_to_message.reply_voice( voice=update.effective_message.reply_to_message.voice, caption=result.decode("utf-8"), reply_markup=update.effective_message.reply_to_message.reply_markup, ) elif update.effective_message.reply_to_message.video: - update.effective_message.reply_to_message.reply_video( + await update.effective_message.reply_to_message.reply_video( video=update.effective_message.reply_to_message.video, caption=result.decode("utf-8"), reply_markup=update.effective_message.reply_to_message.reply_markup, ) else: - update.effective_message.reply_to_message.reply_text(result.decode("utf-8")) + await update.effective_message.reply_to_message.reply_text(result.decode("utf-8")) __mod_name__ = "Regex" @@ -96,13 +97,13 @@ def regex(update: Update, context: CallbackContext): "Reply to a message with this to perform a sed operation on that message, replacing all occurrences of " "'text1' with 'text2'. Flags are optional, and currently include 'i' for ignore case, 'g' for global, " "or nothing. Delimiters include `/`, `_`, `|`, and `:`. Text grouping is supported. The resulting message " - f"cannot be larger than {MAX_MESSAGE_LENGTH} characters.\n\n *Reminder:* Sed uses some special characters " - f"to make matching easier, such as these: `+*.?\\` If you want to use these characters, make sure you " - f"escape them! eg: \\?. " + f"cannot be larger than {MessageLimit.MAX_TEXT_LENGTH} characters.\n\n *Reminder:* Sed uses some special " + f"characters to make matching easier, such as these: `+*.?\\` If you want to use these characters, make " + f"sure you escape them! eg: \\?. " ), is_slash_command=False, ), ) # ad handlers -dispatcher.add_handler(MessageHandler(Filters.regex(compile("^s([/:|_]).*([/:|_]).*")), regex, run_async=True)) +application.add_handler(MessageHandler(filters.Regex(compile("^s([/:|_]).*([/:|_]).*")), regex, block=False)) diff --git a/telebot/modules/stickers.py b/telebot/modules/stickers.py index 12cfd0a..c19a62c 100644 --- a/telebot/modules/stickers.py +++ b/telebot/modules/stickers.py @@ -12,7 +12,6 @@ from pydantic import BaseModel from telegram import ( Update, - TelegramError, InlineKeyboardMarkup, InlineKeyboardButton, Bot, @@ -21,11 +20,11 @@ StickerSet, Sticker, ) -from telegram.error import BadRequest -from telegram.ext import CallbackContext, CommandHandler, ConversationHandler, MessageHandler, Filters -from telegram.utils.helpers import escape_markdown +from telegram.error import BadRequest, TelegramError +from telegram.ext import CommandHandler, ConversationHandler, MessageHandler, ContextTypes, filters +from telegram.helpers import escape_markdown -from telebot import dispatcher, config +from telebot import application, config from telebot.modules.db.exceptions import get_command_exception_chats from telebot.modules.db.users import add_user from telebot.utils import bot_action, CommandDescription, check_command @@ -33,7 +32,7 @@ @bot_action("sticker id") @check_command("stickerid") -def sticker_id(update: Update, context: CallbackContext) -> None: +async def sticker_id(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Reply with the file ID of a given sticker :param update: object representing the incoming update. @@ -47,15 +46,17 @@ def sticker_id(update: Update, context: CallbackContext) -> None: user_id=update.effective_message.reply_to_message.from_user.id, username=update.effective_message.reply_to_message.from_user.username, ) - update.effective_message.reply_markdown("Sticker ID:\n```" + escape_markdown(rep_msg.sticker.file_id) + "```") + await update.effective_message.reply_markdown( + "Sticker ID:\n```" + escape_markdown(rep_msg.sticker.file_id) + "```" + ) else: - update.effective_message.reply_text("Please reply to a sticker to get its ID.") + await update.effective_message.reply_text("Please reply to a sticker to get its ID.") @bot_action("get sticker") @check_command("getsticker") -def get_sticker(update: Update, context: CallbackContext) -> None: +async def get_sticker(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Reply with the PNG image as a document for a given sticker :param update: object representing the incoming update. @@ -73,24 +74,24 @@ def get_sticker(update: Update, context: CallbackContext) -> None: # check if sticker is animated, fugg off if it is if rep_msg.sticker.is_animated: - update.effective_message.reply_text( + await update.effective_message.reply_text( f"Sorry, cannyot get animated stickers for now {emojize(':crying_cat_face:', use_aliases=True)} I can meow tho..." ) else: # download file file_id = rep_msg.sticker.file_id - new_file = context.bot.get_file(file_id) + new_file = await context.bot.get_file(file_id) new_file.download(f"{file_id}.png") # send picture - context.bot.send_document(chat_id, document=open(f"{file_id}.png", "rb")) + await context.bot.send_document(chat_id, document=open(f"{file_id}.png", "rb")) # delete locally created image remove(f"{file_id}.png") else: - update.effective_message.reply_text("Please reply to a sticker for me to upload its PNG.") + await update.effective_message.reply_text("Please reply to a sticker for me to upload its PNG.") class StickerType(IntEnum): @@ -172,7 +173,7 @@ def _get_packs(user: User, bot: Bot, pack_type: StickerType) -> List[StickerSet] # default pack number and name of the first pack pack_num = 0 pack_name = _generate_pack_name(user, bot, pack_num, pack_type) - sticker_set = bot.get_sticker_set(pack_name) + sticker_set = await bot.get_sticker_set(pack_name) packs.append(sticker_set) while len(sticker_set.stickers) >= max_stickers: @@ -180,7 +181,7 @@ def _get_packs(user: User, bot: Bot, pack_type: StickerType) -> List[StickerSet] try: pack_num += 1 pack_name = _generate_pack_name(user, bot, pack_num, pack_type) - sticker_set = bot.get_sticker_set(pack_name) + sticker_set = await bot.get_sticker_set(pack_name) packs.append(sticker_set) except TelegramError: # if the next pack doesn't exist yet, then this is the one to use @@ -257,11 +258,11 @@ def _make_pack( pack_title = _generate_pack_title(user, pack_type, pack_num) match pack_type: case StickerType.STATIC: - bot.create_new_sticker_set(user.id, pack_name, pack_title, png_sticker=sticker, emojis=emoji) + await bot.create_new_sticker_set(user.id, pack_name, pack_title, png_sticker=sticker, emojis=emoji) case StickerType.ANIMATED: - bot.create_new_sticker_set(user.id, pack_name, pack_title, png_sticker=sticker, emojis=emoji) + await bot.create_new_sticker_set(user.id, pack_name, pack_title, png_sticker=sticker, emojis=emoji) case StickerType.VIDEO: - bot.create_new_sticker_set(user.id, pack_name, pack_title, webm_sticker=sticker, emojis=emoji) + await bot.create_new_sticker_set(user.id, pack_name, pack_title, webm_sticker=sticker, emojis=emoji) except TelegramError as e: match e.message: @@ -331,13 +332,15 @@ def extract_from_sticker(self, sticker: Sticker) -> None: if sticker.is_animated: self.type = StickerType.ANIMATED filename = self._get_temp_file_name() - sticker.get_file().download(filename) + sticker_file = await sticker.get_file() + sticker_file.download_to_drive(filename) self.content = open(filename, "rb") elif sticker.is_video: self.type = StickerType.VIDEO filename = self._get_temp_file_name() - sticker.get_file().download(filename) + sticker_file = await sticker.get_file() + sticker_file.download_to_drive(filename) self.content = open(filename, "rb") else: @@ -363,7 +366,7 @@ def extract_from_msg(self, msg: Message) -> None: self.type = StickerType.STATIC filename = self._get_temp_file_name() - self.bot.get_file(msg.reply_to_message.photo[-1].file_id).download(filename) + await self.bot.get_file(msg.reply_to_message.photo[-1].file_id).download(filename) _resize(filename) self.content = Path(filename) @@ -372,7 +375,7 @@ def extract_from_msg(self, msg: Message) -> None: self.type = StickerType.STATIC filename = self._get_temp_file_name() - self.bot.get_file(msg.reply_to_message.document.file_id).download(filename) + await self.bot.get_file(msg.reply_to_message.document.file_id).download(filename) _resize(filename) self.content = Path(filename) @@ -387,17 +390,17 @@ def add_to_pack(self, pack: StickerSet) -> None: """ match self.type: case StickerType.STATIC: - self.bot.add_sticker_to_set( + await self.bot.add_sticker_to_set( user_id=self.user.id, name=pack.name, png_sticker=self.content, emojis=self.emoji ) case StickerType.ANIMATED: - self.bot.add_sticker_to_set( + await self.bot.add_sticker_to_set( user_id=self.user.id, name=pack.name, tgs_sticker=open(self.content, "rb"), emojis=self.emoji ) case StickerType.VIDEO: - self.bot.add_sticker_to_set( + await self.bot.add_sticker_to_set( user_id=self.user.id, name=pack.name, webm_sticker=self.content, emojis=self.emoji ) @@ -413,7 +416,7 @@ def delete_kang_temp_files(self) -> None: @bot_action("kang") @check_command("kang") -def kang(update: Update, context: CallbackContext) -> None: +async def kang(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Add a sticker to user's pack :param update: object representing the incoming update @@ -483,7 +486,7 @@ def kang(update: Update, context: CallbackContext) -> None: @bot_action("migrate pack") @check_command("migrate") -def migrate(update: Update, context: CallbackContext) -> None: +async def migrate(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Migrate all stickers from a given pack into user's pack(s) :param update: object representing the incoming update. @@ -491,7 +494,9 @@ def migrate(update: Update, context: CallbackContext) -> None: """ # check if there is a sticker to kang set from if not update.effective_message.reply_to_message or not update.effective_message.reply_to_message.sticker: - update.effective_message.reply_text("Please reply to a sticker that belongs to a pack you want to migrate!") + await update.effective_message.reply_text( + "Please reply to a sticker that belongs to a pack you want to migrate!" + ) return # future usage @@ -503,24 +508,26 @@ def migrate(update: Update, context: CallbackContext) -> None: # get original set name og_set_name = update.effective_message.reply_to_message.sticker.set_name if og_set_name is None: - update.effective_message.reply_text("Please reply to a sticker that belongs to a pack you want to migrate!") + await update.effective_message.reply_text( + "Please reply to a sticker that belongs to a pack you want to migrate!" + ) return # check if the sticker set already belongs to this bot if search(f"{context.bot.username}$", og_set_name): - update.effective_message.reply_markdown(f"This pack already belongs to `{context.bot.first_name}`...") + await update.effective_message.reply_markdown(f"This pack already belongs to `{context.bot.first_name}`...") return - update.effective_message.reply_text("Please be patient, this little kitty's paws can only kang so fast....") + await update.effective_message.reply_text("Please be patient, this little kitty's paws can only kang so fast....") # get original set data - og_stickers_set = context.bot.get_sticker_set(og_set_name) + og_stickers_set = await context.bot.get_sticker_set(og_set_name) og_set_title = og_stickers_set.title stickers = og_stickers_set.stickers # Get orignal set's sticker metadata if not og_stickers_set.stickers: - update.effective_message.reply_text("Congratulations on finding a sticker pack with no stickers...") + await update.effective_message.reply_text("Congratulations on finding a sticker pack with no stickers...") custom_sticker = CustomSticker(user=update.effective_user, bot=context.bot) custom_sticker.extract_from_sticker(stickers[0]) pack_type = custom_sticker.type @@ -549,7 +556,7 @@ def migrate(update: Update, context: CallbackContext) -> None: # remove first sticker from list of stickers to migrate stickers = stickers[1:] - sticker_pack = context.bot.get_sticker_set(pack_name) + sticker_pack = await context.bot.get_sticker_set(pack_name) appended_packs = [sticker_pack] # list of packs the stickers were migrated into @@ -580,7 +587,7 @@ def migrate(update: Update, context: CallbackContext) -> None: print(len(sticker_pack.stickers)) # update sticker pack - sticker_pack = context.bot.get_sticker_set(pack_name) + sticker_pack = await context.bot.get_sticker_set(pack_name) # if current pack is full else: @@ -598,7 +605,7 @@ def migrate(update: Update, context: CallbackContext) -> None: pack_type, ) - sticker_pack = context.bot.get_sticker_set(pack_name) + sticker_pack = await context.bot.get_sticker_set(pack_name) appended_packs.append(sticker_pack) custom_sticker.delete_kang_temp_files() @@ -610,12 +617,12 @@ def migrate(update: Update, context: CallbackContext) -> None: *[f"[{pack.title}](t.me/addstickers/{pack.name})" for pack in appended_packs], ) ) - update.effective_message.reply_markdown(reply) + await update.effective_message.reply_markdown(reply) @bot_action("delete sticker") @check_command("delsticker") -def del_sticker(update: Update, context: CallbackContext) -> None: +async def del_sticker(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """ Delete a sticker form one of the user's packs :param update: object representing the incoming update. @@ -623,7 +630,7 @@ def del_sticker(update: Update, context: CallbackContext) -> None: """ # check if there's anything to delete if not update.effective_message.reply_to_message or not update.effective_message.reply_to_message.sticker: - update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") + await update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") return # future usage @@ -636,24 +643,28 @@ def del_sticker(update: Update, context: CallbackContext) -> None: sticker = update.effective_message.reply_to_message.sticker set_name = sticker.set_name if not search(f"{context.bot.username}$", set_name): - update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") + await update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") return # get sticker set info (for better replies) - set_title = context.bot.get_sticker_set(set_name).title + set_title = await context.bot.get_sticker_set(set_name).title # delete the sticker try: - context.bot.delete_sticker_from_set(sticker.file_id) + await context.bot.delete_sticker_from_set(sticker.file_id) except BadRequest: - update.effective_message.reply_text("Telegram seems to be high on catnip at the moment, try again in a while!") + await update.effective_message.reply_text( + "Telegram seems to be high on catnip at the moment, try again in a while!" + ) - update.effective_message.reply_markdown(f"Deleted that sticker from [{set_title}](t.me/addstickers/{set_name}).") + await update.effective_message.reply_markdown( + f"Deleted that sticker from [{set_title}](t.me/addstickers/{set_name})." + ) @bot_action("list packs") @check_command("packs") -def packs(update: Update, context: CallbackContext): +async def packs(update: Update, context: ContextTypes.DEFAULT_TYPE): """ List all the packs of a user :param update: object representing the incoming update. @@ -671,10 +682,10 @@ def packs(update: Update, context: CallbackContext): for pack in packs: reply += f"\n[{pack.title}](t.me/addstickers/{pack.name})" - update.effective_message.reply_markdown(reply) + await update.effective_message.reply_markdown(reply) else: - update.effective_message.reply_text( + await update.effective_message.reply_text( emojize("You have no packs yet! kang or migrate to make one :grinning_cat_face_with_smiling_eyes:") ) @@ -685,7 +696,7 @@ def packs(update: Update, context: CallbackContext): @bot_action("reorder step 1") @check_command("reorder") -def reorder1(update: Update, context: CallbackContext): +async def reorder1(update: Update, context: ContextTypes.DEFAULT_TYPE): """ First step in reordering sticker in pack - take input of sticker who's position is to be changed :param update: object representing the incoming update. @@ -694,7 +705,7 @@ def reorder1(update: Update, context: CallbackContext): """ # check if there is a sticker to kang set from if not update.effective_message.reply_to_message or not update.effective_message.reply_to_message.sticker: - update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") + await update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") return ConversationHandler.END # future usage @@ -707,15 +718,15 @@ def reorder1(update: Update, context: CallbackContext): sticker = update.effective_message.reply_to_message.sticker set_name = sticker.set_name if not search(f"{context.bot.username}$", set_name): - update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") + await update.effective_message.reply_text("Please reply to a sticker that belongs to a pack created by me") return ConversationHandler.END # if sticker position is given as arg, then set position and fugg off try: - context.bot.set_sticker_position_in_set( + await context.bot.set_sticker_position_in_set( update.effective_message.reply_to_message.sticker.file_id, int(context.args[0]) ) - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"I have updated [{context.bot.get_sticker_set(set_name).title}](t.me/addstickers/{set_name})!" ) return ConversationHandler.END @@ -727,7 +738,7 @@ def reorder1(update: Update, context: CallbackContext): str(update.effective_user.id) + str(update.effective_chat.id) ] = update.effective_message.reply_to_message.sticker.file_id - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Please send the sticker that is going to be on the `left` of this sticker __after__ the reorder, or /cancel to stop" ) @@ -735,7 +746,7 @@ def reorder1(update: Update, context: CallbackContext): @bot_action("reorder step 2") -def reorder2(update: Update, context: CallbackContext): +async def reorder2(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Last step in reordering sticker in pack - take input of sticker which is now gonna be on the left of the reordered sticker :param update: object representing the incoming update. @@ -744,19 +755,19 @@ def reorder2(update: Update, context: CallbackContext): """ # check if there is a sticker if not update.effective_message.sticker: - update.effective_message.reply_text("Please reply with a sticker that belongs to a pack created by me") + await update.effective_message.reply_text("Please reply with a sticker that belongs to a pack created by me") return 0 # check if the bot has perms to reorder the sticker sticker = update.effective_message.sticker set_name = sticker.set_name if not search(f"{context.bot.username}$", set_name): - update.effective_message.reply_text("Please reply with a sticker that belongs to a pack created by me") + await update.effective_message.reply_text("Please reply with a sticker that belongs to a pack created by me") return 0 # get position of sticker in sticker pack old_index = new_index = -1 - pack = context.bot.get_sticker_set(set_name) + pack = await context.bot.get_sticker_set(set_name) user_chat = reorder[str(update.effective_user.id) + str(update.effective_chat.id)] for i, s in enumerate(pack.stickers): if s.file_id == sticker.file_id: @@ -771,11 +782,11 @@ def reorder2(update: Update, context: CallbackContext): new_index += 1 # since the empty space will be after the sticker, not before # set sticker position - context.bot.set_sticker_position_in_set( + await context.bot.set_sticker_position_in_set( reorder[str(update.effective_user.id) + str(update.effective_chat.id)], new_index ) del reorder[str(update.effective_user.id) + str(update.effective_chat.id)] - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"I have updated [{context.bot.get_sticker_set(set_name).title}](t.me/addstickers/{set_name})!" ) @@ -784,7 +795,7 @@ def reorder2(update: Update, context: CallbackContext): @bot_action("reorder cancel") @check_command("cancel") -def reorder_cancel(update: Update, context: CallbackContext): +async def reorder_cancel(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Last step in reordering sticker in pack - take input of sticker which is now gonna be on the left of the reordered sticker :param update: object representing the incoming update. @@ -793,7 +804,7 @@ def reorder_cancel(update: Update, context: CallbackContext): """ # set sticker position del reorder[str(update.effective_user.id) + str(update.effective_chat.id)] - update.effective_message.reply_text(f"Don't wake me up from my nap before you make up your mind!") + await update.effective_message.reply_text(f"Don't wake me up from my nap before you make up your mind!") return ConversationHandler.END @@ -844,16 +855,16 @@ def reorder_cancel(update: Update, context: CallbackContext): ) # create handlers -dispatcher.add_handler(CommandHandler("stickerid", sticker_id, run_async=True)) -dispatcher.add_handler(CommandHandler("getsticker", get_sticker, run_async=True)) -dispatcher.add_handler(CommandHandler("kang", kang, run_async=True)) -dispatcher.add_handler(CommandHandler("migrate", migrate, run_async=True)) -dispatcher.add_handler(CommandHandler("delsticker", del_sticker, run_async=True)) -dispatcher.add_handler(CommandHandler("packs", packs, run_async=True)) -dispatcher.add_handler( +application.add_handler(CommandHandler("stickerid", sticker_id, block=False)) +application.add_handler(CommandHandler("getsticker", get_sticker, block=False)) +application.add_handler(CommandHandler("kang", kang, block=False)) +application.add_handler(CommandHandler("migrate", migrate, block=False)) +application.add_handler(CommandHandler("delsticker", del_sticker, block=False)) +application.add_handler(CommandHandler("packs", packs, block=False)) +application.add_handler( ConversationHandler( - entry_points=[CommandHandler("reorder", reorder1, run_async=True)], - states={0: [MessageHandler(Filters.sticker, reorder2, run_async=True)]}, - fallbacks=[CommandHandler("cancel", reorder_cancel, run_async=True)], + entry_points=[CommandHandler("reorder", reorder1, block=False)], + states={0: [MessageHandler(filters.Sticker.ALL, reorder2, block=False)]}, + fallbacks=[CommandHandler("cancel", reorder_cancel, block=False)], ) ) diff --git a/telebot/modules/ud.py b/telebot/modules/ud.py index 2e21165..29ba9bc 100644 --- a/telebot/modules/ud.py +++ b/telebot/modules/ud.py @@ -1,14 +1,14 @@ from requests import get from telegram import Update, InlineKeyboardMarkup, InlineKeyboardButton -from telegram.ext import CallbackContext, CommandHandler +from telegram.ext import CommandHandler, ContextTypes -from telebot import dispatcher +from telebot import application from telebot.utils import bot_action, CommandDescription, check_command @bot_action("urban dict") @check_command("ud") -def ud(update: Update, context: CallbackContext): +async def ud(update: Update, context: ContextTypes.DEFAULT_TYPE): """ Reply with all the imported modules :param update: object representing the incoming update. @@ -17,19 +17,19 @@ def ud(update: Update, context: CallbackContext): if context.args: try: result = get(f'https://api.urbandictionary.com/v0/define?term={" ".join(context.args)}').json()["list"][0] - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"***{result['word']}***\n\n{result['definition']}", reply_markup=InlineKeyboardMarkup.from_button( InlineKeyboardButton(text="Click here to learn more", url=result["permalink"]) ), ) except IndexError: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( "Urban Dictionary doesn't know the answer to this, ask God or offer tuna to a passing cat to gain the " "wisdom you seek. Preferably the second option. When I'm passing by." ) else: - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"***{update.effective_user.first_name}***\n\n" f"A dumbass eternally high on cheap catnip who doesn't know that I can't get a word's " f"meaning they don't tell me what the bloody word is.\n\n", @@ -44,4 +44,4 @@ def ud(update: Update, context: CallbackContext): ), ) -dispatcher.add_handler(CommandHandler("ud", ud, run_async=True)) +application.add_handler(CommandHandler("ud", ud, block=False)) diff --git a/telebot/utils.py b/telebot/utils.py index 4d1b466..b59fc03 100644 --- a/telebot/utils.py +++ b/telebot/utils.py @@ -9,7 +9,7 @@ from telegram import Update, Message, MessageEntity from telegram.error import BadRequest from telegram.ext import CallbackContext -from telegram.utils.helpers import mention_markdown +from telegram.helpers import mention_markdown from telebot import config from telebot.modules.db.chat_commands import check_command_for_chat @@ -55,16 +55,17 @@ def check_user_admin(func: Callable): """ @wraps(func) - def wrapper(update: Update, context: CallbackContext, *args, **kwargs): + async def wrapper(update: Update, context: CallbackContext, *args, **kwargs): if update.effective_chat.type != "private": # check if user is admin - if update.effective_chat.get_member(update.effective_user.id).status not in ("administrator", "creator"): - update.effective_message.reply_text( + user = await update.effective_chat.get_member(update.effective_user.id) + if user.status not in ("administrator", "creator"): + await update.effective_message.reply_text( "Get some admin privileges before you try to order me around, baka!" ) return - return func(update, context, *args, **kwargs) + return await func(update, context, *args, **kwargs) return wrapper @@ -76,14 +77,15 @@ def check_bot_admin(func: Callable): """ @wraps(func) - def wrapper(update: Update, context: CallbackContext, *args, **kwargs): + async def wrapper(update: Update, context: CallbackContext, *args, **kwargs): if update.effective_chat.type != "private": # check if bot is an admin - if update.effective_chat.get_member(context.bot.id).status not in ("administrator", "creator"): - update.effective_message.reply_text("Ask your sugar daddy to give me admin status plej...") + bot = await update.effective_chat.get_member(context.bot.id) + if bot.status not in ("administrator", "creator"): + await update.effective_message.reply_text("Ask your sugar daddy to give me admin status plej...") return - return func(update, context, *args, **kwargs) + return await func(update, context, *args, **kwargs) return wrapper @@ -103,7 +105,7 @@ def wrapper(func: Callable): """ @wraps(func) - def inner(update: Update, context: CallbackContext, *args, **kwargs): + async def inner(update: Update, context: CallbackContext, *args, **kwargs): """ check and execute the function :param update: object representing the incoming update. @@ -122,10 +124,10 @@ def inner(update: Update, context: CallbackContext, *args, **kwargs): except: print_exc() - return func(update, context, *args, **kwargs) # execute the function + return await func(update, context, *args, **kwargs) # execute the function else: - update.effective_message.reply_markdown(error_msg) + await update.effective_message.reply_markdown(error_msg) return inner @@ -181,7 +183,7 @@ def wrapper(func: Callable): """ @wraps(func) - def inner(update: Update, context: CallbackContext, *args, **kwargs): + async def inner(update: Update, context: CallbackContext, *args, **kwargs): """ log and execute the function :param update: object representing the incoming update. @@ -199,10 +201,10 @@ def inner(update: Update, context: CallbackContext, *args, **kwargs): log(update, func_name, extra_text) try: - return func(update, context, *args, **kwargs) + return await func(update, context, *args, **kwargs) except BadRequest as e: if e.message == "Message is too long": - update.effective_message.reply_text( + await update.effective_message.reply_text( emojize( "I tried to send a message so long that my tongue got tired :sad_but_relieved_face: " "This is not gonna work, let's try something else..." @@ -215,7 +217,7 @@ def inner(update: Update, context: CallbackContext, *args, **kwargs): except: err = f"```{format_exc()}```" - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"{err}\n\n" f"Show this to {mention_markdown(user_id=config.ADMIN, name='my master')} and bribe him with " "some catnip to fix it for you..." @@ -227,7 +229,7 @@ def inner(update: Update, context: CallbackContext, *args, **kwargs): except: err = f"```{format_exc()}```" - update.effective_message.reply_markdown( + await update.effective_message.reply_markdown( f"{err}\n\n" f"Show this to {mention_markdown(user_id=config.ADMIN, name='my master')} and bribe him with " "some catnip to fix it for you..." @@ -253,7 +255,7 @@ def wrapper(func: Callable): """ @wraps(func) - def inner(update: Update, context: CallbackContext, *args, **kwargs): + async def inner(update: Update, context: CallbackContext, *args, **kwargs): """ check command and execute the function :param update: object representing the incoming update. @@ -263,12 +265,12 @@ def inner(update: Update, context: CallbackContext, *args, **kwargs): :return: inner function to execute """ if not check_command_for_chat(update.effective_chat.id, command): - update.effective_message.reply_text( + await update.effective_message.reply_text( "This command is forbidden in this chat! If you want to do forbidden stuff, go to Alabama..." ) return - return func(update, context, *args, **kwargs) + return await func(update, context, *args, **kwargs) return inner