Skip to content

Commit

Permalink
Fix parameterless primbon command
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnygunawan committed Jan 1, 2024
1 parent f603d8c commit 14ec51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BotNet.Commands/Primbon/PrimbonCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static PrimbonCommand FromSlashCommand(SlashCommand slashCommand) {
} else if (arg is "lusa") {
DateTime datetime = DateTimeOffset.Now.ToOffset(TimeSpan.FromHours(7)).Date.AddDays(2);
date = new(datetime.Year, datetime.Month, datetime.Day);
} else if (arg is not null) {
} else if (!string.IsNullOrWhiteSpace(arg)) {
if (!DateOnly.TryParseExact(arg, "d-M-yyyy", out date)
&& !DateOnly.TryParseExact(arg, "yyyy-M-d", out date)
&& !DateOnly.TryParseExact(arg, "d/M/yyyy", out date)
Expand Down

0 comments on commit 14ec51d

Please sign in to comment.