Skip to content

Releases: phenom4n4n/TagScript

v2.6.4

09 May 05:16
942bc24
Compare
Choose a tag to compare

TagScriptEngine v2.6.4

  • adds support for discord.py version 2.2.3

v2.6.3

11 Jan 09:05
625fb20
Compare
Choose a tag to compare

TagScriptEngine v2.6.2

  • adds sqrt to the {math} block
  • adds joinstamp, the UTC timestamp of when a member joined, to the MemberAdapter

v2.6.2

31 Aug 07:28
9622854
Compare
Choose a tag to compare

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

14 Jul 09:43
Compare
Choose a tag to compare

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 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.

v2.6

14 Jul 04:22
fcbb376
Compare
Choose a tag to compare

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.