ya-tagscript 1.7.0__tar.gz → 1.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.github/workflows/black.yml +2 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.github/workflows/coverage_comment.yml +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.github/workflows/publish.yml +2 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.github/workflows/test.yml +6 -6
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/CHANGELOG.md +11 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/PKG-INFO +3 -3
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/README.md +2 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/blocks.rst +9 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/conf.py +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/pyproject.toml +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/command_block.py +14 -3
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/delete_block.py +13 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/override_block.py +14 -3
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/react_block.py +15 -4
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/redirect_block.py +12 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/silence_block.py +12 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/discord/embed_block.py +17 -3
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/limiters/blacklist_block.py +13 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/limiters/require_block.py +13 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/ts_parser.py +38 -8
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/test_command_block.py +7 -5
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/test_delete_block.py +6 -6
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/test_react_block.py +14 -14
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/test_redirect_block.py +8 -6
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/test_silence_block.py +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/conditional/test_all_block.py +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/conditional/test_any_block.py +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/conditional/test_if_block.py +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/discord/test_cooldown_block.py +25 -12
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/flow/test_stop_block.py +4 -2
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/meta/test_comment_block.py +1 -1
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/interpreter/test_ts_parser.py +75 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.flake8 +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.github/dependabot.yml +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.gitignore +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.pre-commit-config.yaml +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.python-version +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/.readthedocs.yaml +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/LICENSE.md +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/Makefile +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/_ext/glossary_backlink_checker.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/_ext/styled_list_directive.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/adapters.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/changelog.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/code_examples/adapters/int_adapter_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/code_examples/adapters/member_adapter_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/code_examples/nested_blocks_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/code_examples/quickstart_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/credits.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/exceptions.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/glossary.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/index.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/interfaces.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/interpreter.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/intro.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/make.bat +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/numeric_parser.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/quickstart.rst +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/docs/requirements.txt +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/make_release.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/discord_adapters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/discord_adapters/attribute_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/discord_adapters/channel_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/discord_adapters/guild_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/discord_adapters/member_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/function_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/int_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/object_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/adapters/string_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/actions/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/conditional/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/conditional/all_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/conditional/any_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/conditional/if_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/discord/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/discord/cooldown_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/flow/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/flow/break_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/flow/shortcutredirect_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/flow/stop_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/limiters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/lists/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/lists/cycle_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/lists/list_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/math/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/math/math_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/math/ordinal_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/meta/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/meta/comment_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/meta/debug_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/rng/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/rng/fiftyfifty_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/rng/random_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/rng/range_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/case_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/join_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/python_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/replace_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/substring_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/urldecode_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/strings/urlencode_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/time/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/time/strf_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/time/timedelta_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/variables/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/variables/assign_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/variables/loose_variable_getter_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/variables/strict_variable_getter_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/exceptions/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/exceptions/exceptions.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interfaces/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interfaces/adapterabc.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interfaces/blockabc.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interfaces/interpreterabc.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interfaces/nodeabc.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/context.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/interpreter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/node.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/parse_state.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/interpreter/response.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/py.typed +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/util/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/util/conditionals.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/util/escaping.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/util/splitter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/.coveragerc +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/code_examples/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/code_examples/adapters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/code_examples/adapters/test_int_adapter_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/code_examples/adapters/test_member_adapter_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/code_examples/test_nested_blocks_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/docs/code_examples/test_quickstart_example.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/discord_adapters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/discord_adapters/test_attribute_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/discord_adapters/test_channel_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/discord_adapters/test_guild_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/discord_adapters/test_member_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/test_function_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/test_int_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/test_object_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/adapters/test_string_adapter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/actions/test_override_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/conditional/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/discord/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/discord/test_embed_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/flow/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/flow/test_break_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/flow/test_shortcutredirect_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/limiters/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/limiters/test_blacklist_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/limiters/test_require_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/lists/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/lists/test_cycle_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/lists/test_list_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/math/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/math/test_math_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/math/test_ordinal_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/meta/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/meta/test_debug_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/rng/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/rng/test_fiftyfifty_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/rng/test_random_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/rng/test_range_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_case_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_join_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_python_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_replace_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_substring_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_urldecode_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/strings/test_urlencode_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/time/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/time/test_strf_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/time/test_timedelta_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/variables/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/variables/test_assign_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/variables/test_loose_variable_getter_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/blocks/variables/test_strict_variable_getter_block.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/interpreter/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/interpreter/test_interpreter.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/interpreter/test_node.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/interpreter/test_parse_state.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/util/__init__.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/util/test_conditionals.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/util/test_escaping.py +0 -0
- {ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/tests/ya_tagscript/util/test_splitter.py +0 -0
|
@@ -14,9 +14,9 @@ jobs:
|
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
16
|
- name: Checkout
|
|
17
|
-
uses: actions/checkout@
|
|
17
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
18
18
|
|
|
19
|
-
- uses: actions/setup-python@
|
|
19
|
+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
20
20
|
with:
|
|
21
21
|
python-version-file: ".python-version"
|
|
22
22
|
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
|
|
20
20
|
steps:
|
|
21
21
|
- name: Post comment
|
|
22
|
-
uses: py-cov-action/python-coverage-comment-action@
|
|
22
|
+
uses: py-cov-action/python-coverage-comment-action@5d8df5979747514c914e1c5a12335a7cf9a2745f # v4.1
|
|
23
23
|
with:
|
|
24
24
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
25
|
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
|
|
@@ -15,12 +15,12 @@ jobs:
|
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
19
19
|
with:
|
|
20
20
|
persist-credentials: false
|
|
21
21
|
|
|
22
22
|
- name: Set up Python
|
|
23
|
-
uses: actions/setup-python@
|
|
23
|
+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
24
24
|
with:
|
|
25
25
|
cache: pip
|
|
26
26
|
python-version-file: ".python-version"
|
|
@@ -19,10 +19,10 @@ jobs:
|
|
|
19
19
|
|
|
20
20
|
steps:
|
|
21
21
|
- name: Checkout
|
|
22
|
-
uses: actions/checkout@
|
|
22
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
23
23
|
|
|
24
24
|
- name: Setup Python ${{ matrix.python-version }}
|
|
25
|
-
uses: actions/setup-python@
|
|
25
|
+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
26
26
|
with:
|
|
27
27
|
allow-prereleases: true
|
|
28
28
|
cache: pip
|
|
@@ -58,10 +58,10 @@ jobs:
|
|
|
58
58
|
|
|
59
59
|
steps:
|
|
60
60
|
- name: Checkout
|
|
61
|
-
uses: actions/checkout@
|
|
61
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
62
62
|
|
|
63
63
|
- name: Setup Python
|
|
64
|
-
uses: actions/setup-python@
|
|
64
|
+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
65
65
|
with:
|
|
66
66
|
cache: pip
|
|
67
67
|
python-version-file: .python-version
|
|
@@ -105,7 +105,7 @@ jobs:
|
|
|
105
105
|
|
|
106
106
|
steps:
|
|
107
107
|
- name: Checkout
|
|
108
|
-
uses: actions/checkout@
|
|
108
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
109
109
|
|
|
110
110
|
- name: Download coverage data
|
|
111
111
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
@@ -114,7 +114,7 @@ jobs:
|
|
|
114
114
|
|
|
115
115
|
- name: Generate coverage comment
|
|
116
116
|
id: coverage-comment
|
|
117
|
-
uses: py-cov-action/python-coverage-comment-action@
|
|
117
|
+
uses: py-cov-action/python-coverage-comment-action@5d8df5979747514c914e1c5a12335a7cf9a2745f # v4.1
|
|
118
118
|
with:
|
|
119
119
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
120
120
|
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
*Currently none*
|
|
4
4
|
|
|
5
|
+
# v1.7.2 (2026-07-15)
|
|
6
|
+
|
|
7
|
+
- More parsing loop performance improvements
|
|
8
|
+
- Fix escapement bug causing 0-level escaped blocks to not be properly escaped
|
|
9
|
+
- This change may cause output differences in scripts with escaped blocks.
|
|
10
|
+
|
|
11
|
+
# v1.7.1 (2026-07-03)
|
|
12
|
+
|
|
13
|
+
- Added `ACTIONS_KEY` constants to all blocks which add data to the `Response.actions`
|
|
14
|
+
attribute as a typo-safe convenience.
|
|
15
|
+
|
|
5
16
|
# v1.7.0 (2026-06-11)
|
|
6
17
|
|
|
7
18
|
- The `_accepted_names` block property has been **deprecated** and is scheduled for
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ya_tagscript
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.2
|
|
4
4
|
Summary: Yet Another TagScript fork. An easy drop in user-provided Templating system.
|
|
5
5
|
Project-URL: Changelog, https://ya-tagscript.readthedocs.io/en/latest/changelog.html
|
|
6
6
|
Project-URL: Documentation, https://ya-tagscript.readthedocs.io
|
|
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|

|
|
31
31
|
[](https://github.com/psf/black)
|
|
32
32
|
|
|
33
|
-
Current stable version: v1.7.
|
|
33
|
+
Current stable version: v1.7.2
|
|
34
34
|
|
|
35
35
|
## Information
|
|
36
36
|
|
|
@@ -92,7 +92,7 @@ or
|
|
|
92
92
|
<!--VERSIONED TAG SECTION START-->
|
|
93
93
|
|
|
94
94
|
```
|
|
95
|
-
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.7.
|
|
95
|
+
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.7.2
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
<!--VERSIONED TAG SECTION END-->
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
[](https://github.com/psf/black)
|
|
7
7
|
|
|
8
|
-
Current stable version: v1.7.
|
|
8
|
+
Current stable version: v1.7.2
|
|
9
9
|
|
|
10
10
|
## Information
|
|
11
11
|
|
|
@@ -67,7 +67,7 @@ or
|
|
|
67
67
|
<!--VERSIONED TAG SECTION START-->
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.7.
|
|
70
|
+
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.7.2
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
<!--VERSIONED TAG SECTION END-->
|
|
@@ -19,16 +19,22 @@ client. Characterised by adding data to the the
|
|
|
19
19
|
:class:`~ya_tagscript.interpreter.Response` return value.
|
|
20
20
|
|
|
21
21
|
.. autoclass:: CommandBlock
|
|
22
|
+
:members: ACTIONS_KEY
|
|
22
23
|
|
|
23
24
|
.. autoclass:: DeleteBlock
|
|
25
|
+
:members: ACTIONS_KEY
|
|
24
26
|
|
|
25
27
|
.. autoclass:: OverrideBlock
|
|
28
|
+
:members: ACTIONS_KEY
|
|
26
29
|
|
|
27
30
|
.. autoclass:: ReactBlock
|
|
31
|
+
:members: ACTIONS_KEY
|
|
28
32
|
|
|
29
33
|
.. autoclass:: RedirectBlock
|
|
34
|
+
:members: ACTIONS_KEY
|
|
30
35
|
|
|
31
36
|
.. autoclass:: SilenceBlock
|
|
37
|
+
:members: ACTIONS_KEY
|
|
32
38
|
|
|
33
39
|
----
|
|
34
40
|
|
|
@@ -49,6 +55,7 @@ Discord Blocks
|
|
|
49
55
|
.. autoclass:: CooldownBlock
|
|
50
56
|
|
|
51
57
|
.. autoclass:: EmbedBlock
|
|
58
|
+
:members: ACTIONS_KEY
|
|
52
59
|
|
|
53
60
|
----
|
|
54
61
|
|
|
@@ -67,8 +74,10 @@ Limiter Blocks
|
|
|
67
74
|
==============
|
|
68
75
|
|
|
69
76
|
.. autoclass:: BlacklistBlock
|
|
77
|
+
:members: ACTIONS_KEY
|
|
70
78
|
|
|
71
79
|
.. autoclass:: RequireBlock
|
|
80
|
+
:members: ACTIONS_KEY
|
|
72
81
|
|
|
73
82
|
----
|
|
74
83
|
|
|
@@ -33,6 +33,9 @@ class CommandBlock(BlockABC):
|
|
|
33
33
|
- :attr:`~ya_tagscript.interpreter.Response.actions`
|
|
34
34
|
- ``actions["commands"]``: :class:`list[str]` | :data:`None` — A list of
|
|
35
35
|
command strings or :data:`None`
|
|
36
|
+
- The key is available via the
|
|
37
|
+
:attr:`CommandBlock.ACTIONS_KEY
|
|
38
|
+
<ya_tagscript.blocks.CommandBlock.ACTIONS_KEY>` class attribute
|
|
36
39
|
|
|
37
40
|
Note:
|
|
38
41
|
This block will only add the processed command strings to the ``commands``
|
|
@@ -40,6 +43,14 @@ class CommandBlock(BlockABC):
|
|
|
40
43
|
*up to the client* to implement actual command execution behaviour as desired.
|
|
41
44
|
"""
|
|
42
45
|
|
|
46
|
+
ACTIONS_KEY = "commands"
|
|
47
|
+
"""
|
|
48
|
+
The key used to store data in the
|
|
49
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
50
|
+
|
|
51
|
+
.. versionadded:: 1.7.1
|
|
52
|
+
"""
|
|
53
|
+
|
|
43
54
|
_VALID_NAMES = {"c", "com", "cmd", "command"}
|
|
44
55
|
|
|
45
56
|
requires_nonempty_payload = True
|
|
@@ -54,12 +65,12 @@ class CommandBlock(BlockABC):
|
|
|
54
65
|
|
|
55
66
|
command = ctx.interpret_segment(payload)
|
|
56
67
|
|
|
57
|
-
commands: list[str] | None = ctx.response.actions.get(
|
|
68
|
+
commands: list[str] | None = ctx.response.actions.get(CommandBlock.ACTIONS_KEY)
|
|
58
69
|
if commands is not None:
|
|
59
70
|
if len(commands) >= self.limit:
|
|
60
71
|
return f"`COMMAND LIMIT REACHED ({self.limit})`"
|
|
61
|
-
ctx.response.actions[
|
|
72
|
+
ctx.response.actions[CommandBlock.ACTIONS_KEY].append(command)
|
|
62
73
|
else:
|
|
63
|
-
ctx.response.actions[
|
|
74
|
+
ctx.response.actions[CommandBlock.ACTIONS_KEY] = [command]
|
|
64
75
|
|
|
65
76
|
return ""
|
|
@@ -45,6 +45,9 @@ class DeleteBlock(BlockABC):
|
|
|
45
45
|
- :attr:`~ya_tagscript.interpreter.Response.actions`
|
|
46
46
|
- ``actions["delete"]``: :class:`bool` — Whether the invoking message should be
|
|
47
47
|
deleted
|
|
48
|
+
- The key is available via the
|
|
49
|
+
:attr:`DeleteBlock.ACTIONS_KEY <ya_tagscript.blocks.DeleteBlock.ACTIONS_KEY>`
|
|
50
|
+
class attribute
|
|
48
51
|
|
|
49
52
|
Note:
|
|
50
53
|
This block will only set the ``delete``
|
|
@@ -53,10 +56,18 @@ class DeleteBlock(BlockABC):
|
|
|
53
56
|
deletion behaviour as desired.
|
|
54
57
|
"""
|
|
55
58
|
|
|
59
|
+
ACTIONS_KEY = "delete"
|
|
60
|
+
"""
|
|
61
|
+
The key used to store data in the
|
|
62
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
63
|
+
|
|
64
|
+
.. versionadded:: 1.7.1
|
|
65
|
+
"""
|
|
66
|
+
|
|
56
67
|
_VALID_NAMES = {"delete", "del"}
|
|
57
68
|
|
|
58
69
|
def process(self, ctx: Context) -> str | None:
|
|
59
|
-
if
|
|
70
|
+
if DeleteBlock.ACTIONS_KEY in ctx.response.actions.keys():
|
|
60
71
|
return ""
|
|
61
72
|
|
|
62
73
|
value: bool | None
|
|
@@ -65,5 +76,5 @@ class DeleteBlock(BlockABC):
|
|
|
65
76
|
value = True
|
|
66
77
|
else:
|
|
67
78
|
value = parse_condition(ctx, param)
|
|
68
|
-
ctx.response.actions[
|
|
79
|
+
ctx.response.actions[DeleteBlock.ACTIONS_KEY] = value
|
|
69
80
|
return ""
|
|
@@ -43,6 +43,9 @@ class OverrideBlock(BlockABC):
|
|
|
43
43
|
:class:`dict[Literal["admin", "mod", "permissions"], bool]` — A dictionary
|
|
44
44
|
like ``{"admin": bool, "mod": bool, "permissions": bool}`` where each
|
|
45
45
|
attribute is either :data:`True` or :data:`False`
|
|
46
|
+
- The key is available via the
|
|
47
|
+
:attr:`OverrideBlock.ACTIONS_KEY
|
|
48
|
+
<ya_tagscript.blocks.OverrideBlock.ACTIONS_KEY>` class attribute
|
|
46
49
|
|
|
47
50
|
Note:
|
|
48
51
|
This block only sets the ``overrides``
|
|
@@ -52,12 +55,20 @@ class OverrideBlock(BlockABC):
|
|
|
52
55
|
what permissions qualify for "admin", "mod", or "permissions".
|
|
53
56
|
"""
|
|
54
57
|
|
|
58
|
+
ACTIONS_KEY = "overrides"
|
|
59
|
+
"""
|
|
60
|
+
The key used to store data in the
|
|
61
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
62
|
+
|
|
63
|
+
.. versionadded:: 1.7.1
|
|
64
|
+
"""
|
|
65
|
+
|
|
55
66
|
_VALID_NAMES = {"override"}
|
|
56
67
|
|
|
57
68
|
def process(self, ctx: Context) -> str | None:
|
|
58
69
|
param = ctx.node.parameter
|
|
59
70
|
if param is None:
|
|
60
|
-
ctx.response.actions[
|
|
71
|
+
ctx.response.actions[OverrideBlock.ACTIONS_KEY] = {
|
|
61
72
|
"admin": True,
|
|
62
73
|
"mod": True,
|
|
63
74
|
"permissions": True,
|
|
@@ -69,9 +80,9 @@ class OverrideBlock(BlockABC):
|
|
|
69
80
|
return None
|
|
70
81
|
|
|
71
82
|
overrides = ctx.response.actions.get(
|
|
72
|
-
|
|
83
|
+
OverrideBlock.ACTIONS_KEY,
|
|
73
84
|
{"admin": False, "mod": False, "permissions": False},
|
|
74
85
|
)
|
|
75
86
|
overrides[parsed_param] = True
|
|
76
|
-
ctx.response.actions[
|
|
87
|
+
ctx.response.actions[OverrideBlock.ACTIONS_KEY] = overrides
|
|
77
88
|
return ""
|
|
@@ -62,6 +62,9 @@ class ReactBlock(BlockABC):
|
|
|
62
62
|
:class:`dict[Literal["input", "output"], list[str]]` — A dictionary like
|
|
63
63
|
``{"input": [...], "output": [...]}`` (each key may be missing if it wasn't
|
|
64
64
|
used in the script)
|
|
65
|
+
- The key is available via the
|
|
66
|
+
:attr:`ReactBlock.ACTIONS_KEY <ya_tagscript.blocks.ReactBlock.ACTIONS_KEY>`
|
|
67
|
+
class attribute
|
|
65
68
|
|
|
66
69
|
Note:
|
|
67
70
|
This block will only set the provided string(s) in the ``reactions``
|
|
@@ -71,6 +74,14 @@ class ReactBlock(BlockABC):
|
|
|
71
74
|
behaviour as desired.
|
|
72
75
|
"""
|
|
73
76
|
|
|
77
|
+
ACTIONS_KEY = "reactions"
|
|
78
|
+
"""
|
|
79
|
+
The key used to store data in the
|
|
80
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
81
|
+
|
|
82
|
+
.. versionadded:: 1.7.1
|
|
83
|
+
"""
|
|
84
|
+
|
|
74
85
|
_VALID_NAMES = {"react", "reactu"}
|
|
75
86
|
|
|
76
87
|
requires_nonempty_payload = True
|
|
@@ -97,13 +108,13 @@ class ReactBlock(BlockABC):
|
|
|
97
108
|
return f"`Reaction Limit Reached ({self.limit})`"
|
|
98
109
|
|
|
99
110
|
if parsed_declaration == "react":
|
|
100
|
-
reactions_dict = ctx.response.actions.get(
|
|
111
|
+
reactions_dict = ctx.response.actions.get(ReactBlock.ACTIONS_KEY, {})
|
|
101
112
|
reactions_dict.update({"output": reactions})
|
|
102
|
-
ctx.response.actions[
|
|
113
|
+
ctx.response.actions[ReactBlock.ACTIONS_KEY] = reactions_dict
|
|
103
114
|
elif parsed_declaration == "reactu":
|
|
104
|
-
reactions_dict = ctx.response.actions.get(
|
|
115
|
+
reactions_dict = ctx.response.actions.get(ReactBlock.ACTIONS_KEY, {})
|
|
105
116
|
reactions_dict.update({"input": reactions})
|
|
106
|
-
ctx.response.actions[
|
|
117
|
+
ctx.response.actions[ReactBlock.ACTIONS_KEY] = reactions_dict
|
|
107
118
|
else:
|
|
108
119
|
return None
|
|
109
120
|
return ""
|
|
@@ -48,6 +48,9 @@ class RedirectBlock(BlockABC):
|
|
|
48
48
|
- :attr:`~ya_tagscript.interpreter.Response.actions`
|
|
49
49
|
- ``actions["target"]``: :class:`Literal["dm", "reply"]` | :class:`str` — A
|
|
50
50
|
string indicating the redirection target
|
|
51
|
+
- The key is available via the
|
|
52
|
+
:attr:`RedirectBlock.ACTIONS_KEY
|
|
53
|
+
<ya_tagscript.blocks.RedirectBlock.ACTIONS_KEY>` class attribute
|
|
51
54
|
|
|
52
55
|
Note:
|
|
53
56
|
This block will only set the ``target``
|
|
@@ -57,6 +60,14 @@ class RedirectBlock(BlockABC):
|
|
|
57
60
|
and reject channel names, for example).
|
|
58
61
|
"""
|
|
59
62
|
|
|
63
|
+
ACTIONS_KEY = "target"
|
|
64
|
+
"""
|
|
65
|
+
The key used to store data in the
|
|
66
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
67
|
+
|
|
68
|
+
.. versionadded:: 1.7.1
|
|
69
|
+
"""
|
|
70
|
+
|
|
60
71
|
_VALID_NAMES = {"redirect"}
|
|
61
72
|
|
|
62
73
|
requires_nonempty_parameter = False
|
|
@@ -75,5 +86,5 @@ class RedirectBlock(BlockABC):
|
|
|
75
86
|
target = "reply"
|
|
76
87
|
else:
|
|
77
88
|
target = parsed_param
|
|
78
|
-
ctx.response.actions[
|
|
89
|
+
ctx.response.actions[RedirectBlock.ACTIONS_KEY] = target
|
|
79
90
|
return ""
|
|
@@ -35,6 +35,9 @@ class SilenceBlock(BlockABC):
|
|
|
35
35
|
- :attr:`~ya_tagscript.interpreter.Response.actions`
|
|
36
36
|
- ``actions["silent"]``: :class:`Literal[True]` — Always :data:`True` if a
|
|
37
37
|
SilenceBlock was used
|
|
38
|
+
- The key is available via the
|
|
39
|
+
:attr:`SilenceBlock.ACTIONS_KEY
|
|
40
|
+
<ya_tagscript.blocks.SilenceBlock.ACTIONS_KEY>` class attribute
|
|
38
41
|
|
|
39
42
|
Note:
|
|
40
43
|
This block will only set the ``silent``
|
|
@@ -44,8 +47,16 @@ class SilenceBlock(BlockABC):
|
|
|
44
47
|
this is **not** recommended.
|
|
45
48
|
"""
|
|
46
49
|
|
|
50
|
+
ACTIONS_KEY = "silent"
|
|
51
|
+
"""
|
|
52
|
+
The key used to store data in the
|
|
53
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
54
|
+
|
|
55
|
+
.. versionadded:: 1.7.1
|
|
56
|
+
"""
|
|
57
|
+
|
|
47
58
|
_VALID_NAMES = {"silent", "silence"}
|
|
48
59
|
|
|
49
60
|
def process(self, ctx: Context) -> str | None:
|
|
50
|
-
ctx.response.actions[
|
|
61
|
+
ctx.response.actions[SilenceBlock.ACTIONS_KEY] = True
|
|
51
62
|
return ""
|
|
@@ -233,7 +233,7 @@ def _return_embed(ctx: Context, embed: Embed) -> str:
|
|
|
233
233
|
return str(e)
|
|
234
234
|
if size > 6000:
|
|
235
235
|
return f"`MAX EMBED LENGTH REACHED ({size}/6000)`"
|
|
236
|
-
ctx.response.actions[
|
|
236
|
+
ctx.response.actions[EmbedBlock.ACTIONS_KEY] = embed
|
|
237
237
|
return ""
|
|
238
238
|
|
|
239
239
|
|
|
@@ -418,12 +418,23 @@ class EmbedBlock(BlockABC):
|
|
|
418
418
|
- :attr:`~ya_tagscript.interpreter.Response.actions`
|
|
419
419
|
- ``actions["embed"]``: :class:`discord.Embed` — The constructed
|
|
420
420
|
:class:`discord.Embed`
|
|
421
|
+
- The key is available via the
|
|
422
|
+
:attr:`EmbedBlock.ACTIONS_KEY <ya_tagscript.blocks.EmbedBlock.ACTIONS_KEY>`
|
|
423
|
+
class attribute
|
|
421
424
|
|
|
422
425
|
Note:
|
|
423
426
|
This block only sets the ``embed`` actions key as shown above. It is *up to the
|
|
424
427
|
client* to actually send the :class:`discord.Embed` object being constructed.
|
|
425
428
|
"""
|
|
426
429
|
|
|
430
|
+
ACTIONS_KEY = "embed"
|
|
431
|
+
"""
|
|
432
|
+
The key used to store data in the
|
|
433
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
434
|
+
|
|
435
|
+
.. versionadded:: 1.7.1
|
|
436
|
+
"""
|
|
437
|
+
|
|
427
438
|
_VALID_NAMES = {"embed"}
|
|
428
439
|
|
|
429
440
|
ATTRIBUTE_HANDLERS: dict[str, Callable[[Context, Embed, str, str | None], None]] = {
|
|
@@ -443,7 +454,10 @@ class EmbedBlock(BlockABC):
|
|
|
443
454
|
def process(self, ctx: Context) -> str | None:
|
|
444
455
|
param = ctx.node.parameter
|
|
445
456
|
if param is None:
|
|
446
|
-
return _return_embed(
|
|
457
|
+
return _return_embed(
|
|
458
|
+
ctx,
|
|
459
|
+
ctx.response.actions.get(EmbedBlock.ACTIONS_KEY, Embed()),
|
|
460
|
+
)
|
|
447
461
|
|
|
448
462
|
parsed_param = ctx.interpret_segment(param)
|
|
449
463
|
lowercase_param = parsed_param.lower()
|
|
@@ -451,7 +465,7 @@ class EmbedBlock(BlockABC):
|
|
|
451
465
|
if lowercase_param.startswith("{") and lowercase_param.endswith("}"):
|
|
452
466
|
embed = _json_to_embed(parsed_param)
|
|
453
467
|
elif lowercase_param in self.ATTRIBUTE_HANDLERS:
|
|
454
|
-
embed = ctx.response.actions.get(
|
|
468
|
+
embed = ctx.response.actions.get(EmbedBlock.ACTIONS_KEY, Embed())
|
|
455
469
|
embed = self._update_embed(
|
|
456
470
|
ctx,
|
|
457
471
|
embed,
|
{ya_tagscript-1.7.0 → ya_tagscript-1.7.2}/src/ya_tagscript/blocks/limiters/blacklist_block.py
RENAMED
|
@@ -50,6 +50,9 @@ class BlacklistBlock(BlockABC):
|
|
|
50
50
|
- ``"items"``: A list of strings representing channels or roles
|
|
51
51
|
- ``"response"``: A response :class:`str` OR :data:`None` if no ``response``
|
|
52
52
|
was provided to the block
|
|
53
|
+
- The key is available via the
|
|
54
|
+
:attr:`BlacklistBlock.ACTIONS_KEY
|
|
55
|
+
<ya_tagscript.blocks.BlacklistBlock.ACTIONS_KEY>` class attribute
|
|
53
56
|
|
|
54
57
|
Note:
|
|
55
58
|
This block only adds the blacklist information in the ``blacklist`` actions
|
|
@@ -59,6 +62,14 @@ class BlacklistBlock(BlockABC):
|
|
|
59
62
|
tag execution is blacklisted somehow.
|
|
60
63
|
"""
|
|
61
64
|
|
|
65
|
+
ACTIONS_KEY = "blacklist"
|
|
66
|
+
"""
|
|
67
|
+
The key used to store data in the
|
|
68
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
69
|
+
|
|
70
|
+
.. versionadded:: 1.7.1
|
|
71
|
+
"""
|
|
72
|
+
|
|
62
73
|
_VALID_NAMES = {"blacklist"}
|
|
63
74
|
|
|
64
75
|
requires_nonempty_parameter = True
|
|
@@ -67,7 +78,7 @@ class BlacklistBlock(BlockABC):
|
|
|
67
78
|
param = ctx.node.parameter
|
|
68
79
|
if param is None or param.strip() == "":
|
|
69
80
|
return None
|
|
70
|
-
elif ctx.response.actions.get(
|
|
81
|
+
elif ctx.response.actions.get(BlacklistBlock.ACTIONS_KEY) is not None:
|
|
71
82
|
return None
|
|
72
83
|
|
|
73
84
|
parsed_param = ctx.interpret_segment(param)
|
|
@@ -76,7 +87,7 @@ class BlacklistBlock(BlockABC):
|
|
|
76
87
|
response = None
|
|
77
88
|
if ctx.node.payload is not None:
|
|
78
89
|
response = ctx.interpret_segment(ctx.node.payload)
|
|
79
|
-
ctx.response.actions[
|
|
90
|
+
ctx.response.actions[BlacklistBlock.ACTIONS_KEY] = {
|
|
80
91
|
"items": [b.strip() for b in split],
|
|
81
92
|
"response": response,
|
|
82
93
|
}
|
|
@@ -52,6 +52,9 @@ class RequireBlock(BlockABC):
|
|
|
52
52
|
- ``"items"``: A list of strings representing channels or roles
|
|
53
53
|
- ``"response"``: A response :class:`str` OR :data:`None` if no ``response``
|
|
54
54
|
was provided to the block
|
|
55
|
+
- The key is available via the
|
|
56
|
+
:attr:`RequireBlock.ACTIONS_KEY
|
|
57
|
+
<ya_tagscript.blocks.RequireBlock.ACTIONS_KEY>` class attribute
|
|
55
58
|
|
|
56
59
|
Note:
|
|
57
60
|
This block only adds the requirement information in the ``requires`` actions
|
|
@@ -61,6 +64,14 @@ class RequireBlock(BlockABC):
|
|
|
61
64
|
the tag execution does not meet the requirements and is therefore blocked.
|
|
62
65
|
"""
|
|
63
66
|
|
|
67
|
+
ACTIONS_KEY = "requires"
|
|
68
|
+
"""
|
|
69
|
+
The key used to store data in the
|
|
70
|
+
:attr:`Response.actions <ya_tagscript.interpreter.Response.actions>`.
|
|
71
|
+
|
|
72
|
+
.. versionadded:: 1.7.1
|
|
73
|
+
"""
|
|
74
|
+
|
|
64
75
|
_VALID_NAMES = {"require", "whitelist"}
|
|
65
76
|
|
|
66
77
|
requires_nonempty_parameter = True
|
|
@@ -69,7 +80,7 @@ class RequireBlock(BlockABC):
|
|
|
69
80
|
param = ctx.node.parameter
|
|
70
81
|
if param is None or param.strip() == "":
|
|
71
82
|
return None
|
|
72
|
-
elif ctx.response.actions.get(
|
|
83
|
+
elif ctx.response.actions.get(RequireBlock.ACTIONS_KEY) is not None:
|
|
73
84
|
return None
|
|
74
85
|
|
|
75
86
|
parsed_param = ctx.interpret_segment(param)
|
|
@@ -78,7 +89,7 @@ class RequireBlock(BlockABC):
|
|
|
78
89
|
response = None
|
|
79
90
|
if ctx.node.payload is not None:
|
|
80
91
|
response = ctx.interpret_segment(ctx.node.payload)
|
|
81
|
-
ctx.response.actions[
|
|
92
|
+
ctx.response.actions[RequireBlock.ACTIONS_KEY] = {
|
|
82
93
|
"items": [r.strip() for r in split],
|
|
83
94
|
"response": response,
|
|
84
95
|
}
|