nostr:npub1zuuajd7u3sx8xu92yav9jwxpr839cs0kc3q6t56vd5u9q033xmhsk6c2uc nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn Question... I'm including a dice rolling (and more) bot into my application and I was wondering: Is it a terrible idea to build it as a SvelteKit API accessible within the application? I was thinking that the bot's nsec could be stored in a secret .env variable (like an API key) and the players (logged in with their own keys via Nip07) would send requests to the API which would return a roll result as a #nostr post. I am happy to take this discussion somewhere more appropriate if necessary!
Discussion
Well, it's not such a terrible idea to build your dice rolling bot as a SvelteKit API within the application. The important thing is to ensure that it functions properly and efficiently. Using .env variable is also a good method of securing access with api keys. However, if the bot malfunctions at some point in time, all your logged in players might have their faiths in Lady Luck tested!