Reputation: 13
using (DiscordWebhookClient client = new DiscordWebhookClient(WEBHOOK_URL))
{
ulong z = 42342340290226;
client.ModifyMessageAsync(ulong messageId, Action<WebhookMessageProperties> func, RequestOptions options = null)
}
How do I fill in the second and third parameters. These make no sense.
Upvotes: 0
Views: 203
Reputation: 1400
The Action<WebhookMessageProperties> func
is an action that will be applied to the message to modify it. For example,
Action<WebhookMessageProperties> func = message => message.Content = "Hello World!";
This would change the content of the message to "Hello World!".
The options can be used to specify parameters to the modification request, eg. time out. This can be left as RequestOptions.Default
if you don't want/need any custom options. This would give an example call as:
client.ModifyMessageAsync(messageId, x=>x.Content="Hello World!", RequestOptions.Default);
Upvotes: 0