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:
parent
b7057d3447
commit
d76d4d4654
2 changed files with 2 additions and 2 deletions
|
@ -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(
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Add table
Reference in a new issue