mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-25 07:24:14 +00:00
Use C#9 features
This commit is contained in:
@@ -44,7 +44,7 @@ namespace DiscordChatExporter.Cli.Commands.Base
|
||||
Description = "Format used when writing dates.")]
|
||||
public string DateFormat { get; set; } = "dd-MMM-yy hh:mm tt";
|
||||
|
||||
protected ChannelExporter GetChannelExporter() => new ChannelExporter(GetDiscordClient());
|
||||
protected ChannelExporter GetChannelExporter() => new(GetDiscordClient());
|
||||
|
||||
protected async ValueTask ExportAsync(IConsole console, Guild guild, Channel channel)
|
||||
{
|
||||
|
||||
@@ -17,14 +17,14 @@ namespace DiscordChatExporter.Cli.Commands.Base
|
||||
Description = "Authorize as a bot.")]
|
||||
public bool IsBotToken { get; set; }
|
||||
|
||||
protected AuthToken GetAuthToken() => new AuthToken(
|
||||
protected AuthToken GetAuthToken() => new(
|
||||
IsBotToken
|
||||
? AuthTokenType.Bot
|
||||
: AuthTokenType.User,
|
||||
TokenValue
|
||||
);
|
||||
|
||||
protected DiscordClient GetDiscordClient() => new DiscordClient(GetAuthToken());
|
||||
protected DiscordClient GetDiscordClient() => new(GetAuthToken());
|
||||
|
||||
public abstract ValueTask ExecuteAsync(IConsole console);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user