From 9c590668df2666d865db890a4ad6480a2d1a0382 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 1 Jan 2022 16:25:00 +0100 Subject: [PATCH] Reorganizing module and submodule folders --- src/NadekoBot/Common/DownloadTracker.cs | 3 +++ .../Common/TypeReaders/BotCommandTypeReader.cs | 2 +- .../{Services => }/ImageOnlyChannelService.cs | 0 .../Modules/Administration/LocalizationCommands.cs | 4 ++-- .../Administration/{ => Prefix}/PrefixCommands.cs | 0 .../Administration/Protection/ProtectionCommands.cs | 1 - .../Administration/Protection/ProtectionService.cs | 7 +++---- .../{Common => Protection}/ProtectionStats.cs | 2 +- .../Administration/Protection/PunishQueueItem.cs | 2 +- .../{Common => Protection}/UserSpamStats.cs | 8 ++++---- .../ServerLog/ServerLogCommandService.cs | 1 - .../{Extensions => }/CustomReactionExtensions.cs | 2 +- .../Modules/CustomReactions/CustomReactions.cs | 1 - .../{Services => }/CustomReactionsService.cs | 3 +-- .../CustomReactions/{Common => }/ExportedExpr.cs | 0 .../Gambling/{Common => }/AnimalRacing/AnimalRace.cs | 0 .../{Services => AnimalRacing}/AnimalRaceService.cs | 0 .../{ => AnimalRacing}/AnimalRacingCommands.cs | 0 .../{Common => }/AnimalRacing/AnimalRacingUser.cs | 0 .../AnimalRacing/Exceptions/AlreadyJoinedException.cs | 0 .../Exceptions/AlreadyStartedException.cs | 0 .../Exceptions/AnimalRaceFullException.cs | 0 .../Exceptions/NotEnoughFundsException.cs | 0 .../Gambling/{Common => }/AnimalRacing/RaceOptions.cs | 0 .../Gambling/{ => BlackJack}/BlackJackCommands.cs | 0 .../{Services => BlackJack}/BlackJackService.cs | 0 .../{Common/Blackjack => BlackJack}/Blackjack.cs | 0 .../{Common/Blackjack => BlackJack}/Player.cs | 0 src/NadekoBot/Modules/Gambling/Common/Payout.cs | 8 -------- .../Gambling/{ => Connect4}/Connect4Commands.cs | 0 .../Gambling/{ => DiceRoll}/DiceRollCommands.cs | 0 .../Modules/Gambling/{ => Draw}/DrawCommands.cs | 0 .../Gambling/{ => Events}/CurrencyEventsCommands.cs | 0 .../{Services => Events}/CurrencyEventsService.cs | 0 .../Gambling/{Common => }/Events/EventOptions.cs | 0 .../Gambling/{Common => }/Events/GameStatusEvent.cs | 0 .../Gambling/{Common => }/Events/ICurrencyEvent.cs | 0 .../Gambling/{Common => }/Events/ReactionEvent.cs | 0 .../Gambling/{ => FlipCoin}/FlipCoinCommands.cs | 0 .../Gambling/{Services => }/GamblingConfigService.cs | 0 .../Gambling/{Services => }/GamblingService.cs | 0 .../Gambling/{ => PlantPick}/PlantAndPickCommands.cs | 1 - .../{Services => PlantPick}/PlantPickService.cs | 0 .../Gambling/{ => Raffle}/CurrencyRaffleCommands.cs | 0 .../Gambling/{Common => Raffle}/CurrencyRaffleGame.cs | 0 .../{Services => Raffle}/CurrencyRaffleService.cs | 0 .../Gambling/{Services => Shop}/IShopService.cs | 0 .../Modules/Gambling/{ => Shop}/ShopCommands.cs | 0 .../Gambling/{Services/Impl => Shop}/ShopService.cs | 0 .../Modules/Gambling/{ => Slot}/SlotCommands.cs | 0 .../Modules/Gambling/{Common => }/Slot/SlotGame.cs | 0 src/NadekoBot/Modules/Gambling/TestGamblingService.cs | 11 ----------- .../Gambling/{Services => }/VoteRewardService.cs | 0 .../{Common/Waifu => Waifus/Common}/AffinityTitle.cs | 0 .../{Common/Waifu => Waifus/Common}/ClaimTitle.cs | 0 .../{Common/Waifu => Waifus/Common}/DivorceResult.cs | 0 .../Waifu => Waifus/Common}/WaifuClaimResult.cs | 0 .../Gambling/{ => Waifus}/WaifuClaimCommands.cs | 0 .../Gambling/{Services => Waifus}/WaifuService.cs | 0 .../WheelOfFortune => Wheel}/WheelOfFortune.cs | 0 .../Gambling/{ => Wheel}/WheelOfFortuneCommands.cs | 0 .../Modules/Gambling/{Common => ~Shared}/BetRoll.cs | 0 .../Modules/Gambling/{Common => ~Shared}/Deck.cs | 0 .../Gambling/{Common => ~Shared}/GamblingConfig.cs | 0 .../Gambling/{Common => ~Shared}/GamblingError.cs | 0 .../{Common => ~Shared}/GamblingTopLevelModule.cs | 0 .../Gambling/{Common => ~Shared}/RollDuelGame.cs | 0 .../Gambling/{Common => ~Shared}/SlotResponse.cs | 0 src/NadekoBot/Modules/Utility/Utility.cs | 2 -- 69 files changed, 17 insertions(+), 41 deletions(-) rename src/NadekoBot/Modules/Administration/{Services => }/ImageOnlyChannelService.cs (100%) rename src/NadekoBot/Modules/Administration/{ => Prefix}/PrefixCommands.cs (100%) rename src/NadekoBot/Modules/Administration/{Common => Protection}/ProtectionStats.cs (95%) rename src/NadekoBot/Modules/Administration/{Common => Protection}/UserSpamStats.cs (87%) rename src/NadekoBot/Modules/CustomReactions/{Extensions => }/CustomReactionExtensions.cs (98%) rename src/NadekoBot/Modules/CustomReactions/{Services => }/CustomReactionsService.cs (99%) rename src/NadekoBot/Modules/CustomReactions/{Common => }/ExportedExpr.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/AnimalRace.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => AnimalRacing}/AnimalRaceService.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => AnimalRacing}/AnimalRacingCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/AnimalRacingUser.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/Exceptions/AlreadyJoinedException.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/Exceptions/AlreadyStartedException.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/Exceptions/AnimalRaceFullException.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/Exceptions/NotEnoughFundsException.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/AnimalRacing/RaceOptions.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => BlackJack}/BlackJackCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => BlackJack}/BlackJackService.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/Blackjack => BlackJack}/Blackjack.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/Blackjack => BlackJack}/Player.cs (100%) delete mode 100644 src/NadekoBot/Modules/Gambling/Common/Payout.cs rename src/NadekoBot/Modules/Gambling/{ => Connect4}/Connect4Commands.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => DiceRoll}/DiceRollCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Draw}/DrawCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Events}/CurrencyEventsCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => Events}/CurrencyEventsService.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/Events/EventOptions.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/Events/GameStatusEvent.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/Events/ICurrencyEvent.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/Events/ReactionEvent.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => FlipCoin}/FlipCoinCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => }/GamblingConfigService.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => }/GamblingService.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => PlantPick}/PlantAndPickCommands.cs (98%) rename src/NadekoBot/Modules/Gambling/{Services => PlantPick}/PlantPickService.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Raffle}/CurrencyRaffleCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => Raffle}/CurrencyRaffleGame.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => Raffle}/CurrencyRaffleService.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => Shop}/IShopService.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Shop}/ShopCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services/Impl => Shop}/ShopService.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Slot}/SlotCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => }/Slot/SlotGame.cs (100%) delete mode 100644 src/NadekoBot/Modules/Gambling/TestGamblingService.cs rename src/NadekoBot/Modules/Gambling/{Services => }/VoteRewardService.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/Waifu => Waifus/Common}/AffinityTitle.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/Waifu => Waifus/Common}/ClaimTitle.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/Waifu => Waifus/Common}/DivorceResult.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/Waifu => Waifus/Common}/WaifuClaimResult.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Waifus}/WaifuClaimCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Services => Waifus}/WaifuService.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common/WheelOfFortune => Wheel}/WheelOfFortune.cs (100%) rename src/NadekoBot/Modules/Gambling/{ => Wheel}/WheelOfFortuneCommands.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/BetRoll.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/Deck.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/GamblingConfig.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/GamblingError.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/GamblingTopLevelModule.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/RollDuelGame.cs (100%) rename src/NadekoBot/Modules/Gambling/{Common => ~Shared}/SlotResponse.cs (100%) diff --git a/src/NadekoBot/Common/DownloadTracker.cs b/src/NadekoBot/Common/DownloadTracker.cs index f0cd72a92..34a5b9213 100644 --- a/src/NadekoBot/Common/DownloadTracker.cs +++ b/src/NadekoBot/Common/DownloadTracker.cs @@ -13,6 +13,9 @@ public class DownloadTracker : INService /// Task representing download state public async Task EnsureUsersDownloadedAsync(IGuild guild) { +#if GLOBAL_NADEKO + return; +#endif await _downloadUsersSemaphore.WaitAsync(); try { diff --git a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs b/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs index 005d633dd..d24e16669 100644 --- a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs +++ b/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs @@ -1,5 +1,5 @@ #nullable disable -using NadekoBot.Modules.CustomReactions.Services; +using NadekoBot.Modules.CustomReactions; namespace NadekoBot.Common.TypeReaders; diff --git a/src/NadekoBot/Modules/Administration/Services/ImageOnlyChannelService.cs b/src/NadekoBot/Modules/Administration/ImageOnlyChannelService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/ImageOnlyChannelService.cs rename to src/NadekoBot/Modules/Administration/ImageOnlyChannelService.cs diff --git a/src/NadekoBot/Modules/Administration/LocalizationCommands.cs b/src/NadekoBot/Modules/Administration/LocalizationCommands.cs index f67628f04..b4b7e5805 100644 --- a/src/NadekoBot/Modules/Administration/LocalizationCommands.cs +++ b/src/NadekoBot/Modules/Administration/LocalizationCommands.cs @@ -8,7 +8,7 @@ public partial class Administration [Group] public partial class LocalizationCommands : NadekoSubmodule { - private static readonly IReadOnlyDictionary supportedLocales = new Dictionary + private static readonly IReadOnlyDictionary _supportedLocales = new Dictionary { { "ar", "العربية" }, { "zh-TW", "繁體中文, 台灣" }, @@ -113,7 +113,7 @@ public partial class Administration .WithOkColor() .WithTitle(GetText(strs.lang_list)) .WithDescription(string.Join("\n", - supportedLocales.Select( + _supportedLocales.Select( x => $"{Format.Code(x.Key),-10} => {x.Value}")))); } } diff --git a/src/NadekoBot/Modules/Administration/PrefixCommands.cs b/src/NadekoBot/Modules/Administration/Prefix/PrefixCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/PrefixCommands.cs rename to src/NadekoBot/Modules/Administration/Prefix/PrefixCommands.cs diff --git a/src/NadekoBot/Modules/Administration/Protection/ProtectionCommands.cs b/src/NadekoBot/Modules/Administration/Protection/ProtectionCommands.cs index 154f1867d..ed9c1892d 100644 --- a/src/NadekoBot/Modules/Administration/Protection/ProtectionCommands.cs +++ b/src/NadekoBot/Modules/Administration/Protection/ProtectionCommands.cs @@ -1,6 +1,5 @@ #nullable disable using NadekoBot.Common.TypeReaders.Models; -using NadekoBot.Modules.Administration.Common; using NadekoBot.Modules.Administration.Services; using NadekoBot.Services.Database.Models; diff --git a/src/NadekoBot/Modules/Administration/Protection/ProtectionService.cs b/src/NadekoBot/Modules/Administration/Protection/ProtectionService.cs index 711d01a7f..eee876447 100644 --- a/src/NadekoBot/Modules/Administration/Protection/ProtectionService.cs +++ b/src/NadekoBot/Modules/Administration/Protection/ProtectionService.cs @@ -1,7 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; using NadekoBot.Db; -using NadekoBot.Modules.Administration.Common; using NadekoBot.Services.Database.Models; using System.Threading.Channels; @@ -25,7 +24,7 @@ public class ProtectionService : INService private readonly DbService _db; private readonly UserPunishService _punishService; - private readonly Channel PunishUserQueue = + private readonly Channel _punishUserQueue = Channel.CreateUnbounded(new() { SingleReader = true, SingleWriter = false }); public ProtectionService( @@ -68,7 +67,7 @@ public class ProtectionService : INService { while (true) { - var item = await PunishUserQueue.Reader.ReadAsync(); + var item = await _punishUserQueue.Reader.ReadAsync(); var muteTime = item.MuteTime; var gu = item.User; @@ -253,7 +252,7 @@ public class ProtectionService : INService gus[0].Guild.Name); foreach (var gu in gus) - await PunishUserQueue.Writer.WriteAsync(new() + await _punishUserQueue.Writer.WriteAsync(new() { Action = action, Type = pt, diff --git a/src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs b/src/NadekoBot/Modules/Administration/Protection/ProtectionStats.cs similarity index 95% rename from src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs rename to src/NadekoBot/Modules/Administration/Protection/ProtectionStats.cs index 36761b502..a9444a404 100644 --- a/src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs +++ b/src/NadekoBot/Modules/Administration/Protection/ProtectionStats.cs @@ -1,7 +1,7 @@ #nullable disable using NadekoBot.Services.Database.Models; -namespace NadekoBot.Modules.Administration.Common; +namespace NadekoBot.Modules.Administration; public enum ProtectionType { diff --git a/src/NadekoBot/Modules/Administration/Protection/PunishQueueItem.cs b/src/NadekoBot/Modules/Administration/Protection/PunishQueueItem.cs index 97dcbe81e..3bfc43ba1 100644 --- a/src/NadekoBot/Modules/Administration/Protection/PunishQueueItem.cs +++ b/src/NadekoBot/Modules/Administration/Protection/PunishQueueItem.cs @@ -1,7 +1,7 @@ #nullable disable using NadekoBot.Services.Database.Models; -namespace NadekoBot.Modules.Administration.Common; +namespace NadekoBot.Modules.Administration; public class PunishQueueItem { diff --git a/src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs b/src/NadekoBot/Modules/Administration/Protection/UserSpamStats.cs similarity index 87% rename from src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs rename to src/NadekoBot/Modules/Administration/Protection/UserSpamStats.cs index 63661b3c4..f83f75bff 100644 --- a/src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs +++ b/src/NadekoBot/Modules/Administration/Protection/UserSpamStats.cs @@ -1,5 +1,5 @@ #nullable disable -namespace NadekoBot.Modules.Administration.Common; +namespace NadekoBot.Modules.Administration; public sealed class UserSpamStats : IDisposable { @@ -8,9 +8,9 @@ public sealed class UserSpamStats : IDisposable public string LastMessage { get; set; } - private ConcurrentQueue timers { get; } + private ConcurrentQueue timers; - private readonly object applyLock = new(); + private readonly object _applyLock = new(); public UserSpamStats(IUserMessage msg) { @@ -22,7 +22,7 @@ public sealed class UserSpamStats : IDisposable public void ApplyNextMessage(IUserMessage message) { - lock (applyLock) + lock (_applyLock) { var upperMsg = message.Content.ToUpperInvariant(); if (upperMsg != LastMessage || (string.IsNullOrWhiteSpace(upperMsg) && message.Attachments.Any())) diff --git a/src/NadekoBot/Modules/Administration/ServerLog/ServerLogCommandService.cs b/src/NadekoBot/Modules/Administration/ServerLog/ServerLogCommandService.cs index fe6d0cb70..c1474bd40 100644 --- a/src/NadekoBot/Modules/Administration/ServerLog/ServerLogCommandService.cs +++ b/src/NadekoBot/Modules/Administration/ServerLog/ServerLogCommandService.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using NadekoBot.Db; -using NadekoBot.Modules.Administration.Common; using NadekoBot.Modules.Administration.Services; using NadekoBot.Services.Database.Models; diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions/CustomReactionExtensions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactionExtensions.cs similarity index 98% rename from src/NadekoBot/Modules/CustomReactions/Extensions/CustomReactionExtensions.cs rename to src/NadekoBot/Modules/CustomReactions/CustomReactionExtensions.cs index b267455bf..cfebc9122 100644 --- a/src/NadekoBot/Modules/CustomReactions/Extensions/CustomReactionExtensions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactionExtensions.cs @@ -2,7 +2,7 @@ using NadekoBot.Services.Database.Models; using System.Runtime.CompilerServices; -namespace NadekoBot.Modules.CustomReactions.Extensions; +namespace NadekoBot.Modules.CustomReactions; public static class CustomReactionExtensions { diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index 1970ea000..c7f0f8827 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -1,5 +1,4 @@ #nullable disable -using NadekoBot.Modules.CustomReactions.Services; namespace NadekoBot.Modules.CustomReactions; diff --git a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactionsService.cs similarity index 99% rename from src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs rename to src/NadekoBot/Modules/CustomReactions/CustomReactionsService.cs index d4f65faa4..c04e564b6 100644 --- a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactionsService.cs @@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.Yml; using NadekoBot.Db; -using NadekoBot.Modules.CustomReactions.Extensions; using NadekoBot.Modules.Permissions.Common; using NadekoBot.Modules.Permissions.Services; using NadekoBot.Services.Database.Models; @@ -11,7 +10,7 @@ using System.Runtime.CompilerServices; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; -namespace NadekoBot.Modules.CustomReactions.Services; +namespace NadekoBot.Modules.CustomReactions; public sealed class CustomReactionsService : IEarlyBehavior, IReadyExecutor { diff --git a/src/NadekoBot/Modules/CustomReactions/Common/ExportedExpr.cs b/src/NadekoBot/Modules/CustomReactions/ExportedExpr.cs similarity index 100% rename from src/NadekoBot/Modules/CustomReactions/Common/ExportedExpr.cs rename to src/NadekoBot/Modules/CustomReactions/ExportedExpr.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRace.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRace.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/AnimalRaceService.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/AnimalRaceService.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/RaceOptions.cs b/src/NadekoBot/Modules/Gambling/AnimalRacing/RaceOptions.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/RaceOptions.cs rename to src/NadekoBot/Modules/Gambling/AnimalRacing/RaceOptions.cs diff --git a/src/NadekoBot/Modules/Gambling/BlackJackCommands.cs b/src/NadekoBot/Modules/Gambling/BlackJack/BlackJackCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/BlackJackCommands.cs rename to src/NadekoBot/Modules/Gambling/BlackJack/BlackJackCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/BlackJackService.cs b/src/NadekoBot/Modules/Gambling/BlackJack/BlackJackService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/BlackJackService.cs rename to src/NadekoBot/Modules/Gambling/BlackJack/BlackJackService.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Blackjack/Blackjack.cs b/src/NadekoBot/Modules/Gambling/BlackJack/Blackjack.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Blackjack/Blackjack.cs rename to src/NadekoBot/Modules/Gambling/BlackJack/Blackjack.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Blackjack/Player.cs b/src/NadekoBot/Modules/Gambling/BlackJack/Player.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Blackjack/Player.cs rename to src/NadekoBot/Modules/Gambling/BlackJack/Player.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Payout.cs b/src/NadekoBot/Modules/Gambling/Common/Payout.cs deleted file mode 100644 index 218e5ea1b..000000000 --- a/src/NadekoBot/Modules/Gambling/Common/Payout.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace NadekoBot.Modules.Gambling.Common; - -public class Payout -{ - public string User { get; set; } - public int Amount { get; set; } -} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Gambling/Connect4Commands.cs b/src/NadekoBot/Modules/Gambling/Connect4/Connect4Commands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Connect4Commands.cs rename to src/NadekoBot/Modules/Gambling/Connect4/Connect4Commands.cs diff --git a/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs b/src/NadekoBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/DiceRollCommands.cs rename to src/NadekoBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/DrawCommands.cs b/src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/DrawCommands.cs rename to src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs b/src/NadekoBot/Modules/Gambling/Events/CurrencyEventsCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs rename to src/NadekoBot/Modules/Gambling/Events/CurrencyEventsCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/CurrencyEventsService.cs b/src/NadekoBot/Modules/Gambling/Events/CurrencyEventsService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/CurrencyEventsService.cs rename to src/NadekoBot/Modules/Gambling/Events/CurrencyEventsService.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Events/EventOptions.cs b/src/NadekoBot/Modules/Gambling/Events/EventOptions.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Events/EventOptions.cs rename to src/NadekoBot/Modules/Gambling/Events/EventOptions.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Events/GameStatusEvent.cs b/src/NadekoBot/Modules/Gambling/Events/GameStatusEvent.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Events/GameStatusEvent.cs rename to src/NadekoBot/Modules/Gambling/Events/GameStatusEvent.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Events/ICurrencyEvent.cs b/src/NadekoBot/Modules/Gambling/Events/ICurrencyEvent.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Events/ICurrencyEvent.cs rename to src/NadekoBot/Modules/Gambling/Events/ICurrencyEvent.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Events/ReactionEvent.cs b/src/NadekoBot/Modules/Gambling/Events/ReactionEvent.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Events/ReactionEvent.cs rename to src/NadekoBot/Modules/Gambling/Events/ReactionEvent.cs diff --git a/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs b/src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs rename to src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/GamblingConfigService.cs b/src/NadekoBot/Modules/Gambling/GamblingConfigService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/GamblingConfigService.cs rename to src/NadekoBot/Modules/Gambling/GamblingConfigService.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/GamblingService.cs b/src/NadekoBot/Modules/Gambling/GamblingService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/GamblingService.cs rename to src/NadekoBot/Modules/Gambling/GamblingService.cs diff --git a/src/NadekoBot/Modules/Gambling/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/PlantAndPickCommands.cs rename to src/NadekoBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs index 8f298a3a3..56e86a336 100644 --- a/src/NadekoBot/Modules/Gambling/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs @@ -1,5 +1,4 @@ #nullable disable -using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Gambling.Common; using NadekoBot.Modules.Gambling.Services; diff --git a/src/NadekoBot/Modules/Gambling/Services/PlantPickService.cs b/src/NadekoBot/Modules/Gambling/PlantPick/PlantPickService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/PlantPickService.cs rename to src/NadekoBot/Modules/Gambling/PlantPick/PlantPickService.cs diff --git a/src/NadekoBot/Modules/Gambling/CurrencyRaffleCommands.cs b/src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/CurrencyRaffleCommands.cs rename to src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/CurrencyRaffleGame.cs b/src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/CurrencyRaffleGame.cs rename to src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/CurrencyRaffleService.cs b/src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/CurrencyRaffleService.cs rename to src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/IShopService.cs b/src/NadekoBot/Modules/Gambling/Shop/IShopService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/IShopService.cs rename to src/NadekoBot/Modules/Gambling/Shop/IShopService.cs diff --git a/src/NadekoBot/Modules/Gambling/ShopCommands.cs b/src/NadekoBot/Modules/Gambling/Shop/ShopCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/ShopCommands.cs rename to src/NadekoBot/Modules/Gambling/Shop/ShopCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/Impl/ShopService.cs b/src/NadekoBot/Modules/Gambling/Shop/ShopService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/Impl/ShopService.cs rename to src/NadekoBot/Modules/Gambling/Shop/ShopService.cs diff --git a/src/NadekoBot/Modules/Gambling/SlotCommands.cs b/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/SlotCommands.cs rename to src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Slot/SlotGame.cs b/src/NadekoBot/Modules/Gambling/Slot/SlotGame.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Slot/SlotGame.cs rename to src/NadekoBot/Modules/Gambling/Slot/SlotGame.cs diff --git a/src/NadekoBot/Modules/Gambling/TestGamblingService.cs b/src/NadekoBot/Modules/Gambling/TestGamblingService.cs deleted file mode 100644 index 23f368621..000000000 --- a/src/NadekoBot/Modules/Gambling/TestGamblingService.cs +++ /dev/null @@ -1,11 +0,0 @@ -#nullable disable -using Discord.Interactions; - -namespace NadekoBot.Modules.Gambling; - -public class TestGamblingService : InteractionModuleBase -{ - [SlashCommand("test", "uwu")] - public async Task Test(string input1, int input2) - => await RespondAsync("Bravo " + input1 + input2); -} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Gambling/Services/VoteRewardService.cs b/src/NadekoBot/Modules/Gambling/VoteRewardService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/VoteRewardService.cs rename to src/NadekoBot/Modules/Gambling/VoteRewardService.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Waifu/AffinityTitle.cs b/src/NadekoBot/Modules/Gambling/Waifus/Common/AffinityTitle.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Waifu/AffinityTitle.cs rename to src/NadekoBot/Modules/Gambling/Waifus/Common/AffinityTitle.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Waifu/ClaimTitle.cs b/src/NadekoBot/Modules/Gambling/Waifus/Common/ClaimTitle.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Waifu/ClaimTitle.cs rename to src/NadekoBot/Modules/Gambling/Waifus/Common/ClaimTitle.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Waifu/DivorceResult.cs b/src/NadekoBot/Modules/Gambling/Waifus/Common/DivorceResult.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Waifu/DivorceResult.cs rename to src/NadekoBot/Modules/Gambling/Waifus/Common/DivorceResult.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Waifu/WaifuClaimResult.cs b/src/NadekoBot/Modules/Gambling/Waifus/Common/WaifuClaimResult.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Waifu/WaifuClaimResult.cs rename to src/NadekoBot/Modules/Gambling/Waifus/Common/WaifuClaimResult.cs diff --git a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs b/src/NadekoBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs rename to src/NadekoBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Services/WaifuService.cs b/src/NadekoBot/Modules/Gambling/Waifus/WaifuService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Services/WaifuService.cs rename to src/NadekoBot/Modules/Gambling/Waifus/WaifuService.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs b/src/NadekoBot/Modules/Gambling/Wheel/WheelOfFortune.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs rename to src/NadekoBot/Modules/Gambling/Wheel/WheelOfFortune.cs diff --git a/src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs b/src/NadekoBot/Modules/Gambling/Wheel/WheelOfFortuneCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs rename to src/NadekoBot/Modules/Gambling/Wheel/WheelOfFortuneCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/BetRoll.cs b/src/NadekoBot/Modules/Gambling/~Shared/BetRoll.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/BetRoll.cs rename to src/NadekoBot/Modules/Gambling/~Shared/BetRoll.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Deck.cs b/src/NadekoBot/Modules/Gambling/~Shared/Deck.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Deck.cs rename to src/NadekoBot/Modules/Gambling/~Shared/Deck.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/GamblingConfig.cs b/src/NadekoBot/Modules/Gambling/~Shared/GamblingConfig.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/GamblingConfig.cs rename to src/NadekoBot/Modules/Gambling/~Shared/GamblingConfig.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/GamblingError.cs b/src/NadekoBot/Modules/Gambling/~Shared/GamblingError.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/GamblingError.cs rename to src/NadekoBot/Modules/Gambling/~Shared/GamblingError.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/GamblingTopLevelModule.cs b/src/NadekoBot/Modules/Gambling/~Shared/GamblingTopLevelModule.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/GamblingTopLevelModule.cs rename to src/NadekoBot/Modules/Gambling/~Shared/GamblingTopLevelModule.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/RollDuelGame.cs b/src/NadekoBot/Modules/Gambling/~Shared/RollDuelGame.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/RollDuelGame.cs rename to src/NadekoBot/Modules/Gambling/~Shared/RollDuelGame.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/SlotResponse.cs b/src/NadekoBot/Modules/Gambling/~Shared/SlotResponse.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/SlotResponse.cs rename to src/NadekoBot/Modules/Gambling/~Shared/SlotResponse.cs diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index ad33ec9dc..45ab7dc9b 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -117,9 +117,7 @@ public partial class Utility : NadekoModule await _tracker.EnsureUsersDownloadedAsync(ctx.Guild); var users = await ctx.Guild.GetUsersAsync( -#if GLOBAL_NADEKO CacheMode.CacheOnly -#endif ); var roleUsers = users.Where(u => role is null ? u.RoleIds.Count == 1 : u.RoleIds.Contains(role.Id))