Commit f3ab43f 1 parent bb00220 commit f3ab43f Copy full SHA for f3ab43f
File tree 1 file changed +1
-19
lines changed
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(
36
36
[ RemainingText , Description ( "The text to send when the reminder triggers." ) ] string reminder
37
37
)
38
38
{
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 ) ;
57
40
if ( t <= DateTime . Now )
58
41
{
59
42
await ctx . RespondAsync ( $ "{ Program . cfgjson . Emoji . Error } Time can't be in the past!") ;
@@ -66,7 +49,6 @@ public async Task RemindMe(
66
49
return ;
67
50
}
68
51
#endif
69
-
70
52
string guildId ;
71
53
72
54
if ( ctx . Channel . IsPrivate )
You can’t perform that action at this time.
0 commit comments