Go to your User Settings (the little gear icon at the bottom left).
Navigate to the Advanced tab.
Toggle on Developer Mode.
That's it! Now just go back to your server, right-click on the name of the channel you want, and you'll see a shiny new option: Copy Channel ID. Click it.