This was posted primarily to satisfy the requirement of bots hosted on Toolforge being open-source, per the license, you are permitted to use it yourself, however it is recommended to just use the main bot so as to reap the rewards of all the language support, and allowing for the ~6000+ members that have already authenticated to my database to automatically be accepted.
Else, you will need to generate an OAuth grant for enwiki/Miraheze, put the enwiki tokens into ontok, onsec, contok & consec, then Miraheze tokens into montok, monsec, m2ntok & m2nsec as well as change the OAuth URI redirects to your own landing page.
TL;DR, a lot of this is hardcoded, but in the event of my death, at least it's not a complete recreation. For full usage documentation, go to https://meta.wikimedia.org/wiki/Discord#WikiAuthBot