mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Fixed around 140 wrong namings and other refactorings which were marked as warnings
This commit is contained in:
@@ -63,7 +63,7 @@ namespace NadekoBot.Modules.Administration
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public partial Task DeleteWaifus()
|
||||
=> SqlExec(DangerousCommandsService.WaifusDeleteSql);
|
||||
=> SqlExec(DangerousCommandsService.WAIFUS_DELETE_SQL);
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
@@ -73,22 +73,22 @@ namespace NadekoBot.Modules.Administration
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public partial Task DeleteWaifu(ulong userId)
|
||||
=> InternalExecSql(DangerousCommandsService.WaifuDeleteSql, userId);
|
||||
=> InternalExecSql(DangerousCommandsService.WAIFU_DELETE_SQL, userId);
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public partial Task DeleteCurrency()
|
||||
=> SqlExec(DangerousCommandsService.CurrencyDeleteSql);
|
||||
=> SqlExec(DangerousCommandsService.CURRENCY_DELETE_SQL);
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public partial Task DeletePlaylists()
|
||||
=> SqlExec(DangerousCommandsService.MusicPlaylistDeleteSql);
|
||||
=> SqlExec(DangerousCommandsService.MUSIC_PLAYLIST_DELETE_SQL);
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public partial Task DeleteXp()
|
||||
=> SqlExec(DangerousCommandsService.XpDeleteSql);
|
||||
=> SqlExec(DangerousCommandsService.XP_DELETE_SQL);
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
|
@@ -8,22 +8,22 @@ namespace NadekoBot.Modules.Administration.Services;
|
||||
|
||||
public class DangerousCommandsService : INService
|
||||
{
|
||||
public const string WaifusDeleteSql = @"DELETE FROM WaifuUpdates;
|
||||
public const string WAIFUS_DELETE_SQL = @"DELETE FROM WaifuUpdates;
|
||||
DELETE FROM WaifuItem;
|
||||
DELETE FROM WaifuInfo;";
|
||||
|
||||
public const string WaifuDeleteSql =
|
||||
public const string WAIFU_DELETE_SQL =
|
||||
@"DELETE FROM WaifuUpdates WHERE UserId=(SELECT Id FROM DiscordUser WHERE UserId={0});
|
||||
DELETE FROM WaifuItem WHERE WaifuInfoId=(SELECT Id FROM WaifuInfo WHERE WaifuId=(SELECT Id FROM DiscordUser WHERE UserId={0}));
|
||||
UPDATE WaifuInfo SET ClaimerId=NULL WHERE ClaimerId=(SELECT Id FROM DiscordUser WHERE UserId={0});
|
||||
DELETE FROM WaifuInfo WHERE WaifuId=(SELECT Id FROM DiscordUser WHERE UserId={0});";
|
||||
|
||||
public const string CurrencyDeleteSql =
|
||||
public const string CURRENCY_DELETE_SQL =
|
||||
"UPDATE DiscordUser SET CurrencyAmount=0; DELETE FROM CurrencyTransactions; DELETE FROM PlantedCurrency;";
|
||||
|
||||
public const string MusicPlaylistDeleteSql = "DELETE FROM MusicPlaylists;";
|
||||
public const string MUSIC_PLAYLIST_DELETE_SQL = "DELETE FROM MusicPlaylists;";
|
||||
|
||||
public const string XpDeleteSql = @"DELETE FROM UserXpStats;
|
||||
public const string XP_DELETE_SQL = @"DELETE FROM UserXpStats;
|
||||
UPDATE DiscordUser
|
||||
SET ClubId=NULL,
|
||||
IsClubAdmin=0,
|
||||
|
Reference in New Issue
Block a user