Maybe fix that
This commit is contained in:
parent
2cc34f472f
commit
c588cca05d
|
@ -9,7 +9,7 @@ const lookupBanByID = async (client, interaction, options) => {
|
||||||
const connection = await pool.getConnection()
|
const connection = await pool.getConnection()
|
||||||
try {
|
try {
|
||||||
const row = await connection.query('SELECT * FROM bans WHERE id = ?', [banID])
|
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 })
|
await interaction.reply({ content: `Ban with ID ${banID} not found`, ephemeral: true })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue