File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments