mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-04-17 20:30:05 +00:00
19 lines
610 B
C#
19 lines
610 B
C#
using CompatBot.Database;
|
|
|
|
namespace CompatBot.Utils;
|
|
|
|
internal static class BotDbExtensions
|
|
{
|
|
public static bool IsComplete(this EventSchedule evt)
|
|
=> evt is { Start: > 0, Year: > 0, Name.Length: >0 }
|
|
&& evt.End > evt.Start;
|
|
|
|
public static bool IsComplete(this Piracystring filter)
|
|
{
|
|
var result = filter.Actions != 0
|
|
&& filter.String.Length >= Config.MinimumPiracyTriggerLength;
|
|
if (result && filter.Actions.HasFlag(FilterAction.ShowExplain))
|
|
result = !string.IsNullOrEmpty(filter.ExplainTerm);
|
|
return result;
|
|
}
|
|
} |