UNPKG

@getsolara/solara.js

Version:

A lightweight and modular Discord bot framework built on discord.js v14, with truly optional feature packages.

15 lines (14 loc) 639 B
const fs = require('fs'); const path = require('path'); let version = 'N/A'; try { const packageJsonPath = path.join(__dirname, '..', '..', 'package.json'); if (fs.existsSync(packageJsonPath)) { const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); version = packageJson.version || 'N/A'; } } catch (e) { console.error("bdscript: Failed to read package.json for version:", e); } module.exports = { name: "$packageVersion", description: "Returns the current version of the Solara package.", takesBrackets: false, execute: async (context, args) => { return version; } };