Error: 1|Titanium | file:///root/discord-bot/dist/Structures/Classes/Client.js:1 1|Titanium | import{Client as t,Collection as a,GatewayIntentBits as e,Partials as s}from"discord.js";import{promisify as o}from"util";import{ClusterClient as n,getInfo as i}from"discord-hybrid-sharding";import r from"glob";import d from"chalk";import{PrismaClient as m}from"@database/client";import{CommandHandler as l,EventHandler as c}from"../Handlers/index.js";import{BotConfig as h}from"../../config.js";import{Box as w}from"./boxen.js";let b=new w,C=await b.createBox(),p=o(r);export class Bot extends t{SlashCommands;Events;BroadCastCache;Config;cluster;prisma;cooldoown=new a;boxContents=C;constructor(){super({shards:i().SHARD_LIST,shardCount:i().TOTAL_SHARDS,intents:[e.Guilds,e.GuildMembers,e.GuildMessages],partials:[s.GuildMember,s.Message,s.ThreadMember,s.User]}),this.SlashCommands=new a,this.Events=new a,this.BroadCastCache=new a,this.Config=h}async start(t){await this.connectToDatabase(),await this.loadHandlers(),this.cluster=new n(this),await this.login(t)}async connectToDatabase(){try{let t=new m;await t.$connect(),this.prisma=t,await b.addItem(this.boxContents,{name:`${d.yellow("Database")}`,value:"OK"})}catch(t){await b.addItem(this.boxContents,{name:`${d.bold.red("Database")}`,value:`${t}`})}}async loadHandlers(){try{await new l(this,await p(`${process.cwd().replace(/\\/g,"/")}/dist/Commands/*/*{.ts,.js}`)),b.addItem(this.boxContents,{name:`${d.yellow("Commands")}`,value:"OK"})}catch(t){b.addItem(this.boxContents,{name:`${d.bold.red("Commands")}`,value:`${t}`})}try{new c(this,await p(`${process.cwd().replace(/\\/g,"/")}/dist/Events/*/*{.ts,.js}`)),b.addItem(this.boxContents,{name:`${d.yellow("Events")}`,value:"OK"})}catch(t){b.addItem(this.boxContents,{name:`${d.bold.red("Events")}`,value:`${t}`})}await b.showBox(this.boxContents,{borderColor:"white",borderStyle:"round",dimBorder:!0,padding:1,margin:1})}} 1|Titanium | ^ 1|Titanium | SyntaxError: The requested module 'glob' does not provide an export named 'default' 1|Titanium | at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) 1|Titanium | at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) 1|Titanium | 1|Titanium | Node.js v18.16.0 1|Titanium | Error: CLUSTERING_READY_DIED | ClusterId: 1 1|Titanium | at Cluster.onDeath (/root/discord-bot/node_modules/.pnpm/discord-hybrid-sharding@2.1.3/node_modules/discord-hybrid-sharding/dist/Core/Cluster.js:151:24)1|Titanium | at Object.onceWrapper (node:events:628:26) 1|Titanium | at Cluster.emit (node:events:525:35) 1|Titanium | at Cluster._handleExit (/root/discord-bot/node_modules/.pnpm/discord-hybrid-sharding@2.1.3/node_modules/discord-hybrid-sharding/dist/Core/Cluster.js:280:14) 1|Titanium | at ChildProcess.emit (node:events:513:28) 1|Titanium | at ChildProcess._handle.onexit (node:internal/child_process:291:12) Code: import { APIEmbed, Client, Collection, GatewayIntentBits, Partials } from 'discord.js'; import { promisify } from 'util'; import { ClusterClient, getInfo } from 'discord-hybrid-sharding'; import glob from 'glob'; import chalk from 'chalk'; import { PrismaClient } from '@database/client'; import { CommandHandler, EventHandler } from '../Handlers/index.js'; import { SlashCommand } from './Commands/index.js'; import { BaseEvent } from './Events/index.js'; import { BotConfig } from '~/src/config.js'; import { Box } from './boxen.js'; import type { IConfig } from '~/src/@types/config.js'; const IBox = new Box(); const BoxContents = await IBox.createBox(); const PG = promisify(glob); export class Bot extends Client { public SlashCommands: Collection; public Events: Collection; public BroadCastCache: Collection; public Config: IConfig; public cluster!: ClusterClient; public prisma!: PrismaClient; public cooldoown: Collection = new Collection(); private boxContents = BoxContents; public constructor() { super({ shards: getInfo().SHARD_LIST, shardCount: getInfo().TOTAL_SHARDS, intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, ], partials: [ Partials.GuildMember, Partials.Message, Partials.ThreadMember, Partials.User, ], }); this.SlashCommands = new Collection(); this.Events = new Collection(); this.BroadCastCache = new Collection(); this.Config = BotConfig; } public async start(token: string) { await this.connectToDatabase(); await this.loadHandlers(); this.cluster = new ClusterClient(this); await this.login(token); } private async connectToDatabase() { try { const prismaClient = new PrismaClient(); await prismaClient.$connect(); this.prisma = prismaClient; await IBox.addItem(this.boxContents, { name: `${chalk.yellow('Database')}`, value: 'OK', }); } catch (err) { await IBox.addItem(this.boxContents, { name: `${chalk.bold.red('Database')}`, value: `${err}`, }); } } private async loadHandlers() { try { await new CommandHandler( this, await PG(`${process.cwd().replace(/\\/g, '/')}/dist/Commands/*/*{.ts,.js}`), ); IBox.addItem(this.boxContents, { name: `${chalk.yellow('Commands')}`, value: 'OK', }); } catch (err) { IBox.addItem(this.boxContents, { name: `${chalk.bold.red('Commands')}`, value: `${err}`, }); } try { new EventHandler( this, await PG(`${process.cwd().replace(/\\/g, '/')}/dist/Events/*/*{.ts,.js}`), ); IBox.addItem(this.boxContents, { name: `${chalk.yellow('Events')}`, value: 'OK', }); } catch (err) { IBox.addItem(this.boxContents, { name: `${chalk.bold.red('Events')}`, value: `${err}`, }); } await IBox.showBox(this.boxContents, { borderColor: 'white', borderStyle: 'round', dimBorder: true, padding: 1, margin: 1, }); } }