Changing rest api of WebhookClient

By the looks of it this seems to be possible but i am having difficulties understanding the structure of this
21 Replies
d.js toolkit
d.js toolkit8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Black Wolf
Black WolfOP8mo ago
guessing this means rest is supported for the webhook client yep
Black Wolf
Black WolfOP8mo ago
maybe without options:? hmm I tried passing it url: and using my proxy but apparently the webhook builder does not like that 😂
Black Wolf
Black WolfOP8mo ago
ended up screaming at me :P so uhh hold on lemme do a test run. One moment so you are saying that this (has the same syntax as client)
Black Wolf
Black WolfOP8mo ago
should work? me asking instead of trying it out- Man i am guilty of this myself... i work in a support server and still do this aaaa issue is that i tested it before by looking at my proxy stats lol
Black Wolf
Black WolfOP8mo ago
turns out i am sending so many NoAuth (webhook) requests that idk if it used the proxy or not
Black Wolf
Black WolfOP8mo ago
9217 requests per day to be exact lol welp ig imma spint this up again on my test server and check there- UHH i don't wanna edit my prometheus config again D: is there any other way of testing if it used the proxy lol? shait it doesn't look like it worked
Black Wolf
Black WolfOP8mo ago
console.log of webhookClient even if i switch it back
Black Wolf
Black WolfOP8mo ago
no clue what i am doing wrong
space
space8mo ago
Try specifying the options as a second parameter to the constructor. https://discordjs.dev/docs/packages/discord.js/14.15.2/WebhookClient:Class
Black Wolf
Black WolfOP8mo ago
sorry, what do you mean by that exactly? ping on reply ty
space
space8mo ago
Check the documentation. You are passing presumably ClientOptions under an options key to the webhook client class' constructor. There is no such thing. You'll pass them as second parameter, in your case, a second object.
Want results from more Discord servers?
Add your server