forscht / ddrive

Discord as a filesystem.
https://ddrive.forscht.dev
MIT License
475 stars 90 forks source link

Bug with handling canary subdomain #64

Open ndzn opened 1 year ago

ndzn commented 1 year ago

I noticed when using a webhook using the canary.discord.com domain it seems to parse incorrectly here's a snippet of what it requests rawError":{"type":"Object","message":"404: Not Found","stack":"","code":0},"code":0,"status":404,"method":"POST","url":"[https://discord.com/api/v10https://canary.discord.com/api/webhooks/(channel)/(token)","requestBody"](https://discord.com/api/v10https://canary.discord.com/api/webhooks/(channel)/(token)%22,%22requestBody%22);: this however can be easily fixed by just removing the canary subdomain, but just wanted to point this out if this means anything

DevNergis commented 11 months ago

src/DFs/index.js line 50 Change

return webhookURL.replace(/https:\/\/\w*\.?discord\.com\/api/gm, '')