Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with WebhookClient #665

Closed
3 tasks done
Ritshu opened this issue May 18, 2023 · 3 comments
Closed
3 tasks done

Error with WebhookClient #665

Ritshu opened this issue May 18, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Ritshu
Copy link

Ritshu commented May 18, 2023

Which package has the bugs?

The core library

Issue description

always throw error says webhook url is invalid even tho already put the webhook url that generated from discord

Code sample

const { WebhookURL } = require('./config.js');
const { WebhookClient } = require('discord.js-selfbot-v13');
const hook = new WebhookClient({ url: WebhookURL });

// value of WebhookURL "https://discordapp.com/api/webhooks/<mywebhookid>/<idk_maybe_discord_webhook_token>"
// ignore the <words>

Package version

discord.js-selfbot-v13@2.14.1

Node.js version

v18.16.0

Operating system

Windows

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).

Additional Information

already followed the documentation but always throwing this error

C:\Users\Shu\Desktop\test-app\node_modules\discord.js-selfbot-v13\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 (C:\Users\Shu\Desktop\test-app\node_modules\discord.js-selfbot-v13\src\client\WebhookClient.js:36:42)
    at Object.<anonymous> (C:\Users\Shu\Desktop\test-app\logger.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (C:\Users\Shu\Desktop\test-app\main.js:4:29)
    at Module._compile (node:internal/modules/cjs/loader:1254:14) {
  [Symbol(code)]: 'WEBHOOK_URL_INVALID'
}
@Ritshu Ritshu added the bug Something isn't working label May 18, 2023
@aiko-chan-ai
Copy link
Owner

/^https?:\/\/(?:canary|ptb)?\.?discord\.com\/api\/webhooks(?:\/v[0-9]\d*)?\/([^\/]+)\/([^\/]+)/i
=> discordapp.com invalid

@Ritshu
Copy link
Author

Ritshu commented May 18, 2023

/^https?:\/\/(?:canary|ptb)?\.?discord\.com\/api\/webhooks(?:\/v[0-9]\d*)?\/([^\/]+)\/([^\/]+)/i => discordapp.com invalid

yeah already figured out the problem but the link i get it was from discord itself, just in case you might want to update

@aiko-chan-ai
Copy link
Owner

@Ritshu my client
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants