Releases: phenom4n4n/TagScript
Releases · phenom4n4n/TagScript
v2.6.4
v2.6.3
TagScriptEngine v2.6.2
- adds
sqrt
to 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
.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
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
True
orFalse
in 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
setuptools
and properly installs dependencies such asdiscord.py
andPyParsing
. - TagScript has been uploaded to PyPI, which is the preferred installation method.
- The package has been renamed from
TagScriptEngine
toTagScript
.
Interpreter
Interpreter.process
has a newdot_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 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_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 anACCEPTED_NAMES
class variable, which can be used to define names for the block rather than overridingBlock.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 atop_role
attribute.