You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
606 B
16 lines
606 B
using System;
|
|
using DiscordChatExporter.Core.Discord.Data;
|
|
|
|
namespace DiscordChatExporter.Core.Exporting.Filtering;
|
|
|
|
internal class FromMessageFilter : MessageFilter
|
|
{
|
|
private readonly string _value;
|
|
|
|
public FromMessageFilter(string value) => _value = value;
|
|
|
|
public override bool IsMatch(Message message) =>
|
|
string.Equals(_value, message.Author.Name, StringComparison.OrdinalIgnoreCase) ||
|
|
string.Equals(_value, message.Author.FullName, StringComparison.OrdinalIgnoreCase) ||
|
|
string.Equals(_value, message.Author.Id.ToString(), StringComparison.OrdinalIgnoreCase);
|
|
} |