-
-
Notifications
You must be signed in to change notification settings - Fork 742
/
IWebhook.cs
70 lines (59 loc) · 2.08 KB
/
IWebhook.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
using System.Threading.Tasks;
namespace Discord
{
/// <summary>
/// Represents a webhook object on Discord.
/// </summary>
public interface IWebhook : IDeletable, ISnowflakeEntity
{
/// <summary>
/// Gets the token of this webhook; <see langword="null"/> if the <see cref="Type"/> is <see cref="WebhookType.ChannelFollower"/>.
/// </summary>
string Token { get; }
/// <summary>
/// Gets the default name of this webhook.
/// </summary>
string Name { get; }
/// <summary>
/// Gets the ID of this webhook's default avatar.
/// </summary>
string AvatarId { get; }
/// <summary>
/// Gets the URL to this webhook's default avatar.
/// </summary>
string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128);
/// <summary>
/// Gets the channel for this webhook.
/// </summary>
IIntegrationChannel Channel { get; }
/// <summary>
/// Gets the ID of the channel for this webhook; <see langword="null"/> for <see cref="WebhookType.Application"/> webhooks.
/// </summary>
ulong? ChannelId { get; }
/// <summary>
/// Gets the guild owning this webhook.
/// </summary>
IGuild Guild { get; }
/// <summary>
/// Gets the ID of the guild owning this webhook.
/// </summary>
ulong? GuildId { get; }
/// <summary>
/// Gets the user that created this webhook.
/// </summary>
IUser Creator { get; }
/// <summary>
/// Gets the ID of the application owning this webhook.
/// </summary>
ulong? ApplicationId { get; }
/// <summary>
/// Gets the type of this webhook.
/// </summary>
WebhookType Type { get; }
/// <summary>
/// Modifies this webhook.
/// </summary>
Task ModifyAsync(Action<WebhookProperties> func, RequestOptions options = null);
}
}