On join denied
You can read the reason your join request was denied with the Deny reason (for on […] denied) expression.
The denied channel's name can be read using the Selected channel > Name expression…
…but note that the channel you tried to join is not properly selected, as it's not a joined channel, so you won't be able to read the channels' other details, like the peer details.
If you select a channel manually during the Join Denied event, you will not be able to read the denied channel name from the Selected channel > Name expression anymore, so copy it out first if necessary.
Normally, attempting to join will cause the same denial with the same deny reason, so you should not program your client to attempt to join again if denied.