Never gibe perms to begin with. Anything the chatbot has access to fuckup it eventually will. So the problem is inherently flawed, but.
Use db permissions with read only, and possibly only a set of prepared statements. Give it a useraccount with read-only acces maybe