Skip to content

Commit

Permalink
Change position of "Jump to ..." action for better consistency (#279)
Browse files Browse the repository at this point in the history
This will better align with how a normal moderator would respond to the
log:

Before: "see log" -> "jump to message without knowing what changed" ->
"read message diff"
After: "see log" -> "read message diff" -> "jump to message for context"

In addition, the change improves consistency with how reminders are
shown.

---------

Signed-off-by: Octol1ttle <[email protected]>
  • Loading branch information
Octol1ttle authored Mar 20, 2024
1 parent 0a930dc commit 5cc04e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/Responders/MessageDeletedResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ public async Task<Result> RespondAsync(IMessageDelete gatewayEvent, Cancellation

Messages.Culture = GuildSettings.Language.Get(cfg);

var builder = new StringBuilder().AppendLine(
string.Format(Messages.DescriptionActionJumpToChannel,
Mention.Channel(gatewayEvent.ChannelID)))
.AppendLine(message.Content.InBlockCode());
var builder = new StringBuilder()
.AppendLine(message.Content.InBlockCode())
.AppendLine(
string.Format(Messages.DescriptionActionJumpToChannel, Mention.Channel(gatewayEvent.ChannelID))
);

var embed = new EmbedBuilder()
.WithSmallTitle(
Expand Down
9 changes: 5 additions & 4 deletions src/Responders/MessageEditedResponder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ public async Task<Result> RespondAsync(IMessageUpdate gatewayEvent, Cancellation

Messages.Culture = GuildSettings.Language.Get(cfg);

var builder = new StringBuilder().AppendLine(
string.Format(Messages.DescriptionActionJumpToMessage,
$"https://discord.com/channels/{guildId}/{channelId}/{messageId}"))
.AppendLine(diff.AsMarkdown());
var builder = new StringBuilder()
.AppendLine(diff.AsMarkdown())
.AppendLine(string.Format(Messages.DescriptionActionJumpToMessage,
$"https://discord.com/channels/{guildId}/{channelId}/{messageId}")
);

var embed = new EmbedBuilder()
.WithSmallTitle(string.Format(Messages.CachedMessageEdited, message.Author.GetTag()), message.Author)
Expand Down

0 comments on commit 5cc04e9

Please sign in to comment.