#Crash without error on import client
1 messages · Page 1 of 1 (latest)
hi, I'm working on making a bot in typescript, but I've run into an issue that I cant seem to figure out.
in my main file (index.ts) I initiate the bot and export the client
export const cli=new Client({intents:[Intents.FLAGS.GUILDS]});
in another file, I import the client to access its classes. as shown:
import{cli}from "../index.js";
console.log(cli)
export function randomFrom(array:string|any[]):any{
return array[Math.floor(Math.random()*array.length)];
};
export function memberFromID(id:string):any{
return cli.users.cache.get(id);
};
the instant client is imported, the node process will crash with no error, similarly to if I were to run exit()
any ideas?
The entire repo is here if it helps