Tagscript

Latest version: v2.6.3

Safety actively analyzes 626604 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.6.3

2.6.2

Just some bug fixes and QoL improvements.

- fixed a bug with `.parameter` parsing
- added `roleids` which returns a space separated list of a member's role ids
- aliased `{server(members)}` to `{server(member_count)}`
- added an alternative to the `strf` block `{unix}`, which returns the unix timestamp
- added a new embed method: `{embed(field):<name>|<value>|[inline]}` to add fields to embeds without JSON

2.6.1

Quick minor release, huh?

- fixed an issue with the library not installing properly from PyPI
- forgot to mention this in the last release, but blocks with conditionals now support `True` or `False` in expressions. For example, `{if(True):a|b}` will return `a`, but if the parameter was replaced with `False`, it would return `b`.

2.6

**Meta**
- Installation now uses `setuptools` and properly installs dependencies such as `discord.py` and `PyParsing`.
- TagScript has been uploaded to PyPI, which is the preferred installation method.
- The package has been renamed from `TagScriptEngine` to `TagScript`.

**Interpreter**
- `Interpreter.process` has a new `dot_parameter` key word argument. Passing this as true will change block parsing to use `.<parameter>` for the parameter rather than `(<parameter>)`.

dot_parameter=False
{declaration(parameter):payload}
dot_parameter=True
declaration.parameter:payload}

- `Interpreter.process` now accepts arbitrary kwargs that are passed to the response as `Response.extra_kwargs`. An example use case of these is the new Cooldown block, which determines how to store cooldown mappings by checking if a `cooldown_key` was passed. (`Interpreter.process(..., cooldown_key=<tag_ID>)`)
- A new `AsyncInterpreter` class has been added, which allows for blocks to define asynchronous methods. Synchronous blocks are still supported.

**Block**
- `Block` subclasses now have an `ACCEPTED_NAMES` class variable, which can be used to define names for the block rather than overriding `Block.will_accept`.
- `verb_required_block` has been added as a util that returns a block that requires a parameter or payload to be passed.
- A new cooldown block has been added. See the docs on its usage.
- The `MemberAdapter` now has a `top_role` attribute.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.