Piecewise 21.12.0 Release Notes – Slightly Late Edition


Hi everyone! November has been a very busy month for me – I've been working on several new, big-ish features and tons of bug-fixes and usability improvements!

Before I start outlining what's new in Piecewise this month, I'd like to take the time to thank everyone who has supported Piecewise so far. I understand that the editor is still rough around the edges, and the documentation is a little sparse right now. I hope that – if it isn't already – Piecewise will grow and change into something you'll be able to use to learn programming or create bots rapidly.

Now then! Here's what's new in Piecewise 21.12:

Editor highlights

RSS feeds DLC

Piecewise's first DLC releases today! The RSS feed extension blocks allow you to monitor RSS feeds – common on news sites, blogs, or podcast hosts – for new items. You might use this functionality to, for example, create auto-posting news bots, or notify you about new podcast episodes.

RSS feeds

If you own Piecewise, send an email to contact[at]piecewise[dot]im with your Steam or itch.io profile URL and let me know how you plan to use Piecewise and this DLC to receive a free copy.* Otherwise, you can buy it individually on Steam or itch.io.

*Promotion ends December 14, 10am Pacific or while supplies last.

Steam Workshop

Steam Workshop support is now available in Piecewise, albeit in an unfinished and rough state. Upload your own or consume community-created addon blocks, templates, or custom styles to and from the Workshop. For more information on the Steam Workshop, see this page on doc.piecewise.im.

Share Blocks Online

Sharing blocks is now easier using the “Share Blocks Online” function. Simply right click the blocks you want to share, then select “Share Blocks Online” to get a piece.ws link that will automatically open the requested block set within Piecewise.

Paginators

When requesting a lot of something (e.g. messages in a channel, members of a Discord server, statuses a user has written...) data is usually drip-fed across multiple requests instead of returned all at once. The “paginator” model, new in Piecewise, is designed to make it very easy to work with these types of structures. Simply use the “paginator” like you would any other loop.

Paginators

To learn more about paginators, including their benefits and pitfalls, check out this page on doc.piecewise.im.

Welcome screen

Along with some slight visual tweaks, the welcome screen now displays the templates you have installed and the platforms they work with, so you can get started more quickly.

Templates

Mastodon

Polls

Piecewise now allows you to create, vote on, and view the results of polls using their associated blocks under Mastodon –> Polls.

Emoji reactions

If connected to a Pleroma server, Piecewise now allow you to determine the emoji reactions on a post using the emoji reactions to status block.

Other changes

  • On Pleroma, Piecewise now uses a remote subscribe strategy to search for and discover statuses
  • Bots will now ignore their own statuses in feeds, unless configured otherwise
  • Bots will now automatically add mentions consistent with the thread when replying to a status
  • Determining the max length of statuses of an instance is now possible using the instance maximum status length block
  • On Pleroma, you can now specify the format of your post (i.e. Markdown, BBcode, etc.)
  • liblazurite-mastodon is now part of Piecewise itself – you should no longer need to copy this file for bots exported after this update
  • Added me, which represents the user the bot is logged in as
  • Added status <- post status... to immediately get the status after it is posted

Discord

Server management

You can now determine the owner of a server, the approximate member count of a server, leave servers, and determine what servers the bot is in using blocks in the Discord –> Servers category.

Mentions

Determine who or what channel a message mentions, and if a message mentions you, using new blocks in the Discord –> Messages category.

Other changes

  • Added the ability for chat command arguments to be coerced into users and channels
  • Added the ability to find messages, if you have the message ID and the channel they are inside
  • Added paginator for channel messages
  • Added paginator for server members
  • Fixed sending messages before log-on causing an error. Messages sent before log-on will now be queued for after log-on, instead.
  • Fixed deleting a message that does not exist causing a crash – will now print a warning instead.
  • Fixed the (avatar) of user block returning a hash instead of an absolute URL, to match up with expectations of what this actually does

Breaking changes

