Skip to content

Fixed the channel ID and added a reason option when modifying a webhook

Mateusz Brawański requested to merge github/fork/FenikkusuKoneko/master into master

Created by: FenikkusuKoneko

Summary

Fixed the provided channel ID when modfying a webhook and also added an option to set a reason in the audit log.

Details

I found that the new channel ID was not provided correctly when modifying a webhook. The new channel ID and the webhook's ID were switched, thus receiving a NotFoundException even though the webhook existed in the first place. Also the reason provided was the webhook's token.

Changes proposed

Switched the channel ID and webhook's ID between them. Added an option to set a reason when modifying a webhook, the webhook's token is provided no more.

References: https://github.com/DSharpPlus/DSharpPlus/blob/c4a568a0e9b9059c46c3a366622bbe71339b0992/DSharpPlus/Entities/DiscordWebhook.cs#L62-L85

https://github.com/DSharpPlus/DSharpPlus/blob/c4a568a0e9b9059c46c3a366622bbe71339b0992/DSharpPlus/Net/DiscordApiClient.cs#L1710

Merge request reports

Loading