modmail/index.ts

17 lines
433 B
TypeScript
Raw Permalink Normal View History

2024-03-22 21:15:42 +01:00
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();