@@ -12,24 +12,19 @@ function message<T extends z.ZodType>(stringType: (markdown: boolean) => T) {
1212 return z
1313 . strictObject ( {
1414 content : stringType ( true ) ,
15- allowed_mentions : z
15+ allowedMentions : z
1616 . strictObject ( {
1717 everyone : z . boolean ( ) ,
18- replied_user : z . boolean ( ) ,
18+ repliedUser : z . boolean ( ) ,
1919 users : z . union ( [ z . boolean ( ) , Snowflake . array ( ) . max ( 100 ) ] ) ,
2020 roles : z . union ( [ z . boolean ( ) , Snowflake . array ( ) . max ( 100 ) ] ) ,
2121 } )
22- . partial ( )
23- . transform ( ( { replied_user, ...input } ) => ( {
24- repliedUser : replied_user ,
25- ...input ,
26- } ) ) ,
22+ . partial ( ) ,
2723 embeds : embed ( stringType ) . array ( ) ,
2824 silent : z . boolean ( ) ,
2925 } )
3026 . partial ( )
31- . transform ( ( { allowed_mentions, silent, ...input } ) => ( {
32- allowedMentions : allowed_mentions ,
27+ . transform ( ( { silent, ...input } ) => ( {
3328 flags : silent ? MessageFlags . SUPPRESS_NOTIFICATIONS : 0 ,
3429 ...input ,
3530 } ) ) ;
@@ -53,16 +48,11 @@ function embed<T extends z.ZodType>(stringType: (markdown: boolean) => T) {
5348 } ) ,
5449 image : stringType ( false ) . transform ( ( url ) => ( { url } ) ) ,
5550 thumbnail : stringType ( false ) . transform ( ( url ) => ( { url } ) ) ,
56- author : z
57- . strictObject ( {
58- name : stringType ( false ) ,
59- url : stringType ( false ) . optional ( ) ,
60- icon_url : stringType ( false ) . optional ( ) ,
61- } )
62- . transform ( ( { icon_url, ...input } ) => ( {
63- iconURL : icon_url ,
64- ...input ,
65- } ) ) ,
51+ author : z . strictObject ( {
52+ name : stringType ( false ) ,
53+ url : stringType ( false ) . optional ( ) ,
54+ iconURL : stringType ( false ) . optional ( ) ,
55+ } ) ,
6656 fields : z
6757 . strictObject ( {
6858 name : stringType ( true ) ,
0 commit comments