Method ModifyAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
ModifyAsync(string, Optional<Stream>, ulong?, string)
Modifies this webhook.
public Task<DiscordWebhook> ModifyAsync(string name = null, Optional<Stream> avatar = default, ulong? channelId = null, string reason = null)
Parameters
name
stringNew default name for this webhook.
avatar
Optional<Stream>New avatar for this webhook.
channelId
ulong?The new channel id to move the webhook to.
reason
stringReason for audit logs.
Returns
- Task<DiscordWebhook>
The modified webhook.
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageWebhooks permission.
- NotFoundException
Thrown when the webhook does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.