Commit 8e20dcd2 authored by nanahira's avatar nanahira

fix missing free

parent 77f7c1c9
...@@ -46,6 +46,7 @@ export default class YGOCardPlugin ...@@ -46,6 +46,7 @@ export default class YGOCardPlugin
while (statement.step()) { while (statement.step()) {
results.push(statement.getAsObject()); results.push(statement.getAsObject());
} }
statement.free();
return results.map((obj) => plainToInstance(YGOProCard, obj)); return results.map((obj) => plainToInstance(YGOProCard, obj));
} }
private queryInAllDBs(value: string, matchCount?: number) { private queryInAllDBs(value: string, matchCount?: number) {
...@@ -111,17 +112,17 @@ export default class YGOCardPlugin ...@@ -111,17 +112,17 @@ export default class YGOCardPlugin
const itemLines = cards.map((c, i) => `${i + 1}. ${c.getIdAndName()}`); const itemLines = cards.map((c, i) => `${i + 1}. ${c.getIdAndName()}`);
const borderLength = Math.max(...itemLines.map((l) => l.length)) + 1; const borderLength = Math.max(...itemLines.map((l) => l.length)) + 1;
await session.send( await session.send(
session.text('.select-prefix-part1') + session.text('.select-prefix-part1') +
query + query +
session.text('.select-prefix-part2') + session.text('.select-prefix-part2') +
'\n' + '\n' +
_.repeat('-', borderLength) + _.repeat('-', borderLength) +
'\n' + '\n' +
itemLines.join('\n') + itemLines.join('\n') +
'\n' + '\n' +
_.repeat('-', borderLength) + _.repeat('-', borderLength) +
'\n' + '\n' +
session.text('.select-suffix') session.text('.select-suffix'),
); );
const reply = await session.prompt(); const reply = await session.prompt();
if (!reply) { 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