Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NetCord/Rest/RestClient.Webhook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace NetCord.Rest;

public partial class RestClient
{
[GenerateAlias([typeof(GuildThread)], $"(ulong){nameof(TextGuildChannel.ParentId)}!", Modifiers = ["new"])]
[GenerateAlias([typeof(ForumGuildChannel)], nameof(ForumGuildChannel.Id))]
[GenerateAlias([typeof(TextGuildChannel)], nameof(TextGuildChannel.Id))]
public async Task<IncomingWebhook> CreateWebhookAsync(ulong channelId, WebhookProperties webhookProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Expand All @@ -12,6 +13,7 @@ public async Task<IncomingWebhook> CreateWebhookAsync(ulong channelId, WebhookPr
return new(await (await SendRequestAsync(HttpMethod.Post, content, $"/channels/{channelId}/webhooks", null, new(channelId), properties, cancellationToken: cancellationToken).ConfigureAwait(false)).ToObjectAsync(Serialization.Default.JsonWebhook).ConfigureAwait(false), this);
}

[GenerateAlias([typeof(GuildThread)], $"(ulong){nameof(TextGuildChannel.ParentId)}!", Modifiers = ["new"])]
[GenerateAlias([typeof(ForumGuildChannel)], nameof(ForumGuildChannel.Id))]
[GenerateAlias([typeof(TextGuildChannel)], nameof(TextGuildChannel.Id))]
public async Task<IReadOnlyList<Webhook>> GetChannelWebhooksAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Expand Down