prevent pinging everyone

This commit is contained in:
13xforever
2020-07-31 22:52:33 +05:00
parent 368b5a7d21
commit c2ae683434
3 changed files with 6 additions and 4 deletions

View File

@@ -84,6 +84,8 @@ namespace CompatBot
public static double GameTitleMatchThreshold => config.GetValue(nameof(GameTitleMatchThreshold), 0.57);
public static byte[] CryptoSalt => Convert.FromBase64String(config.GetValue(nameof(CryptoSalt), ""));
internal static readonly IMention[] AllowedMentions = { UserMention.All };
internal static string CurrentLogPath => Path.GetFullPath(Path.Combine(LogPath, "bot.log"));
public static string GoogleApiConfigPath

View File

@@ -58,11 +58,11 @@ namespace CompatBot.EventHandlers
await postLock.WaitAsync().ConfigureAwait(false);
try
{
await logChannel.SendMessageAsync(embed: embed).ConfigureAwait(false);
await logChannel.SendMessageAsync(embed: embed, mentions: Config.AllowedMentions).ConfigureAwait(false);
if (attachmentContent?.Count > 0)
await logChannel.SendMultipleFilesAsync(attachmentContent, msg.Content).ConfigureAwait(false);
await logChannel.SendMultipleFilesAsync(attachmentContent, msg.Content, mentions: Config.AllowedMentions).ConfigureAwait(false);
else if (!string.IsNullOrEmpty(msg.Content))
await logChannel.SendMessageAsync(msg.Content).ConfigureAwait(false);
await logChannel.SendMessageAsync(msg.Content, mentions: Config.AllowedMentions).ConfigureAwait(false);
}
finally
{

View File

@@ -57,7 +57,7 @@ namespace CompatBot.EventHandlers
{
Throttling.Set(args.Channel.Id, similarList, ThrottleDuration);
var msgContent = GetAvgContent(similarList.Select(m => m.Content).ToList());
var botMsg = await args.Channel.SendMessageAsync(msgContent).ConfigureAwait(false);
var botMsg = await args.Channel.SendMessageAsync(msgContent, mentions: Config.AllowedMentions).ConfigureAwait(false);
similarList.Add(botMsg);
}
else