mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Split dangerous commands into cleanup commands for each module they belong to
This commit is contained in:
11
src/Nadeko.Bot.Db/Models/anti/AntiAltSetting.cs
Normal file
11
src/Nadeko.Bot.Db/Models/anti/AntiAltSetting.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace NadekoBot.Services.Database.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; }
|
||||
}
|
20
src/Nadeko.Bot.Db/Models/anti/AntiRaidSetting.cs
Normal file
20
src/Nadeko.Bot.Db/Models/anti/AntiRaidSetting.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
#nullable disable
|
||||
namespace NadekoBot.Services.Database.Models;
|
||||
|
||||
|
||||
// todo db required, nullable?
|
||||
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/Nadeko.Bot.Db/Models/anti/AntiSpamIgnore.cs
Normal file
12
src/Nadeko.Bot.Db/Models/anti/AntiSpamIgnore.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace NadekoBot.Services.Database.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 : false;
|
||||
}
|
13
src/Nadeko.Bot.Db/Models/anti/AntiSpamSetting.cs
Normal file
13
src/Nadeko.Bot.Db/Models/anti/AntiSpamSetting.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace NadekoBot.Services.Database.Models;
|
||||
|
||||
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