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

22 lines
387 B
JavaScript
Raw Normal View History

2024-01-15 10:53:39 +00:00
'use strict';
const Discord = require('../src/index');
const { ProxyAgent } = require('proxy-agent');
const proxy = new ProxyAgent('<proxy>');
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');