Jump to content

Webhook URL Invalid

Not a Bug 1.4.1

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.

Share this comment


Link to comment

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.

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

82.2k

Files Sold

Total number of files sold.

1.6m

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.