Replies: 1 comment
-
If you literally put that instead of using ` for template literals that would explain it. Also you can pass id: and token: property instead of url: for WebhookClient to make your life easier. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So i tried making the webhook url customizable from config.json
so i put the url 'https://canary.discord.com/api/webhooks/${config.announcements.webhookId}/${config.announcements.webhookToken}`
but it doesn't work.
The full stacktrace:
Error [WebhookURLInvalid]: The provided webhook URL is not valid.
at new WebhookClient (?\node_modules\discord.js\src\client\WebhookClient.js:51:15)
at Object. (?\commands\ogloszenie.js:3:17)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at globalThis.commandsReload (?\events\messageCommands.js:39:25)
at Object. (?\events\messageCommands.js:62:12) {
code: 'WebhookURLInvalid'
}
Beta Was this translation helpful? Give feedback.
All reactions