aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands/quote.js
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/commands/quote.js')
-rw-r--r--bot/src/commands/quote.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/src/commands/quote.js b/bot/src/commands/quote.js
index 3ae1de3..5e5ae5b 100644
--- a/bot/src/commands/quote.js
+++ b/bot/src/commands/quote.js
@@ -110,6 +110,8 @@ export default {
if (!quoteID) {
const quoteList = await quoteDB.findAll({ attributes: ['id'] });
const random = crypto.getRandomValues(new Uint32Array(1));
+
+ if (quoteList.length === 0) return await interaction.reply({ content: 'No quotes are currently in the database. You can add one by doing `/quote add`.', flags: MessageFlags.Ephemeral });
quoteID = quoteList[random[0] % quoteList.length].id;
}