Commit 8e20dcd2 authored by nanahira's avatar nanahira

fix missing free

parent 77f7c1c9
......@@ -46,6 +46,7 @@ export default class YGOCardPlugin
while (statement.step()) {
results.push(statement.getAsObject());
}
statement.free();
return results.map((obj) => plainToInstance(YGOProCard, obj));
}
private queryInAllDBs(value: string, matchCount?: number) {
......@@ -111,17 +112,17 @@ export default class YGOCardPlugin
const itemLines = cards.map((c, i) => `${i + 1}. ${c.getIdAndName()}`);
const borderLength = Math.max(...itemLines.map((l) => l.length)) + 1;
await session.send(
session.text('.select-prefix-part1') +
query +
session.text('.select-prefix-part2') +
'\n' +
_.repeat('-', borderLength) +
'\n' +
itemLines.join('\n') +
'\n' +
_.repeat('-', borderLength) +
'\n' +
session.text('.select-suffix')
session.text('.select-prefix-part1') +
query +
session.text('.select-prefix-part2') +
'\n' +
_.repeat('-', borderLength) +
'\n' +
itemLines.join('\n') +
'\n' +
_.repeat('-', borderLength) +
'\n' +
session.text('.select-suffix'),
);
const reply = await session.prompt();
if (!reply) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment