elliebot/src/EllieBot/Modules/Expressions/ExportedExpr.cs
2024-06-18 23:50:22 +12:00

27 lines
No EOL
756 B
C#

#nullable disable
using EllieBot.Db.Models;
namespace EllieBot.Modules.EllieExpressions;
public class ExportedExpr
{
public string Res { get; set; }
public string Id { get; set; }
public bool Ad { get; set; }
public bool Dm { get; set; }
public bool At { get; set; }
public bool Ca { get; set; }
public string[] React;
public static ExportedExpr FromModel(EllieExpression cr)
=> new()
{
Res = cr.Response,
Id = ((kwum)cr.Id).ToString(),
Ad = cr.AutoDeleteTrigger,
At = cr.AllowTarget,
Ca = cr.ContainsAnywhere,
Dm = cr.DmResponse,
React = string.IsNullOrWhiteSpace(cr.Reactions) ? null : cr.GetReactions()
};
}