In slack if you want to announce with a bot message you need to use <!channel>. When you include this in the message but call getEncodedMessage it does not work. However if you don't use the encoded message it does work.
see https://get.slack.help/hc/en-us/articles/202009646-Make-an-announcement. Scroll down to section labeled bot messages.