Send me a message when a viewer joins the channel

Just because data is publicly accessible doesn’t mean you have any right to do with it as you please. It’s possible for a username to be classed as an ‘Online Identifier’, and so under the GDPR how you handle such data has to comply with those laws.

Also, Twitch itself has legal agreements including the Developer Agreement which lays out certain requirements when using the Twitch API. Of particular note (but not the only relevant setion) is XI.B Privacy Obligations.