example of JoinGuild not working #1456
Unanswered
jacky940810
asked this question in
Q&A
Replies: 1 comment
-
it seems the endpoint url is not correct, I also tried replace function buildRoute(manager) { |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
script:
'use strict';
const Captcha = require('2captcha');
const Discord = require('../src/index');
const {ProxyAgent} = require("proxy-agent");
const solver = new Captcha.Solver('<2captcha key>');
const proxy = new ProxyAgent({
getProxyForUrl: function () {
return 'socks5://127.0.0.1:14000';
},
});
const client = new Discord.Client({
captchaSolver: function (captcha, UA) {
return solver
.hcaptcha(captcha.captcha_sitekey, 'discord.com', {
invisible: 1,
userAgent: UA,
data: captcha.captcha_rqdata,
})
.then(res => res.data);
},
captchaRetryLimit: 3,
ws: {
agent: proxy, // WebSocket Proxy
},
http: {
// API Proxy
// Read more: https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md
// agent: ProxyAgentOptions
agent: 'socks5://127.0.0.1:14000',
// or new URL('my.proxy.server')
// or { uri: 'my.proxy.server' }
}
});
client.on('ready', async () => {
console.log('Ready!', client.user.tag);
await client.acceptInvite('mdmc');
});
client.login('');
result:
HTTPError [InvalidArgumentError]: Invalid URL protocol: the URL must start with
http:
orhttps:
.at RequestHandler.execute (C:\Users\Jacky\PycharmProjects\PythonProject\SMM\discord\discord.js-selfbot-v13-3.5.1\src\rest\RequestHandler.js:214:15)
at RequestHandler.execute (C:\Users\Jacky\PycharmProjects\PythonProject\SMM\discord\discord.js-selfbot-v13-3.5.1\src\rest\RequestHandler.js:218:19)
at RequestHandler.push (C:\Users\Jacky\PycharmProjects\PythonProject\SMM\discord\discord.js-selfbot-v13-3.5.1\src\rest\RequestHandler.js:64:25)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Client.fetchInvite (C:\Users\Jacky\PycharmProjects\PythonProject\SMM\discord\discord.js-selfbot-v13-3.5.1\src\client\Client.js:375:18)
at async Client.acceptInvite (C:\Users\Jacky\PycharmProjects\PythonProject\SMM\discord\discord.js-selfbot-v13-3.5.1\src\client\Client.js:602:15)
at async Client. (C:\Users\Jacky\PycharmProjects\PythonProject\SMM\discord\discord.js-selfbot-v13-3.5.1\e
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:407:10)
at process.processTicksAndRejections (node:internal/process/task_queues:92:21) {
code: 500,
method: 'get',
path: '/invites/mdmc',
requestData: { json: undefined, files: [], headers: undefined }
}
Node.js v22.13.0
Beta Was this translation helpful? Give feedback.
All reactions