https://discord.gg/botpress logo
Usage Abuse
# 🤝help
w
Hello guys! Is there any way I can prevent abuse of my chatbot usage? I mean things like setting usage limits per user or blocking access after a certain threshold. I'm looking for any method to protect my AI usage and spending from malicious or unnecessary overuse. Thanks!
p
You can keep a user table with a message sent count and validate the count before sending a reply. Or you can count the messages per conversation as there is a variable that hold each message in a n array. Hope this helps!
s
Hello so I'm lookng into this as well. I wrote an execute code card that limits use but the user can open the bot in incognito and just keep refreshing. Is there a built in fix in Botpress or does this require advance code knowledge?
p
There is no built-in solution as this is an edge case. If the user method doesn't work for you, go with the total conversation message count approach. Cheers!