此时我真的一无所知,并已尝试查找我能想到的所有内容,但我的代码出现此错误:
ReferenceError: Cannot access 'options' before initialization
at file:///D:/node mods/agda.js/src/constants/Constants.js:4:45
常量.js
import { options } from "../ws/WebSocketManager.js";
export const Constants = {
GATEWAY: `wss://gateway.discord.gg/?v=${options.gateway_version}&encoding=json`
}
WebSocketManager.js(只显示一个片段)
import WebSocket from 'ws';
import { Constants } from '../constants/Constants.js';
import { OPCodes } from '../constants/OPCodes.js';
import { Heartbeat,Identify } from '../constants/Payloads.js';
export const options = {
debugMode: true,debugMode_payloads: true,debugMode_connection: true,debugMode_heartbeats: true,useOS: 'linux',intents: 513,gateway_version: '9'
}