From 8f9bb6b4f85b7c5287a6f149b07f4dbe372ef500 Mon Sep 17 00:00:00 2001 From: Supositware Date: Thu, 24 Nov 2022 21:38:34 +0100 Subject: [PATCH] Limit to 5 ytp per day --- commands/utility/addytp.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/utility/addytp.js b/commands/utility/addytp.js index bd75c01..0c384a8 100644 --- a/commands/utility/addytp.js +++ b/commands/utility/addytp.js @@ -8,12 +8,14 @@ const { ytpChannelId } = process.env; export default { data: new SlashCommandBuilder() .setName('addytp') - .setDescription('Add a video to the pool of ytps') + .setDescription('Add a video to the pool of ytps. You can add 5 per day.') .addStringOption(option => option.setName('url') .setDescription('URL of the video you want to add.') .setRequired(true)), category: 'utility', + ratelimit: 5, + cooldown: 3600, async execute(interaction, args) { const url = args.url; if (!await utils.stringIsAValidurl(url)) {