Panel Deployment
Deploy using a hosting panel. Watch our tutorial to get one and deploy on it.
- Create a new file on your panel – name it
index.js - Paste the following code:
const { execSync } = require('child_process'); const fs = require('fs'); const path = require('path'); const config = { SESSION_ID: 'your-session-id', OWNER_NUMBER: '234XXXXXXXXXX', WORKTYPE: 'private', PREFIX: '[.]', TIMEZONE: 'Africa/Lagos', OWNER_NAME: 'Victory Lord', BOT_NAME: 'Vord' }; function writeEnvFile(filePath) { const envText = Object.entries(config) .map(([key, value]) => `${key}=${value}`) .join('\n'); fs.writeFileSync(filePath, envText); console.log('config.env written'); } function moveFilesToRoot(srcDir, destDir) { const files = fs.readdirSync(srcDir, { withFileTypes: true }); for (const file of files) { const srcPath = path.join(srcDir, file.name); const destPath = path.join(destDir, file.name); if (fs.existsSync(destPath)) fs.rmSync(destPath, { recursive: true, force: true }); fs.renameSync(srcPath, destPath); } } try { console.log('Cloning Vord bot...'); execSync('git clone https://github.com/oluwafemimartins1212-sketch/vord-bot temp-dir', { stdio: 'inherit' }); const rootDir = process.cwd(); const tempDir = path.join(rootDir, 'temp-dir'); moveFilesToRoot(tempDir, rootDir); fs.rmdirSync(tempDir, { recursive: true }); writeEnvFile(path.join(rootDir, 'config.env')); console.log('Installing dependencies...'); execSync('npm install', { stdio: 'inherit' }); console.log('Starting bot...'); execSync('npm start', { stdio: 'inherit' }); } catch (err) { console.error('Setup failed:', err.message); process.exit(1); } - Update the startup command to
node index.jsin the "Startup" section of your panel.