refactor: vendor content as regular files (remove git submodules) so CI builds don't need GitHub auth

This commit is contained in:
asepharyana
2026-07-02 02:38:04 +07:00
parent 7b106fe562
commit 134674d7dd
452 changed files with 75011 additions and 4 deletions
+33
View File
@@ -0,0 +1,33 @@
'use strict';
const Discord = require('../src/index');
const { ProxyAgent } = require('proxy-agent');
const proxy = new ProxyAgent({
getProxyForUrl: function () {
return '<any proxy>';
},
});
const client = new Discord.Client({
ws: {
agent: proxy, // WebSocket Proxy
// Do not use the `proxy` option if you don't need to use the WebSocket Proxy
},
http: {
// API Proxy
// Read more: https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md
// agent: ProxyAgentOptions
agent: 'my.proxy.server',
// or new URL('my.proxy.server')
// or { uri: 'my.proxy.server' }
},
});
// So if you only need to use the API Proxy (for the purpose of saving data), you don't need to install `proxy-agent`.
client.on('ready', async () => {
console.log('Ready!', client.user.tag);
});
client.login('token');