diff --git a/src/commands/fact.ts b/src/commands/fact.ts index 44a7da8..033c3f1 100644 --- a/src/commands/fact.ts +++ b/src/commands/fact.ts @@ -14,7 +14,8 @@ export default { bot.endConection(); let fact = results[0]; - await bot.getConnection().promise().execute('UPDATE facts SET counter = counter + 1 WHERE id = ?', [fact.id]) + await bot.getConnection().promise().execute('UPDATE facts SET counter = counter + 1 WHERE id = ?', [fact.id]); + bot.endConection(); console.log('Sent beaver fact with id: ' + fact.id); return await interaction.reply({