File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
src/Discord.Net/Rest/Models/Webhook Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System . Text . Json . Serialization ;
2
+
3
+ namespace Discord . Models
4
+ {
5
+ public class Webhook
6
+ {
7
+ public const int MinWebhookNameLength = 2 ;
8
+ public const int MaxWebhookNameLength = 32 ;
9
+
10
+ public const int MinMessageContentLength = 0 ;
11
+ public const int MaxMessageContentLength = 2000 ;
12
+
13
+ public const int MinEmbedLimit = 0 ;
14
+ public const int MaxEmbedLimit = 10 ;
15
+
16
+ [ JsonPropertyName ( "id" ) ]
17
+ public Snowflake Id { get ; set ; }
18
+ [ JsonPropertyName ( "type" ) ]
19
+ public WebhookType Type { get ; set ; }
20
+ [ JsonPropertyName ( "guild_id" ) ]
21
+ public Optional < Snowflake > GuildId { get ; set ; }
22
+ [ JsonPropertyName ( "channel_id" ) ]
23
+ public Snowflake ChannelId { get ; set ; }
24
+ [ JsonPropertyName ( "user" ) ]
25
+ public Optional < User > Creator { get ; set ; }
26
+ [ JsonPropertyName ( "name" ) ]
27
+ public string ? Name { get ; set ; }
28
+ [ JsonPropertyName ( "avatar" ) ]
29
+ public string ? AvatarId { get ; set ; }
30
+ [ JsonPropertyName ( "token" ) ]
31
+ public Optional < string > Token { get ; set ; }
32
+ }
33
+ }
Original file line number Diff line number Diff line change
1
+ namespace Discord . Models
2
+ {
3
+ public enum WebhookType : byte
4
+ {
5
+ Incoming = 1 ,
6
+ ChannelFollower = 2
7
+ }
8
+ }
You can’t perform that action at this time.
0 commit comments