Firebot
Firebot copied to clipboard
feat: Add base64 encode and decode variables (#3186)
Description of the Change
This PR adds two new base64 related variables: $base64Encode and $base64Decode, and two new variables that alias those: $btoa and $atob respectively.
Note: The implementation here should work properly with emojis or other multi-byte Unicode characters as well (tested this).
Note: The original issue (which I wrote) had these as base64encode and base64decode, but looking at the other variables in that directory, they seem to use camelCase, so I did too.
Applicable Issues
Fixes https://github.com/crowbartools/Firebot/issues/3186
Testing
Tested this in a chat feed alert. See screenshot.
Screenshots
This is in the log:
[2025-06-19 06:32:11.0701] - error: Failed to decode base64 string: !