The whole thing is run through Discord bot, which is unfortunate but I guess it allowed them to get half their infrastructure for free? You interact with the bot through Discord commands and it generates and returns the photos to you.
It is kind of annoying but lurking and seeing other people's pictures is nearly as enjoyable as making your own. Plus you can use the bot in your dms if you'd like to keep them private.
afaik - the API is exposed as a discord bot, that's how they are managing / restricting access
In a way it makes sense. Discord provides the UI and authentication infrastructure, so the Midjourney devs only have to worry about the actual functionality.