@getsolara/solara.js
Version:
A lightweight and modular Discord bot framework built on discord.js v14, with truly optional feature packages.
1 lines • 384 B
JavaScript
module.exports = { name: "$sleep", description: "Alias for $wait.", takesBrackets: true, execute: async (context, args) => { if (!args[0]) return "[Error: $sleep requires milliseconds]"; const ms = parseInt(args[0], 10); if (isNaN(ms) || ms < 0 || ms > 3600000) return "[Error: Invalid milliseconds (0-3600000)]"; await new Promise(resolve => setTimeout(resolve, ms)); return ""; } };