Note: As of 2021-10-19, this script is no longer functional, as Discussion tab data was made inaccessible from the InnerTube API depended on by these scripts.
Until some point between 2021-10-20 and 2021-11-09, YouTube's public data API supported retrieving Discussions on all channels including on channels with hidden Discussion tabs and on channels with Discussion tabs that have been replaced by Community Tabs. This endpoint now returns a blank response.
Simply run python3 discussions.py <UC channel id>