How can I use multiple prefixes for :ListKeysAsync()?

I’m using prefixes to store different types of logs in a datastore. It’s structured as such:

logs datastore
kick/log1
kick/log2
kick/log3
ban/log1
ban/log2
...

I want to be able to filter for the type of logs for easier searchability. I can grab all logs regardless of scope if I like prefix blank in :ListKeysAsync(), and I can specify one prefix. Is there a way I can specify multiple prefixes ofr :ListKeysAsync()? For example, list all keys with the prefix of kick and ban.

I can just get them seperately and then go through them seperately but I’d rather a cleaner approach.

4 Likes

Sadly, you can’t give multiple prefixes to :ListKeysAsync() in one go. Roblox only lets you filter with one prefix at a time. What you have right now is your best bet.