mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
refactor: replace WSCodes, WSEvents, and InviteScopes with discord-api-types equivalent (#7409)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { readdir, writeFile } from 'node:fs/promises';
|
||||
import { Constants } from '../src/index.js';
|
||||
import { GatewayDispatchEvents } from '../src/index.js';
|
||||
|
||||
async function writeWebsocketHandlerImports() {
|
||||
const lines = ["'use strict';\n", 'const handlers = Object.fromEntries(['];
|
||||
|
||||
for (const name of Object.keys(Constants.WSEvents)) {
|
||||
for (const name of Object.values(GatewayDispatchEvents)) {
|
||||
lines.push(` ['${name}', require('./${name}')],`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user