add: Added .notify and migrations, added levelup and protection events for notify, removed xpnotify completely

This commit is contained in:
Kwoth
2024-12-05 14:35:42 +00:00
parent 0f240925e8
commit 0622236523
25 changed files with 625 additions and 244 deletions

View File

@@ -6,15 +6,17 @@ public class Notify
{
[Key]
public int Id { get; set; }
public ulong GuildId { get; set; }
public ulong ChannelId { get; set; }
public NotifyEvent Event { get; set; }
public NotifyType Type { get; set; }
[MaxLength(10_000)]
public string Message { get; set; } = string.Empty;
}
public enum NotifyEvent
public enum NotifyType
{
UserLevelUp
LevelUp = 0,
Protection = 1, Prot = 1,
}

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Db.Models;
namespace NadekoBot.Db.Models;
public enum XpNotificationLocation
{

View File

@@ -81,7 +81,7 @@ public abstract class NadekoContext : DbContext
e.HasAlternateKey(x => new
{
x.GuildId,
x.Event
Event = x.Type
});
});