Jump to content

Webhook URL Invalid

Not a Bug 1.4.1

aDrew1
aDrew1

Posted

Hello, I have set up the webhooks to make the bot send the global and team chats, as well as f7 reports, etc to my Discord is a specified channel. However, whenever I type in chat on the server, the bot crashes and throws the following error:

/home/container/node_modules/discord.js/src/client/WebhookClient.js:36
      if (!url || url.length <= 1) throw new Error('WEBHOOK_URL_INVALID');
                                         ^
Error [WEBHOOK_URL_INVALID]: The provided webhook URL is not valid.
    at new WebhookClient (/home/container/node_modules/discord.js/src/client/WebhookClient.js:36:42)
    at Client.<anonymous> (/home/container/events/rconConnection.js:402:27)
    at Client.emit (node:events:513:28)
    at WebSocket.onMessage (/home/container/node_modules/rustrcon/src/client/websocket/ws.js:55:15)
    at WebSocket.onMessage (/home/container/node_modules/rustrcon/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (/home/container/node_modules/rustrcon/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (node:events:513:28)
    at Receiver.dataMessage (/home/container/node_modules/rustrcon/node_modules/ws/lib/receiver.js:422:14)
    at Receiver.getData (/home/container/node_modules/rustrcon/node_modules/ws/lib/receiver.js:352:17) {
  [Symbol(code)]: 'WEBHOOK_URL_INVALID'
}
Node.js v18.14.0

From what I see it says it is throwing the error because the url length is < or = to "1", however, the full webhook URL is set in the config. I wont post it here for security, however, I can assure you the full link is in the config and that goes for each webhook.

Amino

Posted

If your webhook url starts with discordapp.com change it to discord.com

 

Amino

Posted

Changed Status from Pending to Not a Bug

aDrew1

Posted

Okay, I did that and it worked, thank you!

 

Something to note, it seems like the bot will error and crash if any of the webhook URLs have "discordapp.com" instead of just "discord.com". For my case the 3rd webhook link was discord.com, however the 2nd and 1st where both discordapp.com and it would crash.

Amino

Posted

I'm aware, that's why I suggested that.
Not sure how people even get discordapp.com webhooks...

 

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.