mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Killed history
This commit is contained in:
47
NadekoBot.Core/Services/Database/Models/CustomReaction.cs
Normal file
47
NadekoBot.Core/Services/Database/Models/CustomReaction.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace NadekoBot.Core.Services.Database.Models
|
||||
{
|
||||
public class CustomReaction : DbEntity
|
||||
{
|
||||
#region Unused
|
||||
|
||||
[Obsolete]
|
||||
[NotMapped]
|
||||
public Regex Regex { get; set; }
|
||||
[Obsolete]
|
||||
public ulong UseCount { get; set; }
|
||||
[Obsolete]
|
||||
public bool IsRegex { get; set; }
|
||||
[Obsolete]
|
||||
public bool OwnerOnly { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public ulong? GuildId { get; set; }
|
||||
public string Response { get; set; }
|
||||
public string Trigger { get; set; }
|
||||
|
||||
public bool AutoDeleteTrigger { get; set; }
|
||||
public bool DmResponse { get; set; }
|
||||
public bool ContainsAnywhere { get; set; }
|
||||
public bool AllowTarget { get; set; }
|
||||
public string Reactions { get; set; }
|
||||
|
||||
public string[] GetReactions() =>
|
||||
string.IsNullOrWhiteSpace(Reactions)
|
||||
? Array.Empty<string>()
|
||||
: Reactions.Split("@@@");
|
||||
|
||||
public bool IsGlobal() => GuildId is null || GuildId == 0;
|
||||
}
|
||||
|
||||
public class ReactionResponse : DbEntity
|
||||
{
|
||||
public bool OwnerOnly { get; set; }
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user