Maybe fix that

This commit is contained in:
Christopher Cookman 2024-12-23 08:02:16 -07:00
parent 2cc34f472f
commit c588cca05d

View file

@ -9,7 +9,7 @@ const lookupBanByID = async (client, interaction, options) => {
const connection = await pool.getConnection()
try {
const row = await connection.query('SELECT * FROM bans WHERE id = ?', [banID])
if (!row) {
if (!row || row?.length === 0) {
await interaction.reply({ content: `Ban with ID ${banID} not found`, ephemeral: true })
return
}