Skip to content

Commit f3ab43f

Browse files
Revert PRs #238 and #240
This reverts commits bb00220 and 1e181de.
1 parent bb00220 commit f3ab43f

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

Commands/Reminders.cs

+1-19
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,7 @@ public async Task RemindMe(
3636
[RemainingText, Description("The text to send when the reminder triggers.")] string reminder
3737
)
3838
{
39-
string discordTimestampRegexExp = @"(?:<t:)?(\d+)(?::\w*>)?";
40-
Match matchesDiscordTimestamp = Regex.Match(timetoParse, discordTimestampRegexExp);
41-
42-
43-
DateTime t;
44-
if (matchesDiscordTimestamp.Success)
45-
{
46-
// parse as timestamp
47-
// Extract the Unix timestamp from the matched pattern
48-
long unixTimestamp = long.Parse(matchesDiscordTimestamp.Groups[1].Value);
49-
// Convert the Unix timestamp to a DateTime object
50-
t = DateTimeOffset.FromUnixTimeSeconds(unixTimestamp).DateTime;
51-
}
52-
else
53-
{
54-
t = HumanDateParser.HumanDateParser.Parse(timetoParse);
55-
}
56-
39+
DateTime t = HumanDateParser.HumanDateParser.Parse(timetoParse);
5740
if (t <= DateTime.Now)
5841
{
5942
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} Time can't be in the past!");
@@ -66,7 +49,6 @@ public async Task RemindMe(
6649
return;
6750
}
6851
#endif
69-
7052
string guildId;
7153

7254
if (ctx.Channel.IsPrivate)

0 commit comments

Comments
 (0)