While I try to keep compatibility with previous releases high, there are some instances where it's not feasible for me to do so. Here's a list of all of the things to watch out for when opening new projects in Piecewise 21.12:

  • Mastodon: bots will now ignore their own statuses in feeds, unless configured otherwise.
  • Mastodon: bots will now automatically add mentions consistent with the thread when replying to a status, unless configured otherwise.
  • Discord: sending messages before log-on will no longer throw an error. Messages sent before log-on will now be queued until after log-on.
  • Discord: deleting a message that does not exist will now emit a warning instead of crashing the bot.
  • Discord: (avatar) of user now returns an absolute URL to an avatar, instead of a plain hash.
  • Discord: the “embed” block now forces text blocks for nearly all connections.
  • Piecewise now uses a different method to change HTML to text. For most this is a seamless change, but output text will now be formatted to look more like the input HTML, and links will be annotated.
  • Piecewise now stores bot-specific data in a different location.
    • On Windows, the new location is C:\Users\[You]\AppData\Roaming\Piecewise\.lazurite.
    • On macOS, the new location is /Users/[you]/Application Support/Piecewise/.lazurite
    • On Linux, the new location is ~/.lazurite.
  • The “prompt for text” block is no longer available (but never worked anyway).

Miscellaneous additions and fixes

  • Piecewise now runs natively on Apple silicon when running from Steam. Non-Steam builds always defaulted to native support.
  • Added text (text) [starts|ends] with (prefix or suffix)
  • Added parse text (text) as [json|xml]
  • Added warning when using multiple of a configuration block
  • Fixed styling of input dialogs so they all at least match. This is a rough edge and a work in progress.
  • Added workspace renaming
  • Added next workspace, previous workspace, clear workspace keyboard shortcuts
  • Reworked help menu – now contains various other documentation and help resources
  • Added update checking/notifications
  • Reworked bot runtime – everything now runs in a Worker, making starting/stopping significantly more responsive
  • Added parse date from text (text), (property) of date (date), add (time) to date (date)
  • Added stop
  • Fixed the require property not working properly for extension blocks
  • Upgrade Electron to 16.0.x
  • Upgrade Discord.js to 13.3.1

Upcoming changes and looking ahead

I don't really have a lot planned this month – with the holidays getting in the way, I don't imagine I'll be nearly as productive. I do plan to work on at least the following, though:

  • Add system blocks – list files, execute commands, get environment variables, etc.
  • Add blocks for Discord right-click/context menu commands
  • Smooth out Steam Workshop for a “full” release next month

I hope everyone has a safe and restful holiday, and thanks again for your support! The next release is tentatively scheduled for January 4th at 10am Pacific.

Files

Piecewise 21.12 ("Holy Flag", Windows x64) 102 MB
Version 21.12.9+holy-flag#791b3b Jan 16, 2022
Piecewise 21.12 ("Holy Flag", macOS Universal) 172 MB
Version 21.12.9+holy-flag#791b3b Jan 16, 2022
Piecewise 21.12 ("Holy Flag", Linux amd64) 112 MB
Version 21.12.9+holy-flag#791b3b Jan 16, 2022
Piecewise 21.12 ("Holy Flag", Linux arm64/Raspberry Pi) 119 MB
Version 21.12.9+holy-flag#791b3b Jan 16, 2022
Piecewise 21.12 ("Holy Flag", Windows x64) 102 MB
Version 21.12.0+holy-flag#23341c Dec 07, 2021
Piecewise 21.12 ("Holy Flag", macOS Universal) 172 MB
Version 21.12.0+holy-flag#23341c Dec 07, 2021
Piecewise 21.12 ("Holy Flag", Linux amd64) 112 MB
Version 21.12.0+holy-flag#23341c Dec 07, 2021
Piecewise 21.12 ("Holy Flag", Linux arm64/Raspberry Pi) 119 MB
Version 21.12.0+holy-flag#23341c Dec 07, 2021

Get Piecewise

Buy Now$15.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.