@@ -18,12 +18,13 @@ public static async Task DeleteAsync(IChannel channel, BaseDiscordClient client,
1818 {
1919 await client . ApiClient . DeleteChannelAsync ( channel . Id , options ) . ConfigureAwait ( false ) ;
2020 }
21- public static async Task < Model > ModifyAsync ( IGuildChannel channel , BaseDiscordClient client ,
22- Action < GuildChannelProperties > func ,
21+ public static async Task < Model > ModifyAsync < TState > ( IGuildChannel channel , BaseDiscordClient client ,
22+ Action < GuildChannelProperties , TState > func ,
23+ TState state ,
2324 RequestOptions options )
2425 {
2526 var args = new GuildChannelProperties ( ) ;
26- func ( args ) ;
27+ func ( args , state ) ;
2728 var apiArgs = new API . Rest . ModifyGuildChannelParams
2829 {
2930 Name = args . Name ,
@@ -32,12 +33,13 @@ public static async Task<Model> ModifyAsync(IGuildChannel channel, BaseDiscordCl
3233 } ;
3334 return await client . ApiClient . ModifyGuildChannelAsync ( channel . Id , apiArgs , options ) . ConfigureAwait ( false ) ;
3435 }
35- public static async Task < Model > ModifyAsync ( ITextChannel channel , BaseDiscordClient client ,
36- Action < TextChannelProperties > func ,
36+ public static async Task < Model > ModifyAsync < TState > ( ITextChannel channel , BaseDiscordClient client ,
37+ Action < TextChannelProperties , TState > func ,
38+ TState state ,
3739 RequestOptions options )
3840 {
3941 var args = new TextChannelProperties ( ) ;
40- func ( args ) ;
42+ func ( args , state ) ;
4143 var apiArgs = new API . Rest . ModifyTextChannelParams
4244 {
4345 Name = args . Name ,
@@ -49,12 +51,13 @@ public static async Task<Model> ModifyAsync(ITextChannel channel, BaseDiscordCli
4951 } ;
5052 return await client . ApiClient . ModifyGuildChannelAsync ( channel . Id , apiArgs , options ) . ConfigureAwait ( false ) ;
5153 }
52- public static async Task < Model > ModifyAsync ( IVoiceChannel channel , BaseDiscordClient client ,
53- Action < VoiceChannelProperties > func ,
54+ public static async Task < Model > ModifyAsync < TState > ( IVoiceChannel channel , BaseDiscordClient client ,
55+ Action < VoiceChannelProperties , TState > func ,
56+ TState state ,
5457 RequestOptions options )
5558 {
5659 var args = new VoiceChannelProperties ( ) ;
57- func ( args ) ;
60+ func ( args , state ) ;
5861 var apiArgs = new API . Rest . ModifyVoiceChannelParams
5962 {
6063 Bitrate = args . Bitrate ,
0 commit comments