modmail/index.ts
2024-03-22 22:15:42 +02:00

17 lines
433 B
TypeScript

import { readFileSync } from 'node:fs';
import Client from './src/Client.js';
const optionsFile = readFileSync('./config.jsonc', { encoding: 'utf-8' });
const lines = optionsFile.split('\n');
const clean = [];
for (const line of lines)
{
if (line.startsWith('//'))
continue;
clean.push(line.replace(/\/\/.*/u, ''));
}
const options = JSON.parse(clean.join('\n'));
const client = new Client(options);
client.init();