Files
discord.js-selfbot/examples/Proxy.js

26 lines
444 B
JavaScript
Raw Normal View History

2024-01-15 17:53:39 +07:00
'use strict';
const Discord = require('../src/index');
const { ProxyAgent } = require('proxy-agent');
2024-07-22 21:29:16 +07:00
const proxy = new ProxyAgent({
getProxyForUrl: function () {
return '<any proxy>';
},
});
2024-01-15 17:53:39 +07:00
const client = new Discord.Client({
ws: {
agent: proxy, // WebSocket Proxy
},
http: {
agent: proxy, // REST Proxy
},
});
client.on('ready', async () => {
console.log('Ready!', client.user.tag);
});
client.login('token');