Reputation: 83
I'm trying a new command, but for some reason I'm getting an error. TypeError: db.startsWith is not a function
. Please check the code provided below. Thank you! :) Version: 7.1.1
if(args[0] == 'car') {
let cars = db.startsWith(`car_${message.guild.id}`, { sort: '.data'})
let content = "";
for (let i = 0; i < cars.length; i++) {
let user = client.users.get(cars[i].ID.split('_')[2]).username
content += `${i+1}. ${user} ~ ${cars[i].data}\n`
}
Upvotes: 0
Views: 182
Reputation: 117
.startsWith
was removed. Alternative version is db.all().filter(a => a.ID.startsWith(""))
Upvotes: 1