mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 18:28:27 -04:00
add: Added .cleanupguilddata command which will delete all guildconfigs, xp stats and other data related to any guild the bot is no longer in. This is a highly destructive and irreversible command.
dev: Added cascade deletes to any tables which have guildconfigs FK, as well as to some other missing places
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace NadekoBot.Modules.Administration.DangerousCommands;
|
||||
|
||||
public sealed class CleanupId
|
||||
{
|
||||
[Key]
|
||||
public ulong GuildId { get; set; }
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
namespace NadekoBot.Modules.Administration.DangerousCommands;
|
||||
|
||||
public interface ICleanupService
|
||||
{
|
||||
Task<KeepResult?> DeleteMissingGuildDataAsync();
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.Modules.Administration.DangerousCommands;
|
||||
|
||||
public sealed class KeepReport
|
||||
{
|
||||
public required int ShardId { get; init; }
|
||||
public required ulong[] GuildIds { get; init; }
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
namespace NadekoBot.Modules.Administration.DangerousCommands;
|
||||
|
||||
public sealed class KeepResult
|
||||
{
|
||||
public required int GuildCount { get; init; }
|
||||
}
|
Reference in New Issue
Block a user