Send Webhook Object on Webhooks Update Event #3425
-
The webhooks update event provides a guild ID and channel ID, but doesn't tell you which webhook was updated. It also doesn't specify if it's possible for multiple webhooks to be updated at once. This data can be found if your application caches webhooks by fetching the channel's webhooks and comparing the data, but that would require an extra API call, using up the rate limit bucket. Other update events, such as guild/channel/role update events provide the updated data, so I'm not sure why the same can't be done for webhooks. I think that the event should include the update type (created, updated, or deleted), and the webhook object if the update type is created or updated. The same can be improved for the guild integrations update event. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The reason for this (and the guild integrations update event) is really for the client to reload the webhooks/integrations in the UI. We did this somewhat as a quick hack to simplify the protocol. It would be interesting to know under what circumstances this information is relevant to bots. I don't think that a bot should attempt to maintain a mapping of active webhooks. We do not send this info in GUILD_CREATE for example, so it isn't really state that a bot could start out with that needs to be actively updated. |
Beta Was this translation helpful? Give feedback.
The reason for this (and the guild integrations update event) is really for the client to reload the webhooks/integrations in the UI. We did this somewhat as a quick hack to simplify the protocol.
It would be interesting to know under what circumstances this information is relevant to bots. I don't think that a bot should attempt to maintain a mapping of active webhooks. We do not send this info in GUILD_CREATE for example, so it isn't really state that a bot could start out with that needs to be actively updated.