Skip to content

Commit

Permalink
feat: message content
Browse files Browse the repository at this point in the history
  • Loading branch information
LumiFae committed Jan 5, 2025
1 parent a42cb90 commit 0c8359b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DiscordLab.ModerationLogs/Handlers/DiscordBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void SendBanMessage([CanBeNull] string targetName, string targetId, strin
embed.AddField(Translation.Issuer, issuerName);
if (issuerId != null) embed.AddField(Translation.IssuerId, issuerId);
embed.AddField(Translation.Duration, duration);
channel.SendMessageAsync(embed: embed.Build());
channel.SendMessageAsync(Translation.PlayerBannedContent, embed: embed.Build());
}

public void SendUnbanMessage(string targetId)
Expand All @@ -151,7 +151,7 @@ public void SendUnbanMessage(string targetId)
embed.WithTitle(Translation.PlayerUnbanned);
embed.WithColor(Plugin.GetColor(Plugin.Instance.Config.UnbanColor));
embed.AddField(Translation.PlayerId, targetId);
channel.SendMessageAsync(embed: embed.Build());
channel.SendMessageAsync(Translation.PlayerUnbannedContent, embed: embed.Build());
}
}
}
6 changes: 3 additions & 3 deletions DiscordLab.ModerationLogs/Handlers/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private void OnKicking(KickingEventArgs ev)
embed.AddField(Translation.Reason, ev.Reason);
embed.AddField(Translation.Issuer, ev.Player.Nickname);
embed.AddField(Translation.IssuerId, ev.Player.UserId);
channel.SendMessageAsync(embed: embed.Build());
channel.SendMessageAsync(Translation.PlayerKickedContent, embed: embed.Build());
}

private void OnIssuingMute(IssuingMuteEventArgs ev)
Expand All @@ -112,7 +112,7 @@ private void OnIssuingMute(IssuingMuteEventArgs ev)
embed.AddField(Translation.PlayerId, ev.Player.UserId);
embed.AddField(Translation.Issuer, ev.Player.Nickname);
embed.AddField(Translation.IssuerId, ev.Player.UserId);
channel.SendMessageAsync(embed: embed.Build());
channel.SendMessageAsync(Translation.PlayerMutedContent, embed: embed.Build());
}

private void OnIssuingUnmute(RevokingMuteEventArgs ev)
Expand All @@ -133,7 +133,7 @@ private void OnIssuingUnmute(RevokingMuteEventArgs ev)
embed.AddField(Translation.PlayerId, ev.Player.UserId);
embed.AddField(Translation.Issuer, ev.Player.Nickname);
embed.AddField(Translation.IssuerId, ev.Player.UserId);
channel.SendMessageAsync(embed: embed.Build());
channel.SendMessageAsync(Translation.PlayerMuteRevokedContent, embed: embed.Build());
}

private void OnSendingAdminChatMessage(SendingAdminChatMessageEventsArgs ev)
Expand Down
15 changes: 14 additions & 1 deletion DiscordLab.ModerationLogs/Translation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Exiled.API.Interfaces;
using System.ComponentModel;
using Exiled.API.Interfaces;

namespace DiscordLab.ModerationLogs
{
Expand All @@ -14,11 +15,23 @@ public class Translation : ITranslation
public string Reporter { get; set; } = "Reporter";
public string ReporterId { get; set; } = "Reporter ID";
public string Duration { get; set; } = "Duration";
[Description("What will show as the message content for when a player is banned")]
public string PlayerBannedContent { get; set; } = string.Empty;
public string PlayerBanned { get; set; } = "Player banned";
[Description("What will show as the message content for when a player is reported")]
public string PlayerReportedContent { get; set; } = string.Empty;
public string PlayerReported { get; set; } = "Player reported";
[Description("What will show as the message content for when a player is kicked")]
public string PlayerKickedContent { get; set; } = string.Empty;
public string PlayerKicked { get; set; } = "Player kicked";
[Description("What will show as the message content for when a player is unbanned")]
public string PlayerUnbannedContent { get; set; } = string.Empty;
public string PlayerUnbanned { get; set; } = "Player unbanned";
[Description("What will show as the message content for when a player is muted")]
public string PlayerMutedContent { get; set; } = string.Empty;
public string PlayerMuted { get; set; } = "Player muted";
[Description("What will show as the message content for when a player is unmuted")]
public string PlayerMuteRevokedContent { get; set; } = string.Empty;
public string PlayerMuteRevoked { get; set; } = "Player mute revoked";
public string AdminChatMessage { get; set; } = "Admin chat message";
public string RemoteAdminCommand { get; set; } = "Remote admin command";
Expand Down

0 comments on commit 0c8359b

Please sign in to comment.