It's pretty common to do this for Patreon rewards so it's not really much different to how you'd approach that except instead of connecting to their API it does it using the records on chain.
You'd run a bot or similar on Discord that would grant you a role to access the channel and it would use your wallet to verify your identity (ala public key crypto) and the ownership of the NFT by your wallet to verify the permission to join.
Most of the time you're a centralized thing anyway in this case so the NFTs don't really add much (unless you want users to be able to trade access) even if you wanted to take payment via crypto-currencies.