I'd use a simple polling mechanism in the frontend that calls a separate API endpoint on an interval and that retrieves the latest keywords pushed, or web sockets if you want something fancier that doesn't require a timed polling. If you need to run this for multiple users independently then it might get a bit tricky, but you could use something like this to pass a unique user ID from your frontend to the bot, and pass that user ID in the bot back to your API so that the polling/websocket only receives keywords pushed by the current user:
https://discord.com/channels/1108396290624213082/1133770315873398794/1134570342229233785