mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-21 06:11:28 +00:00
Replace the date format option with a locale option (#1130)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -88,7 +89,7 @@ public abstract class ExportCommandBase : DiscordCommandBase
|
||||
"media",
|
||||
Description = "Download assets referenced by the export (user avatars, attached files, embedded images, etc.)."
|
||||
)]
|
||||
public bool ShouldDownloadAssets { get; init; } = false;
|
||||
public bool ShouldDownloadAssets { get; init; }
|
||||
|
||||
[CommandOption(
|
||||
"reuse-media",
|
||||
@@ -111,9 +112,19 @@ public abstract class ExportCommandBase : DiscordCommandBase
|
||||
init => _assetsDirPath = value is not null ? Path.GetFullPath(value) : null;
|
||||
}
|
||||
|
||||
[CommandOption("dateformat", Description = "Format used when writing dates.")]
|
||||
[Obsolete("This option doesn't do anything. Kept for backwards compatibility.")]
|
||||
[CommandOption(
|
||||
"dateformat",
|
||||
Description = "This option doesn't do anything. Kept for backwards compatibility."
|
||||
)]
|
||||
public string DateFormat { get; init; } = "MM/dd/yyyy h:mm tt";
|
||||
|
||||
[CommandOption("locale", Description = "Locale to use when formatting dates and numbers.")]
|
||||
public string Locale { get; init; } = CultureInfo.CurrentCulture.Name;
|
||||
|
||||
[CommandOption("utc", Description = "Normalize all timestamps to UTC+0.")]
|
||||
public bool IsUtcNormalizationEnabled { get; init; } = false;
|
||||
|
||||
[CommandOption(
|
||||
"fuck-russia",
|
||||
EnvironmentVariable = "FUCK_RUSSIA",
|
||||
@@ -210,7 +221,8 @@ public abstract class ExportCommandBase : DiscordCommandBase
|
||||
ShouldFormatMarkdown,
|
||||
ShouldDownloadAssets,
|
||||
ShouldReuseAssets,
|
||||
DateFormat
|
||||
Locale,
|
||||
IsUtcNormalizationEnabled
|
||||
);
|
||||
|
||||
await Exporter.ExportChannelAsync(
|
||||
|
||||
Reference in New Issue
Block a user