mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
prevent pinging everyone
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user