Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TimeZoneBot.BusinessLayer/TimeHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static Emote GetTimeButtonEmote()

public static string BuildSpecificTimeMessage(LocalTime time, string specifiedTime, IUser user)
{
return $"At _{specifiedTime}_ your time, it will be **{FormatTime(time)}** in {user.Username}'s time.";
return $"At `{specifiedTime}` your time, it will be **{FormatTime(time)}** in {user.Username}'s time.";
}

public static string BuildTimeMessage(ZonedDateTime time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ public Task Handle(MessageReceivedNotification notification, CancellationToken c
_ = Task.Run(async () =>
{
var message = notification.Message;

if (message.Author.IsBot)
{
return Task.CompletedTask;
}

var regex = new Regex(TimeHelpers.TimeRegexPattern);
var regex = new Regex(TimeHelpers.TimeRegexPattern, RegexOptions.IgnoreCase);
var match = regex.IsMatch(message.Content);

if (!match)
{
return Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Task Handle(ReactionAddedNotification notification, CancellationToken can
return Task.CompletedTask;
}

var regex = new Regex(TimeHelpers.TimeRegexPattern);
var regex = new Regex(TimeHelpers.TimeRegexPattern, RegexOptions.IgnoreCase);

var message = await notification.Message.GetOrDownloadAsync();

Expand Down
2 changes: 1 addition & 1 deletion TimeZoneBot/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Version": {
"VersionNumber": "7.0.1"
"VersionNumber": "7.0.2"
},
"Discord": {
"BotToken": "token",
Expand Down