Handle failed progress tasks as completed in CLI

Closes #988
pull/989/head
Oleksii Holub 2 years ago
parent b844e48016
commit f505ff3f1e

@ -150,7 +150,8 @@ public abstract class ExportCommandBase : TokenCommandBase
{
try
{
await progressContext.StartTaskAsync($"{channel.Category.Name} / {channel.Name}",
await progressContext.StartTaskAsync(
$"{channel.Category.Name} / {channel.Name}",
async progress =>
{
var guild = await Discord.GetGuildAsync(channel.GuildId, innerCancellationToken);

@ -44,6 +44,7 @@ internal static class ConsoleExtensions
}
finally
{
progressTask.Value = progressTask.MaxValue;
progressTask.StopTask();
}
}

Loading…
Cancel
Save