Problem
Webhook.Execute() and Webhook.Edit() send the caller's webhook URL to ripext unchanged:
Format(webhook_query, sizeof webhook_query, "%s?wait=true", webhook);
Format(webhook_patch, sizeof webhook_patch, "%s/messages/%s", webhook, messageId);
The webhook URL Discord gives you in the channel settings is unversioned:
https://discord.com/api/webhooks/{id}/{token}
Per the Discord API reference, omitting the version routes the request to the current default version, which is v6, and v6/v7/v8 are all marked Deprecated. Only v9 and v10 are "Available"; v10 is current.
| Version |
Status |
Default |
| 10 |
Available |
|
| 9 |
Available |
|
| 8 |
Deprecated |
|
| 7 |
Deprecated |
|
| 6 |
Deprecated |
✓ |
Discord has discontinued old API versions before, usually with limited notice. Whenever v6 is turned off, every plugin that feeds this include a bare webhook URL breaks at once, and server owners have no easy fix.
Proposal
Normalize the endpoint to an explicit version inside the include so it does not depend on Discord's default.
Sketch:
#define DISCORD_API_VERSION 10
// If the URL is a .../api/webhooks/... route with no /vNN/ segment,
// insert /v<DISCORD_API_VERSION>/ before "webhooks".
stock void NormalizeWebhookURL(const char[] in, char[] out, int maxlen)
Called from Execute() / Edit() before building the query/patch URL. A URL that already carries a version (/api/v10/webhooks/...) or a non-standard host would be left untouched, so callers keep full control.
Alternatives:
- Just document that users should pass a versioned URL (weakest, easy to forget).
- Expose the version as an overridable define only.
Notes
This is a behaviour change, so keeping it out of #8 (plain bug fixes). Happy to send a PR once we agree on the approach.
Problem
Webhook.Execute()andWebhook.Edit()send the caller's webhook URL to ripext unchanged:The webhook URL Discord gives you in the channel settings is unversioned:
Per the Discord API reference, omitting the version routes the request to the current default version, which is v6, and v6/v7/v8 are all marked Deprecated. Only v9 and v10 are "Available"; v10 is current.
Discord has discontinued old API versions before, usually with limited notice. Whenever v6 is turned off, every plugin that feeds this include a bare webhook URL breaks at once, and server owners have no easy fix.
Proposal
Normalize the endpoint to an explicit version inside the include so it does not depend on Discord's default.
Sketch:
Called from
Execute()/Edit()before building the query/patch URL. A URL that already carries a version (/api/v10/webhooks/...) or a non-standard host would be left untouched, so callers keep full control.Alternatives:
Notes
This is a behaviour change, so keeping it out of #8 (plain bug fixes). Happy to send a PR once we agree on the approach.