Releases: phenom4n4n/TagScript
Releases · phenom4n4n/TagScript
v2.6.5
v2.6.4
TagScriptEngine v2.6.4
- adds support for
discord.pyversion 2.2.3
v2.6.3
TagScriptEngine v2.6.2
- adds
sqrtto the{math}block - adds
joinstamp, the UTC timestamp of when a member joined, to theMemberAdapter
v2.6.2
TagScriptEngine v2.6.2
Just some bug fixes and QoL improvements.
- fixed a bug with
.parameterparsing - added
roleidswhich returns a space separated list of a member's role ids - aliased
{server(members)}to{server(member_count)} - added an alternative to the
strfblock{unix}, which returns the unix timestamp - added a new embed method:
{embed(field):<name>|<value>|[inline]}to add fields to embeds without JSON
v2.6.1
TagScriptEngine v2.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
TrueorFalsein expressions. For example,{if(True):a|b}will returna, but if the parameter was replaced withFalse, it would returnb.
v2.6
Meta
- Installation now uses
setuptoolsand properly installs dependencies such asdiscord.pyandPyParsing. - TagScript has been uploaded to PyPI, which is the preferred installation method.
- The package has been renamed from
TagScriptEnginetoTagScript.
Interpreter
Interpreter.processhas a newdot_parameterkey 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.processnow accepts arbitrary kwargs that are passed to the response asResponse.extra_kwargs. An example use case of these is the new Cooldown block, which determines how to store cooldown mappings by checking if acooldown_keywas passed. (Interpreter.process(..., cooldown_key=<tag_ID>))- A new
AsyncInterpreterclass has been added, which allows for blocks to define asynchronous methods. Synchronous blocks are still supported.
Block
Blocksubclasses now have anACCEPTED_NAMESclass variable, which can be used to define names for the block rather than overridingBlock.will_accept.verb_required_blockhas 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
MemberAdapternow has atop_roleattribute.