View: Allow searching cards by character name
This commit is contained in:
@@ -96,6 +96,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (choices.length > 0) {
|
if (choices.length > 0) {
|
||||||
|
choices = choices.splice(0,10);
|
||||||
console.log(choices);
|
console.log(choices);
|
||||||
await interaction.respond(choices);
|
await interaction.respond(choices);
|
||||||
}
|
}
|
||||||
@@ -105,9 +106,10 @@ module.exports = {
|
|||||||
let choices = [];
|
let choices = [];
|
||||||
let condition = {
|
let condition = {
|
||||||
where: {
|
where: {
|
||||||
identifier: {
|
[Sequelize.Op.or]: [
|
||||||
[Sequelize.Op.like]: `%${focusedOption.value}%`
|
{identifier: { [Sequelize.Op.like]: `%${focusedOption.value}%` }},
|
||||||
},
|
{'$Character.name$': { [Sequelize.Op.like]: `%${focusedOption.value}%` }}
|
||||||
|
],
|
||||||
burned: false
|
burned: false
|
||||||
},
|
},
|
||||||
include: [{ model: Character }, { model: User }],
|
include: [{ model: Character }, { model: User }],
|
||||||
|
|||||||
Reference in New Issue
Block a user