Fix log create disable

This commit is contained in:
Christopher Cookman 2024-06-24 16:21:37 -06:00
parent 6d646394fc
commit 9685d75ad4
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -251,7 +251,9 @@ client.on('interactionCreate', async interaction => {
});
return;
}
const log_create = interaction.options.getBoolean('log_create') || true;
log_create = interaction.options.getBoolean('log_create');
if (log_create == null) log_create = true;
console.log(log_create)
const channel = interaction.options.getChannel('channel').id;
db.run(`INSERT OR REPLACE INTO guilds (id, channel, log_create) VALUES (?, ?, ?)`, [interaction.guild.id.toString(), channel.toString(), log_create], (err) => {
if (err) {