You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 11, 2025. It is now read-only.
ERROR_METHOD_CALL
Failed to add bot to server: xxxx. Error: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
it happens when u try and invite a bot to a server, was working fine a few days ago until recently.
Code sample
'use strict';constCaptcha=require('2captcha');constDiscord=require('../src/index');constsolver=newCaptcha.Solver('<2captcha key>');constclient=newDiscord.Client({captchaSolver: function(captcha,UA){returnsolver.hcaptcha(captcha.captcha_sitekey,'discord.com',{invisible: 1,userAgent: UA,data: captcha.captcha_rqdata,}).then(res=>res.data);},TOTPKey: '<string>',});client.on('ready',async()=>{console.log('Ready!',client.user.tag);// Note// You need to include `guild_id` to invite the bot// These two fields can appear either in the URL or in the options.awaitclient.authorizeURL(`https://discord.com/api/oauth2/authorize?client_id=289066747443675143&permissions=414501424448&scope=bot%20applications.commands`,{guild_id: 'guild id',},);});client.login('token');
Package version
3.7.0
Node.js version
22.17.1
Operating system
w11
Priority this issue should have
Medium (should be fixed soon)
Checklist
I have searched the open issues for duplicates.
I have shared the entire traceback.
I am using a user token (and it isn't visible in the code).
Which package has the bugs?
The core library
Issue description
ERROR_METHOD_CALL
Failed to add bot to server: xxxx. Error: An Unexpected Error has occured. Please submit an issue on GitHub detailing this event.
it happens when u try and invite a bot to a server, was working fine a few days ago until recently.
Code sample
Package version
3.7.0
Node.js version
22.17.1
Operating system
w11
Priority this issue should have
Medium (should be fixed soon)
Checklist
Additional Information
No response