Hey guys. So I'm building a persona ai chatbot tha...
# 💻developers
b
Hey guys. So I'm building a persona ai chatbot that pulls data from stack ai. The aim of the bot is to sell stuff to the user. Once the user sends a certain number of messages (in this case >2l the bit should trigger an ad. Once the ad is triggered it should set the counter to 0 and cycle back to the normal conversation until the user sends >2 messages again in which it should trigger a second ad. Once the second ad is triggered it resets a counter. If the user sends >5 messages it should trigger a credits message asking the user to pay. I have a screenshot if what the bot SHOULD look like vs what mines looks like. When my bot gets to sending the first ad, it displays an error. Any help would be much appreciated. Thank you 🙏