This commit is contained in:
Ashley Graves 2024-10-10 18:13:56 +02:00
parent aca0882b21
commit 925bb43b2c

View file

@ -76,7 +76,7 @@ module.exports = {
const value = interaction.options.getFocused() ?? "";
const command = interaction.options.getSubcommand(true);
if (command == "remove") {
const blacklist = ((await knex.select("blacklist").from("blacklists").where("user", interaction.user.id).first()).blacklist ?? "").trim().split(" ");
const blacklist = ((await knex.select("blacklist").from("blacklists").where("user", interaction.user.id).first()) ?? { blacklist: '' }).blacklist.trim().split(" ");
const choices = [];
for (const tag of blacklist) {
if (value == "" || tag.startsWith(value.trim()))