mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-22 05:57:30 +00:00
Refactor string checks and fix exception when exporting multiple channels
Fix #164
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.3.0" />
|
||||
<PackageReference Include="Stylet" Version="1.1.22" />
|
||||
<PackageReference Include="Tyrrrz.Extensions" Version="1.6.0" />
|
||||
<PackageReference Include="Tyrrrz.Extensions" Version="1.6.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace DiscordChatExporter.Cli.Verbs
|
||||
var exportService = Container.Instance.Get<ExportService>();
|
||||
|
||||
// Configure settings
|
||||
if (!Options.DateFormat.EmptyIfNull().IsWhiteSpace())
|
||||
if (!Options.DateFormat.IsNullOrWhiteSpace())
|
||||
settingsService.DateFormat = Options.DateFormat;
|
||||
|
||||
// Track progress
|
||||
@@ -37,7 +37,7 @@ namespace DiscordChatExporter.Cli.Verbs
|
||||
|
||||
// Generate file path if not set or is a directory
|
||||
var filePath = Options.OutputPath;
|
||||
if (filePath.EmptyIfNull().IsWhiteSpace() || ExportHelper.IsDirectoryPath(filePath))
|
||||
if (filePath.IsNullOrWhiteSpace() || ExportHelper.IsDirectoryPath(filePath))
|
||||
{
|
||||
// Generate default file name
|
||||
var fileName = ExportHelper.GetDefaultExportFileName(Options.ExportFormat, chatLog.Guild,
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace DiscordChatExporter.Cli.Verbs
|
||||
var exportService = Container.Instance.Get<ExportService>();
|
||||
|
||||
// Configure settings
|
||||
if (!Options.DateFormat.EmptyIfNull().IsWhiteSpace())
|
||||
if (!Options.DateFormat.IsNullOrWhiteSpace())
|
||||
settingsService.DateFormat = Options.DateFormat;
|
||||
|
||||
// Get channels
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace DiscordChatExporter.Cli.Verbs
|
||||
var exportService = Container.Instance.Get<ExportService>();
|
||||
|
||||
// Configure settings
|
||||
if (!Options.DateFormat.EmptyIfNull().IsWhiteSpace())
|
||||
if (!Options.DateFormat.IsNullOrWhiteSpace())
|
||||
settingsService.DateFormat = Options.DateFormat;
|
||||
|
||||
// Get channels
|
||||
|
||||
Reference in New Issue
Block a user