mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Added .exprtoggleglobal / .extg which can be used to toggle usage of global expressions on the server
This commit is contained in:
28
src/NadekoBot/Modules/Expressions/ExportedExpr.cs
Normal file
28
src/NadekoBot/Modules/Expressions/ExportedExpr.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
#nullable disable
|
||||
using Nadeko.Common;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.NadekoExpressions;
|
||||
|
||||
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(NadekoExpression 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()
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user