I'm trying to make a clearinventory command so it deletes a players inventory via mention or if there is no mention it deletes your own inventory but I keep getting an error called RangeError: Too many parameter values were provided this is the code :
const db = require('quick.db');
const Discord = require('discord.js');
module.exports = {
name: "clearinventory",
descrition: "clear a players inventory",
async run(client, message, run) {
let target = message.mentions.users.first() || message.author;
let items = await db.fetch(target.id, {
items: []
});
if (!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send('You can\'t use that!')
db.delete(items);
message.channel.send(`${target}\'s inventory was successfully cleared!`)
}
}
I've tried to specify the items in the variable items and I also tried to specify items in the db.delete(items, 'car')
but that didn't work