I quickly threw together a repository. But please keep in mind that I made some changes to it, to be able to publish it, and it is a combination of 3 different custom solutions that I made for myself. I have not tested it, so use at your own risk :D But if something is broken, just tell me and I try to fix it.
Discord recently added “user installable apps”. You can configure it though the installation context. I have only implemented the usual server installable apps so far, so I don’t know what the apps in the new context are able to do. But it might be worth a look :)