@getsolara/solara.js
Version:
A lightweight and modular Discord bot framework built on discord.js v14, with truly optional feature packages.
9 lines • 367 B
JavaScript
const fs = require('fs');
module.exports = {
name: "$fileExists", description: "Checks if a file or directory exists. Args: filePath", takesBrackets: true,
execute: async (context, args) => {
if (!args[0]) return "[Error: Requires filePath]";
try { return fs.existsSync(args[0]).toString(); }
catch { return "false"; }
}
};