So my main bot pulls down redemption codes from a google sheet, but it has to each use. Is there any way to save the codes inside the bot, like as some sort of universal array and then just increment the pointer when one gets used and on the last value in the array, then it could go to the sheet and grab the next 100 or something codes? This way it only has to query the sheet once every 100 uses instead of every use. The problem I ran into is when a lot of instances are querying at once, it crashes the bot.
Just for further info, the bots are querying the same sheet then putting the used codes back in to avoid duplicates. When the sheet makes new codes, it checks them against the used codes so it doesn't create duplicates. This takes a bit of time for each query and I set a cell in the sheet to busy with the bot for each bot to take and put the code one by one so that the codes don't get double pulled.
So I guess just wondering if there are universal variables or data storage in the bot itself.
If not, I am open to ideas for a more robust solution where all bots can access the same list of available redemption codes and expire them as needed.... Ideas?