1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-20 00:43:36 +03:00

Pass cancellation token to DM message create requests

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-06-30 22:57:05 +05:00
parent b7057d3447
commit d76d4d4654
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ public class BanCommandGroup : CommandGroup {
if (!dmEmbed.IsDefined(out var dmBuilt)) if (!dmEmbed.IsDefined(out var dmBuilt))
return Result.FromError(dmEmbed); return Result.FromError(dmEmbed);
await _channelApi.CreateMessageAsync(dmChannel.ID, embeds: new[] { dmBuilt }); await _channelApi.CreateMessageAsync(dmChannel.ID, embeds: new[] { dmBuilt }, ct: CancellationToken);
} }
var banResult = await _guildApi.CreateGuildBanAsync( var banResult = await _guildApi.CreateGuildBanAsync(

View file

@ -113,7 +113,7 @@ public class KickCommandGroup : CommandGroup {
if (!dmEmbed.IsDefined(out var dmBuilt)) if (!dmEmbed.IsDefined(out var dmBuilt))
return Result.FromError(dmEmbed); return Result.FromError(dmEmbed);
await _channelApi.CreateMessageAsync(dmChannel.ID, embeds: new[] { dmBuilt }); await _channelApi.CreateMessageAsync(dmChannel.ID, embeds: new[] { dmBuilt }, ct: CancellationToken);
} }
var kickResult = await _guildApi.RemoveGuildMemberAsync( var kickResult = await _guildApi.RemoveGuildMemberAsync(