@@ -18,12 +18,13 @@ public static async Task DeleteAsync(IChannel channel, BaseDiscordClient client,
18
18
{
19
19
await client . ApiClient . DeleteChannelAsync ( channel . Id , options ) . ConfigureAwait ( false ) ;
20
20
}
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 ,
23
24
RequestOptions options )
24
25
{
25
26
var args = new GuildChannelProperties ( ) ;
26
- func ( args ) ;
27
+ func ( args , state ) ;
27
28
var apiArgs = new API . Rest . ModifyGuildChannelParams
28
29
{
29
30
Name = args . Name ,
@@ -32,12 +33,13 @@ public static async Task<Model> ModifyAsync(IGuildChannel channel, BaseDiscordCl
32
33
} ;
33
34
return await client . ApiClient . ModifyGuildChannelAsync ( channel . Id , apiArgs , options ) . ConfigureAwait ( false ) ;
34
35
}
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 ,
37
39
RequestOptions options )
38
40
{
39
41
var args = new TextChannelProperties ( ) ;
40
- func ( args ) ;
42
+ func ( args , state ) ;
41
43
var apiArgs = new API . Rest . ModifyTextChannelParams
42
44
{
43
45
Name = args . Name ,
@@ -49,12 +51,13 @@ public static async Task<Model> ModifyAsync(ITextChannel channel, BaseDiscordCli
49
51
} ;
50
52
return await client . ApiClient . ModifyGuildChannelAsync ( channel . Id , apiArgs , options ) . ConfigureAwait ( false ) ;
51
53
}
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 ,
54
57
RequestOptions options )
55
58
{
56
59
var args = new VoiceChannelProperties ( ) ;
57
- func ( args ) ;
60
+ func ( args , state ) ;
58
61
var apiArgs = new API . Rest . ModifyVoiceChannelParams
59
62
{
60
63
Bitrate = args . Bitrate ,
0 commit comments