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

Change audit output if a message was deleted because of '!clear' (#34)

This commit is contained in:
Macintxsh 2023-05-12 17:56:14 +03:00 committed by GitHub
parent b0fd49fea2
commit 02949656bf
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 3 deletions

View file

@ -23,7 +23,7 @@ public sealed class ClearCommand : ICommand {
foreach (var msg in msgArray.Where(m => !m.Author.IsBot)) foreach (var msg in msgArray.Where(m => !m.Author.IsBot))
cmd.Audit( cmd.Audit(
string.Format( string.Format(
Messages.CachedMessageDeleted, msg.Author.Mention, Messages.CachedMessageCleared, msg.Author.Mention,
Utils.MentionChannel(channel.Id), Utils.MentionChannel(channel.Id),
Utils.Wrap(msg.CleanContent)), false); Utils.Wrap(msg.CleanContent)), false);
} }

9
Messages.Designer.cs generated
View file

@ -1120,5 +1120,14 @@ namespace Boyfriend {
return ResourceManager.GetString("InvalidRemindIn", resourceCulture); return ResourceManager.GetString("InvalidRemindIn", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string similar to Deleted message using cleanup from {0} in channel {1}: {2}.
/// </summary>
internal static string CachedMessageCleared {
get {
return ResourceManager.GetString("CachedMessageCleared", resourceCulture);
}
}
} }
} }

View file

@ -123,6 +123,9 @@
<data name="CachedMessageDeleted" xml:space="preserve"> <data name="CachedMessageDeleted" xml:space="preserve">
<value>Deleted message from {0} in channel {1}: {2}</value> <value>Deleted message from {0} in channel {1}: {2}</value>
</data> </data>
<data name="CachedMessageCleared" xml:space="preserve">
<value>Cleared message from {0} in channel {1}: {2}</value>
</data>
<data name="CachedMessageEdited" xml:space="preserve"> <data name="CachedMessageEdited" xml:space="preserve">
<value>Edited message in channel {0}: {1} -&gt; {2}</value> <value>Edited message in channel {0}: {1} -&gt; {2}</value>
</data> </data>

View file

@ -123,6 +123,9 @@
<data name="CachedMessageDeleted" xml:space="preserve"> <data name="CachedMessageDeleted" xml:space="preserve">
<value>Удалено сообщение от {0} в канале {1}: {2}</value> <value>Удалено сообщение от {0} в канале {1}: {2}</value>
</data> </data>
<data name="CachedMessageCleared" xml:space="preserve">
<value>Очищено сообщение от {0} в канале {1}: {2}</value>
</data>
<data name="CachedMessageEdited" xml:space="preserve"> <data name="CachedMessageEdited" xml:space="preserve">
<value>Отредактировано сообщение в канале {0}: {1} -&gt; {2}</value> <value>Отредактировано сообщение в канале {0}: {1} -&gt; {2}</value>
</data> </data>

View file

@ -121,10 +121,13 @@
<value>{0}я родился!</value> <value>{0}я родился!</value>
</data> </data>
<data name="CachedMessageDeleted" xml:space="preserve"> <data name="CachedMessageDeleted" xml:space="preserve">
<value>вырезано {0} в канале {1}: {2}</value> <value>вырезано сообщение от {0} в канале {1}: {2}</value>
</data>
<data name="CachedMessageCleared" xml:space="preserve">
<value>вырезано сообщение (используя `!clear`) от {0} в канале {1}: {2}</value>
</data> </data>
<data name="CachedMessageEdited" xml:space="preserve"> <data name="CachedMessageEdited" xml:space="preserve">
<value>переделано {0}: {1} -&gt; {2}</value> <value>переделано сообщение от {0}: {1} -&gt; {2}</value>
</data> </data>
<data name="DefaultWelcomeMessage" xml:space="preserve"> <data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value> <value>{0}, добро пожаловать на сервер {1}</value>