1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 08:51:12 +03:00

Change position of "Jump to ..." action for better consistency (#279)

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 <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2024-03-20 22:34:22 +05:00 committed by GitHub
parent 0a930dcab1
commit 5cc04e9cc3
Signed by: GitHub
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View file

@ -83,10 +83,11 @@ public class MessageDeletedResponder : IResponder<IMessageDelete>
Messages.Culture = GuildSettings.Language.Get(cfg); Messages.Culture = GuildSettings.Language.Get(cfg);
var builder = new StringBuilder().AppendLine( var builder = new StringBuilder()
string.Format(Messages.DescriptionActionJumpToChannel, .AppendLine(message.Content.InBlockCode())
Mention.Channel(gatewayEvent.ChannelID))) .AppendLine(
.AppendLine(message.Content.InBlockCode()); string.Format(Messages.DescriptionActionJumpToChannel, Mention.Channel(gatewayEvent.ChannelID))
);
var embed = new EmbedBuilder() var embed = new EmbedBuilder()
.WithSmallTitle( .WithSmallTitle(

View file

@ -101,10 +101,11 @@ public class MessageEditedResponder : IResponder<IMessageUpdate>
Messages.Culture = GuildSettings.Language.Get(cfg); Messages.Culture = GuildSettings.Language.Get(cfg);
var builder = new StringBuilder().AppendLine( var builder = new StringBuilder()
string.Format(Messages.DescriptionActionJumpToMessage, .AppendLine(diff.AsMarkdown())
$"https://discord.com/channels/{guildId}/{channelId}/{messageId}")) .AppendLine(string.Format(Messages.DescriptionActionJumpToMessage,
.AppendLine(diff.AsMarkdown()); $"https://discord.com/channels/{guildId}/{channelId}/{messageId}")
);
var embed = new EmbedBuilder() var embed = new EmbedBuilder()
.WithSmallTitle(string.Format(Messages.CachedMessageEdited, message.Author.GetTag()), message.Author) .WithSmallTitle(string.Format(Messages.CachedMessageEdited, message.Author.GetTag()), message.Author)