forked from TeamInklings/Octobot
Change audit output if a message was deleted because of '!clear' (#34)
This commit is contained in:
parent
b0fd49fea2
commit
02949656bf
5 changed files with 21 additions and 3 deletions
|
@ -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
9
Messages.Designer.cs
generated
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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} -> {2}</value>
|
<value>Edited message in channel {0}: {1} -> {2}</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -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} -> {2}</value>
|
<value>Отредактировано сообщение в канале {0}: {1} -> {2}</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -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} -> {2}</value>
|
<value>переделано сообщение от {0}: {1} -> {2}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DefaultWelcomeMessage" xml:space="preserve">
|
<data name="DefaultWelcomeMessage" xml:space="preserve">
|
||||||
<value>{0}, добро пожаловать на сервер {1}</value>
|
<value>{0}, добро пожаловать на сервер {1}</value>
|
||||||
|
|
Reference in a new issue