I know your still working on the rewrite but here is some input on something I'll probably miss when using a QWERTY keyboard.
When I run this code:
tell script "Slack"
send message "this is an automated message" in channel "#testjeroen"
clear status
set as away
end tell
I get this on Slack:
this is an automated message
=Clear your status
=Set yourself as active
Screenshot:

When I switch my keyboard layout to QWERTY it works better BUT the messages are not send (enter).
Example screenshot:
