mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Restructured the project structure back to the way it was, there's no reasonable way to split the modules
This commit is contained in:
11
src/NadekoBot/Db/Models/anti/AntiAltSetting.cs
Normal file
11
src/NadekoBot/Db/Models/anti/AntiAltSetting.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
public class AntiAltSetting
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int GuildConfigId { get; set; }
|
||||
public TimeSpan MinAge { get; set; }
|
||||
public PunishmentAction Action { get; set; }
|
||||
public int ActionDurationMinutes { get; set; }
|
||||
public ulong? RoleId { get; set; }
|
||||
}
|
19
src/NadekoBot/Db/Models/anti/AntiRaidSetting.cs
Normal file
19
src/NadekoBot/Db/Models/anti/AntiRaidSetting.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
#nullable disable
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
|
||||
public class AntiRaidSetting : DbEntity
|
||||
{
|
||||
public int GuildConfigId { get; set; }
|
||||
public GuildConfig GuildConfig { get; set; }
|
||||
|
||||
public int UserThreshold { get; set; }
|
||||
public int Seconds { get; set; }
|
||||
public PunishmentAction Action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Duration of the punishment, in minutes. This works only for supported Actions, like:
|
||||
/// Mute, Chatmute, Voicemute, etc...
|
||||
/// </summary>
|
||||
public int PunishDuration { get; set; }
|
||||
}
|
12
src/NadekoBot/Db/Models/anti/AntiSpamIgnore.cs
Normal file
12
src/NadekoBot/Db/Models/anti/AntiSpamIgnore.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
public class AntiSpamIgnore : DbEntity
|
||||
{
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
public override int GetHashCode()
|
||||
=> ChannelId.GetHashCode();
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
=> obj is AntiSpamIgnore inst && inst.ChannelId == ChannelId;
|
||||
}
|
14
src/NadekoBot/Db/Models/anti/AntiSpamSetting.cs
Normal file
14
src/NadekoBot/Db/Models/anti/AntiSpamSetting.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
#nullable disable
|
||||
public class AntiSpamSetting : DbEntity
|
||||
{
|
||||
public int GuildConfigId { get; set; }
|
||||
public GuildConfig GuildConfig { get; set; }
|
||||
|
||||
public PunishmentAction Action { get; set; }
|
||||
public int MessageThreshold { get; set; } = 3;
|
||||
public int MuteTime { get; set; }
|
||||
public ulong? RoleId { get; set; }
|
||||
public HashSet<AntiSpamIgnore> IgnoredChannels { get; set; } = new();
|
||||
}
|
Reference in New Issue
Block a user