From 09171fb10a2b384b1e8754e5ba3bdb27706eda70 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 18 Mar 2023 18:36:04 +0100 Subject: [PATCH] Gambling moved to a separate project. Project builds --- NadekoBot.sln | 18 +-- .../Abstractions/creds/IBotCredentials.cs | 12 +- .../Attributes/AliasesAttribute.cs | 0 .../Attributes/CmdAttribute.cs | 0 .../Attributes/DIIgnoreAttribute.cs | 0 .../Attributes/NadekoOptionsAttribute.cs | 0 .../Attributes/NoPublicBotAttribute.cs | 0 .../Attributes/OnlyPublicBotAttribute.cs | 0 .../Attributes/OwnerOnlyAttribute.cs | 0 .../Attributes/RatelimitAttribute.cs | 0 .../Attributes/UserPermAttribute.cs | 3 +- .../BotCommandTypeReader.cs | 6 +- .../CleverBotResponseStr.cs | 0 .../CommandNameLoadHelper.cs | 0 .../Common/AddRemove.cs | 0 .../Common/CmdStrings.cs | 0 .../Common/CommandData.cs | 0 .../Common/DownloadTracker.cs | 0 .../Common/Helpers.cs | 0 .../Common/ImageUrls.cs | 0 .../JsonConverters/CultureInfoConverter.cs | 0 .../Common/JsonConverters/Rgba32Converter.cs | 0 .../Common/LbOpts.cs | 0 .../Common/Linq2DbExpressions.cs | 0 .../Common/LoginErrorHandler.cs | 0 .../Common/OldCreds.cs | 0 .../Common/OptionsParser.cs | 0 .../Common/OsuMapData.cs | 0 .../Common/OsuUserBets.cs | 0 .../Common/Pokemon/PokemonNameId.cs | 0 .../Common/Pokemon/SearchPokemon.cs | 0 .../Common/Pokemon/SearchPokemonAbility.cs | 0 ...RequireObjectPropertiesContractResolver.cs | 0 .../Common}/TriviaQuestionModel.cs | 0 .../Common/TypeReaders/EmoteTypeReader.cs | 0 .../Common/TypeReaders/GuildTypeReader.cs | 0 .../Common/TypeReaders/GuildUserTypeReader.cs | 64 ++++----- .../Common/TypeReaders/KwumTypeReader.cs | 0 .../TypeReaders/Models/PermissionAction.cs | 0 .../Common/TypeReaders/Models/StoopidTime.cs | 0 .../Common/TypeReaders/ModuleTypeReader.cs | 0 .../TypeReaders/PermissionActionTypeReader.cs | 0 .../Common/TypeReaders/Rgba32TypeReader.cs | 0 .../TypeReaders/StoopidTimeTypeReader.cs | 0 .../Common => Nadeko.Bot.Common}/Creds.cs | 10 +- .../Currency/CurrencyType.cs | 0 .../Currency/ICurrencyService.cs | 0 .../Currency/ITxTracker.cs | 0 .../Currency/IWallet.cs | 0 .../Currency/TxData.cs | 0 src/Nadeko.Bot.Common/GlobalUsings.cs | 15 ++- src/Nadeko.Bot.Common/IBot.cs | 12 ++ src/Nadeko.Bot.Common/ICurrencyProvider.cs | 6 + .../IDiscordPermOverrideService.cs | 7 + .../INadekoCommandOptions.cs | 0 src/Nadeko.Bot.Common/IPermissionChecker.cs | 15 +++ .../Nadeko.Bot.Common.csproj | 7 +- .../NadekoTypeReader.cs | 0 .../Patronage/FeatureLimitKey.cs | 7 + .../Patronage/FeatureQuotaStats.cs | 0 .../Patronage}/IPatronData.cs | 0 .../Patronage}/IPatronageService.cs | 0 .../Patronage}/ISubscriptionHandler.cs | 0 .../Patronage/Patron.cs | 0 .../Patronage}/PatronConfigData.cs | 0 .../Patronage/PatronExtensions.cs | 6 - .../Patronage}/PatronTier.cs | 0 .../Patronage/QuotaLimit.cs | 0 .../Patronage}/QuotaPer.cs | 0 .../Patronage/SubscriptionChargeStatus.cs | 0 .../Patronage/UserQuotaStats.cs | 0 .../Services/CommandHandler.cs | 4 +- .../Services/Currency/CurrencyService.cs | 0 .../Currency/CurrencyServiceExtensions.cs | 0 .../Services/Currency/DefaultWallet.cs | 0 .../Services/Currency/GamblingTxTracker.cs | 0 .../Services/ILocalDataCache.cs | 0 .../Services/IRemindService.cs | 12 ++ .../Services/IStatsService.cs | 5 - .../Services/Impl/FontProvider.cs | 0 .../Services/Impl/IImageCache.cs | 17 +++ .../Services/Impl/ImagesConfig.cs | 19 +++ .../Services/Impl/RedisImageExtensions.cs | 0 .../Services/Impl/SingleProcessCoordinator.cs | 0 .../Impl/StartingGuildsListService.cs | 0 .../Services/Impl/YtdlOperation.cs | 0 .../Services/strings/impl/BotStrings.cs | 0 .../strings/impl/LocalFileStringsSource.cs | 0 .../strings/impl/MemoryBotStringsProvider.cs | 0 .../TypeReaderResult.cs | 0 .../_Extensions/Extensions.cs | 21 ++- .../data/last_known_version.txt | 1 - .../NorthShirahebi/NorthShirahebi.deps.json | 115 ----------------- .../medusae/NorthShirahebi/NorthShirahebi.dll | Bin 30208 -> 0 bytes .../NorthShirahebi.runtimeconfig.json | 10 -- .../data/medusae/NorthShirahebi/cmds.yml | 70 ---------- .../data/medusae/NorthShirahebi/res.yml | 1 - src/Nadeko.Bot.Common/data/medusae/medusa.yml | 5 - .../Extensions/GuildConfigExtensions.cs | 2 +- .../ExportedExpr.cs | 0 .../ExprField.cs | 0 .../GlobalUsings.cs | 6 +- .../Nadeko.Bot.Modules.Expresssions.csproj} | 1 + .../NadekoExpressionExtensions.cs | 0 .../NadekoExpressions.cs | 2 + .../NadekoExpressionsService.cs | 121 ++++++++++-------- .../TypeReaders/CommandOrExprTypeReader.cs | 7 +- .../Gambling/AnimalRacing/AnimalRace.cs | 0 .../AnimalRacing/AnimalRaceService.cs | 0 .../AnimalRacing/AnimalRacingCommands.cs | 0 .../Gambling/AnimalRacing/AnimalRacingUser.cs | 0 .../Exceptions/AlreadyJoinedException.cs | 0 .../Exceptions/AlreadyStartedException.cs | 0 .../Exceptions/AnimalRaceFullException.cs | 0 .../Exceptions/NotEnoughFundsException.cs | 0 .../Gambling/AnimalRacing/RaceOptions.cs | 0 .../Gambling/Bank/BankCommands.cs | 0 .../Gambling/Bank/BankService.cs | 0 .../Gambling/Bank/IBankService.cs | 0 .../Gambling/BlackJack/BlackJackCommands.cs | 0 .../Gambling/BlackJack/BlackJackService.cs | 0 .../Gambling/BlackJack/Blackjack.cs | 0 .../Gambling/BlackJack/Player.cs | 0 .../Gambling/Connect4/Connect4.cs | 0 .../Gambling/Connect4/Connect4Commands.cs | 0 .../Gambling/DiceRoll/DiceRollCommands.cs | 2 +- .../Gambling/Draw/DrawCommands.cs | 0 .../Gambling/EconomyResult.cs | 0 .../Gambling/Events/CurrencyEventsCommands.cs | 0 .../Gambling/Events/CurrencyEventsService.cs | 0 .../Gambling/Events/EventOptions.cs | 0 .../Gambling/Events/GameStatusEvent.cs | 0 .../Gambling/Events/ICurrencyEvent.cs | 0 .../Gambling/Events/ReactionEvent.cs | 0 .../Gambling/FlipCoin/FlipCoinCommands.cs | 0 .../Gambling/FlipCoin/FlipResult.cs | 0 .../Gambling/Gambling.cs | 4 +- .../Gambling/GamblingConfig.cs | 0 .../Gambling/GamblingConfigService.cs | 2 + .../Gambling/GamblingService.cs | 8 +- .../Gambling/GamblingTopLevelModule.cs | 2 + .../Gambling/GlobalUsings.cs | 31 +++++ .../Gambling/InputRpsPick.cs | 0 .../PlantPick/PlantAndPickCommands.cs | 0 .../Gambling/PlantPick/PlantPickService.cs | 0 .../Gambling/Raffle/CurrencyRaffleCommands.cs | 0 .../Gambling/Raffle/CurrencyRaffleGame.cs | 0 .../Gambling/Raffle/CurrencyRaffleService.cs | 0 .../Gambling/Shop/IShopService.cs | 0 .../Gambling/Shop/ShopCommands.cs | 0 .../Gambling/Shop/ShopService.cs | 0 .../Gambling/Slot/SlotCommands.cs | 2 +- .../Gambling/VoteRewardService.cs | 3 + .../Gambling/Waifus/Common/AffinityTitle.cs | 0 .../Gambling/Waifus/Common/ClaimTitle.cs | 0 .../Gambling/Waifus/Common/DivorceResult.cs | 0 .../Gambling/Waifus/Common/Extensions.cs | 0 .../Waifus/Common/WaifuClaimResult.cs | 0 .../Gambling/Waifus/WaifuClaimCommands.cs | 0 .../Gambling/Waifus/WaifuService.cs | 0 .../Gambling/_Common}/Decks/QuadDeck.cs | 0 .../Gambling/_Common}/IGamblingService.cs | 0 .../Gambling/_Common}/NewGamblingService.cs | 0 .../Gambling/_Common}/RollDuelGame.cs | 0 .../BaseShmartInputAmountReader.cs | 0 .../ShmartBankInputAmountReader.cs | 0 .../TypeReaders}/ShmartNumberTypeReader.cs | 0 .../Games/Acrophobia/Acrophobia.cs | 0 .../Games/Acrophobia/AcrophobiaUser.cs | 0 .../Games/Acrophobia/AcropobiaCommands.cs | 0 .../Games/ChatterBot/ChatterbotService.cs | 46 +++---- .../Games/ChatterBot/CleverBotCommands.cs | 0 .../ChatterBot/_Common/CleverbotResponse.cs | 0 .../Games/ChatterBot/_Common/Gpt3Response.cs | 0 .../ChatterBot/_Common/IChatterBotSession.cs | 0 .../_Common/OfficialCleverbotSession.cs | 0 .../ChatterBot/_Common/OfficialGpt3Session.cs | 0 .../Games/Games.cs | 0 .../Games/GamesConfig.cs | 0 .../Games/GamesConfigService.cs | 0 .../Games/GamesService.cs | 0 .../Games/GirlRating.cs | 0 .../Games/Hangman/DefaultHangmanSource.cs | 0 .../Games/Hangman/HangmanCommands.cs | 0 .../Games/Hangman/HangmanGame.cs | 5 +- .../Games/Hangman/HangmanService.cs | 0 .../Games/Hangman/HangmanTerm.cs | 0 .../Games/Hangman/IHangmanService.cs | 0 .../Games/Hangman/IHangmanSource.cs | 0 .../Games/Nunchi/Nunchi.cs | 0 .../Games/Nunchi/NunchiCommands.cs | 0 .../Games/Polls/PollCommands.cs | 0 .../Games/Polls/PollRunner.cs | 0 .../Games/Polls/PollService.cs | 0 .../Games/SpeedTyping/SpeedTypingCommands.cs | 0 .../Games/SpeedTyping/TypingArticle.cs | 0 .../Games/SpeedTyping/TypingGame.cs | 0 .../Games/TicTacToe/TicTacToe.cs | 0 .../Games/TicTacToe/TicTacToeCommands.cs | 0 .../Games/Trivia/Games.cs | 0 .../QuestionPool/DefaultQuestionPool.cs | 0 .../Trivia/QuestionPool/IQuestionPool.cs | 0 .../QuestionPool/PokemonQuestionPool.cs | 0 .../Games/Trivia/TriviaGame.cs | 0 .../Games/Trivia/TriviaGamesService.cs | 0 .../Games/Trivia/TriviaOptions.cs | 0 .../Games/Trivia/TriviaQuestion.cs | 0 .../Games/Trivia/TriviaUser.cs | 0 .../Nadeko.Bot.Modules.Gambling.csproj | 19 +++ src/NadekoBot/Bot.cs | 54 +++++--- .../Common/ServiceCollectionExtensions.cs | 16 +-- .../Medusa/Adapters/BehaviorAdapter.cs | 4 + .../Medusa/Adapters/ContextAdapterFactory.cs | 4 +- .../Medusa/Adapters/DmContextAdapter.cs | 4 + .../Medusa/Adapters/FilterAdapter.cs | 0 .../Medusa/Adapters/GuildContextAdapter.cs | 0 .../Medusa/Adapters/ParamParserAdapter.cs | 0 .../{Common => }/Medusa/CommandContextType.cs | 0 .../Medusa/Config/IMedusaConfigService.cs | 0 .../Medusa/Config/MedusaConfig.cs | 0 .../Medusa/Config/MedusaConfigService.cs | 0 .../Medusa/MedusaAssemblyLoadContext.cs | 0 .../Medusa/MedusaIoCKernelModule.cs | 0 .../Medusa/MedusaLoaderService.cs | 0 .../{Common => }/Medusa/Models/ParamData.cs | 0 .../Medusa/Models/ResolvedMedusa.cs | 0 .../Medusa/Models/SnekCommandData.cs | 0 .../{Common => }/Medusa/Models/SnekData.cs | 0 .../{Common => }/Medusa/RemovablePlanner.cs | 0 .../DiscordPermOverrideService.cs | 2 +- .../Modules/Gambling/CurrencyProvider.cs | 18 +++ .../Permissions/PermissionExtensions.cs | 14 +- .../Modules/Permissions/PermissionsService.cs | 3 +- .../Utility/Patronage/PatronageService.cs | 6 - .../Modules/Utility/Remind/RemindService.cs | 2 +- src/NadekoBot/NadekoBot.csproj | 16 ++- src/NadekoBot/PermissionChecker.cs | 78 +++++++++++ .../Services/Impl/BotCredsProvider.cs | 13 +- .../{RedisImagesCache.cs => ImageCache.cs} | 38 +----- .../Impl}/PubSub/JsonSeria.cs | 0 .../Impl}/PubSub/RedisPubSub.cs | 0 .../Impl}/PubSub/YamlSeria.cs | 0 .../Cache => Services/Impl}/RedisBotCache.cs | 0 .../impl => Impl}/RedisBotStringsProvider.cs | 0 src/NadekoBot/Services/Impl/StatsService.cs | 5 +- .../data/aliases.yml | 0 .../data/bot.yml | 0 .../data/fonts/NotoSans-Bold.ttf | Bin .../data/fonts/Symbola-10.24.ttf | Bin .../data/fonts/Uni Sans.ttf | Bin .../data/fonts/dotty.ttf | Bin .../data/gambling.yml | 0 .../data/games.yml | 0 .../data/hangman/animals.yml | 0 .../data/hangman/anime.yml | 0 .../data/hangman/countries.yml | 0 .../data/hangman/movies.yml | 0 .../data/hangman/things.yml | 0 .../data/images.yml | 0 .../data/images/cards/ace_of_clubs.jpg | Bin .../data/images/cards/ace_of_diamonds.jpg | Bin .../data/images/cards/ace_of_hearts.jpg | Bin .../data/images/cards/ace_of_spades.jpg | Bin .../data/images/cards/black_joker.jpg | Bin .../data/images/cards/eight_of_clubs.jpg | Bin .../data/images/cards/eight_of_diamonds.jpg | Bin .../data/images/cards/eight_of_hearts.jpg | Bin .../data/images/cards/eight_of_spades.jpg | Bin .../data/images/cards/five_of_clubs.jpg | Bin .../data/images/cards/five_of_diamonds.jpg | Bin .../data/images/cards/five_of_hearts.jpg | Bin .../data/images/cards/five_of_spades.jpg | Bin .../data/images/cards/four_of_clubs.jpg | Bin .../data/images/cards/four_of_diamonds.jpg | Bin .../data/images/cards/four_of_hearts.jpg | Bin .../data/images/cards/four_of_spades.jpg | Bin .../data/images/cards/jack_of_clubs.jpg | Bin .../data/images/cards/jack_of_diamonds.jpg | Bin .../data/images/cards/jack_of_hearts.jpg | Bin .../data/images/cards/jack_of_spades.jpg | Bin .../data/images/cards/king_of_clubs.jpg | Bin .../data/images/cards/king_of_diamonds.jpg | Bin .../data/images/cards/king_of_hearts.jpg | Bin .../data/images/cards/king_of_spades.jpg | Bin .../data/images/cards/nine_of_clubs.jpg | Bin .../data/images/cards/nine_of_diamonds.jpg | Bin .../data/images/cards/nine_of_hearts.jpg | Bin .../data/images/cards/nine_of_spades.jpg | Bin .../data/images/cards/queen_of_clubs.jpg | Bin .../data/images/cards/queen_of_diamonds.jpg | Bin .../data/images/cards/queen_of_hearts.jpg | Bin .../data/images/cards/queen_of_spades.jpg | Bin .../data/images/cards/red_joker.jpg | Bin .../data/images/cards/seven_of_clubs.jpg | Bin .../data/images/cards/seven_of_diamonds.jpg | Bin .../data/images/cards/seven_of_hearts.jpg | Bin .../data/images/cards/seven_of_spades.jpg | Bin .../data/images/cards/six_of_clubs.jpg | Bin .../data/images/cards/six_of_diamonds.jpg | Bin .../data/images/cards/six_of_hearts.jpg | Bin .../data/images/cards/six_of_spades.jpg | Bin .../data/images/cards/ten_of_clubs.jpg | Bin .../data/images/cards/ten_of_diamonds.jpg | Bin .../data/images/cards/ten_of_hearts.jpg | Bin .../data/images/cards/ten_of_spades.jpg | Bin .../data/images/cards/three_of_clubs.jpg | Bin .../data/images/cards/three_of_diamonds.jpg | Bin .../data/images/cards/three_of_hearts.jpg | Bin .../data/images/cards/three_of_spades.jpg | Bin .../data/images/cards/two_of_clubs.jpg | Bin .../data/images/cards/two_of_diamonds.jpg | Bin .../data/images/cards/two_of_hearts.jpg | Bin .../data/images/cards/two_of_spades.jpg | Bin .../data/images/frame_gold.png | Bin .../data/images/frame_silver.png | Bin .../data/lib/libopus.so | Bin .../data/lib/libsodium.dll | Bin .../data/lib/libsodium.so | Bin .../data/lib/opus.dll | Bin .../data/magicitems.json | 0 .../data/patron.yml | 0 .../data/pokemon/LICENSE | 0 .../data/pokemon/name-id_map.json | 0 .../data/pokemon/pokemon_abilities.json | 0 .../data/pokemon/pokemon_list.json | 0 .../data/searches.yml | 0 .../data/strings/commands/commands.en-US.yml | 0 .../data/strings/responses/responses.ar.json | 0 .../strings/responses/responses.cs-CZ.json | 0 .../strings/responses/responses.da-DK.json | 0 .../strings/responses/responses.de-DE.json | 0 .../strings/responses/responses.en-US.json | 0 .../strings/responses/responses.es-ES.json | 0 .../strings/responses/responses.fr-FR.json | 0 .../strings/responses/responses.he-IL.json | 0 .../strings/responses/responses.hu-HU.json | 0 .../strings/responses/responses.id-ID.json | 0 .../strings/responses/responses.it-IT.json | 0 .../strings/responses/responses.ja-JP.json | 0 .../strings/responses/responses.ko-KR.json | 0 .../strings/responses/responses.nb-NO.json | 0 .../strings/responses/responses.nl-NL.json | 0 .../strings/responses/responses.pl-PL.json | 0 .../strings/responses/responses.pt-BR.json | 0 .../strings/responses/responses.ro-RO.json | 0 .../strings/responses/responses.ru-RU.json | 0 .../responses/responses.sr-cyrl-rs.json | 0 .../strings/responses/responses.sv-SE.json | 0 .../strings/responses/responses.tr-TR.json | 0 .../strings/responses/responses.ts-TS.json | 0 .../strings/responses/responses.uk-UA.json | 0 .../strings/responses/responses.zh-CN.json | 0 .../strings/responses/responses.zh-TW.json | 0 .../data/trivia_questions.json | 0 .../data/typing_articles3.json | 0 .../data/units.json | 0 .../data/urero.json | 0 .../data/wowjokes.json | 0 .../data/xp.yml | 0 .../data/xp_template.json | 0 .../data/yomama.txt | 0 361 files changed, 532 insertions(+), 476 deletions(-) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/AliasesAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/CmdAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/DIIgnoreAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/NadekoOptionsAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/NoPublicBotAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/OnlyPublicBotAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/OwnerOnlyAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/RatelimitAttribute.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Attributes/UserPermAttribute.cs (85%) rename src/{NadekoBot/Common/TypeReaders => Nadeko.Bot.Common}/BotCommandTypeReader.cs (87%) rename src/{NadekoBot/Modules/Permissions/CommandCooldown => Nadeko.Bot.Common}/CleverBotResponseStr.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/CommandNameLoadHelper.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/AddRemove.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/CmdStrings.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/CommandData.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/DownloadTracker.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/Helpers.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/ImageUrls.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/JsonConverters/CultureInfoConverter.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/JsonConverters/Rgba32Converter.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/LbOpts.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/Linq2DbExpressions.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/LoginErrorHandler.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/OldCreds.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/OptionsParser.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/OsuMapData.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/OsuUserBets.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/Pokemon/PokemonNameId.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/Pokemon/SearchPokemon.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/Pokemon/SearchPokemonAbility.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/RequireObjectPropertiesContractResolver.cs (100%) rename src/{NadekoBot/Modules/Games/Trivia => Nadeko.Bot.Common/Common}/TriviaQuestionModel.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/EmoteTypeReader.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/GuildTypeReader.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/GuildUserTypeReader.cs (97%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/KwumTypeReader.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/Models/PermissionAction.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/Models/StoopidTime.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/ModuleTypeReader.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/PermissionActionTypeReader.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/Rgba32TypeReader.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Common/TypeReaders/StoopidTimeTypeReader.cs (100%) rename src/{NadekoBot/Common => Nadeko.Bot.Common}/Creds.cs (97%) rename src/{NadekoBot/Services => Nadeko.Bot.Common}/Currency/CurrencyType.cs (100%) rename src/{NadekoBot/Services => Nadeko.Bot.Common}/Currency/ICurrencyService.cs (100%) rename src/{NadekoBot/Services => Nadeko.Bot.Common}/Currency/ITxTracker.cs (100%) rename src/{NadekoBot/Services => Nadeko.Bot.Common}/Currency/IWallet.cs (100%) rename src/{NadekoBot/Services => Nadeko.Bot.Common}/Currency/TxData.cs (100%) create mode 100644 src/Nadeko.Bot.Common/IBot.cs create mode 100644 src/Nadeko.Bot.Common/ICurrencyProvider.cs create mode 100644 src/Nadeko.Bot.Common/IDiscordPermOverrideService.cs rename src/{NadekoBot/Common => Nadeko.Bot.Common}/INadekoCommandOptions.cs (100%) create mode 100644 src/Nadeko.Bot.Common/IPermissionChecker.cs rename src/{NadekoBot/Common/TypeReaders => Nadeko.Bot.Common}/NadekoTypeReader.cs (100%) create mode 100644 src/Nadeko.Bot.Common/Patronage/FeatureLimitKey.cs rename src/{NadekoBot/Modules/Utility => Nadeko.Bot.Common}/Patronage/FeatureQuotaStats.cs (100%) rename src/{NadekoBot/Modules/Utility/Patronage/_common => Nadeko.Bot.Common/Patronage}/IPatronData.cs (100%) rename src/{NadekoBot/Modules/Utility/Patronage/_common => Nadeko.Bot.Common/Patronage}/IPatronageService.cs (100%) rename src/{NadekoBot/Modules/Utility/Patronage/_common => Nadeko.Bot.Common/Patronage}/ISubscriptionHandler.cs (100%) rename src/{NadekoBot/Modules/Utility => Nadeko.Bot.Common}/Patronage/Patron.cs (100%) rename src/{NadekoBot/Modules/Utility/Patronage/Config => Nadeko.Bot.Common/Patronage}/PatronConfigData.cs (100%) rename src/{NadekoBot/Modules/Utility => Nadeko.Bot.Common}/Patronage/PatronExtensions.cs (84%) rename src/{NadekoBot/Modules/Utility/Patronage/Config => Nadeko.Bot.Common/Patronage}/PatronTier.cs (100%) rename src/{NadekoBot/Modules/Utility => Nadeko.Bot.Common}/Patronage/QuotaLimit.cs (100%) rename src/{NadekoBot/Modules/Utility/Patronage/Config => Nadeko.Bot.Common/Patronage}/QuotaPer.cs (100%) rename src/{NadekoBot/Modules/Utility => Nadeko.Bot.Common}/Patronage/SubscriptionChargeStatus.cs (100%) rename src/{NadekoBot/Modules/Utility => Nadeko.Bot.Common}/Patronage/UserQuotaStats.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/CommandHandler.cs (99%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Currency/CurrencyService.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Currency/CurrencyServiceExtensions.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Currency/DefaultWallet.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Currency/GamblingTxTracker.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/ILocalDataCache.cs (100%) create mode 100644 src/Nadeko.Bot.Common/Services/IRemindService.cs rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Impl/FontProvider.cs (100%) create mode 100644 src/Nadeko.Bot.Common/Services/Impl/IImageCache.cs create mode 100644 src/Nadeko.Bot.Common/Services/Impl/ImagesConfig.cs rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Impl/RedisImageExtensions.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Impl/SingleProcessCoordinator.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Impl/StartingGuildsListService.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/Impl/YtdlOperation.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/strings/impl/BotStrings.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/strings/impl/LocalFileStringsSource.cs (100%) rename src/{NadekoBot => Nadeko.Bot.Common}/Services/strings/impl/MemoryBotStringsProvider.cs (100%) rename src/{NadekoBot/Common/TypeReaders => Nadeko.Bot.Common}/TypeReaderResult.cs (100%) delete mode 100644 src/Nadeko.Bot.Common/data/last_known_version.txt delete mode 100644 src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.deps.json delete mode 100644 src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.dll delete mode 100644 src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.runtimeconfig.json delete mode 100644 src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/cmds.yml delete mode 100644 src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/res.yml delete mode 100644 src/Nadeko.Bot.Common/data/medusae/medusa.yml rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/ExportedExpr.cs (100%) rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/ExprField.cs (100%) rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/GlobalUsings.cs (75%) rename src/{NadekoBot.Modules.Expresssions/NadekoBot.Modules.Expresssions.csproj => Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj} (91%) rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/NadekoExpressionExtensions.cs (100%) rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/NadekoExpressions.cs (99%) rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/NadekoExpressionsService.cs (89%) rename src/{NadekoBot.Modules.Expresssions => Nadeko.Bot.Modules.Expresssions}/TypeReaders/CommandOrExprTypeReader.cs (86%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/AnimalRace.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/AnimalRaceService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/AnimalRacingCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/AnimalRacingUser.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/AnimalRacing/RaceOptions.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Bank/BankCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Bank/BankService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Bank/IBankService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/BlackJack/BlackJackCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/BlackJack/BlackJackService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/BlackJack/Blackjack.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/BlackJack/Player.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Connect4/Connect4.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Connect4/Connect4Commands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/DiceRoll/DiceRollCommands.cs (99%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Draw/DrawCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/EconomyResult.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Events/CurrencyEventsCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Events/CurrencyEventsService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Events/EventOptions.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Events/GameStatusEvent.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Events/ICurrencyEvent.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Events/ReactionEvent.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/FlipCoin/FlipCoinCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/FlipCoin/FlipResult.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Gambling.cs (99%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/GamblingConfig.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/GamblingConfigService.cs (99%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/GamblingService.cs (98%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/GamblingTopLevelModule.cs (98%) create mode 100644 src/Nadeko.Bot.Modules.Gambling/Gambling/GlobalUsings.cs rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/InputRpsPick.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/PlantPick/PlantAndPickCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/PlantPick/PlantPickService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Raffle/CurrencyRaffleCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Raffle/CurrencyRaffleGame.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Raffle/CurrencyRaffleService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Shop/IShopService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Shop/ShopCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Shop/ShopService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Slot/SlotCommands.cs (99%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/VoteRewardService.cs (98%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/Common/AffinityTitle.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/Common/ClaimTitle.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/Common/DivorceResult.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/Common/Extensions.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/Common/WaifuClaimResult.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/WaifuClaimCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Gambling/Waifus/WaifuService.cs (100%) rename src/{NadekoBot/Modules/Gambling/~Shared => Nadeko.Bot.Modules.Gambling/Gambling/_Common}/Decks/QuadDeck.cs (100%) rename src/{NadekoBot/Modules/Gambling/~Shared => Nadeko.Bot.Modules.Gambling/Gambling/_Common}/IGamblingService.cs (100%) rename src/{NadekoBot/Modules/Gambling/~Shared => Nadeko.Bot.Modules.Gambling/Gambling/_Common}/NewGamblingService.cs (100%) rename src/{NadekoBot/Modules/Gambling/~Shared => Nadeko.Bot.Modules.Gambling/Gambling/_Common}/RollDuelGame.cs (100%) rename src/{NadekoBot/Common/TypeReaders/Shmart => Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders}/BaseShmartInputAmountReader.cs (100%) rename src/{NadekoBot/Common/TypeReaders/Shmart => Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders}/ShmartBankInputAmountReader.cs (100%) rename src/{NadekoBot/Common/TypeReaders/Shmart => Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders}/ShmartNumberTypeReader.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Acrophobia/Acrophobia.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Acrophobia/AcrophobiaUser.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Acrophobia/AcropobiaCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/ChatterbotService.cs (86%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/CleverBotCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/_Common/CleverbotResponse.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/_Common/Gpt3Response.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/_Common/IChatterBotSession.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/_Common/OfficialCleverbotSession.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/ChatterBot/_Common/OfficialGpt3Session.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Games.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/GamesConfig.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/GamesConfigService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/GamesService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/GirlRating.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/DefaultHangmanSource.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/HangmanCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/HangmanGame.cs (92%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/HangmanService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/HangmanTerm.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/IHangmanService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Hangman/IHangmanSource.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Nunchi/Nunchi.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Nunchi/NunchiCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Polls/PollCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Polls/PollRunner.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Polls/PollService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/SpeedTyping/SpeedTypingCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/SpeedTyping/TypingArticle.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/SpeedTyping/TypingGame.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/TicTacToe/TicTacToe.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/TicTacToe/TicTacToeCommands.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/Games.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/QuestionPool/DefaultQuestionPool.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/QuestionPool/IQuestionPool.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/QuestionPool/PokemonQuestionPool.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/TriviaGame.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/TriviaGamesService.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/TriviaOptions.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/TriviaQuestion.cs (100%) rename src/{NadekoBot/Modules => Nadeko.Bot.Modules.Gambling}/Games/Trivia/TriviaUser.cs (100%) create mode 100644 src/Nadeko.Bot.Modules.Gambling/Nadeko.Bot.Modules.Gambling.csproj rename src/NadekoBot/{Common => }/Medusa/Adapters/BehaviorAdapter.cs (96%) rename src/NadekoBot/{Common => }/Medusa/Adapters/ContextAdapterFactory.cs (82%) rename src/NadekoBot/{Common => }/Medusa/Adapters/DmContextAdapter.cs (95%) rename src/NadekoBot/{Common => }/Medusa/Adapters/FilterAdapter.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Adapters/GuildContextAdapter.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Adapters/ParamParserAdapter.cs (100%) rename src/NadekoBot/{Common => }/Medusa/CommandContextType.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Config/IMedusaConfigService.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Config/MedusaConfig.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Config/MedusaConfigService.cs (100%) rename src/NadekoBot/{Common => }/Medusa/MedusaAssemblyLoadContext.cs (100%) rename src/NadekoBot/{Common => }/Medusa/MedusaIoCKernelModule.cs (100%) rename src/NadekoBot/{Common => }/Medusa/MedusaLoaderService.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Models/ParamData.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Models/ResolvedMedusa.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Models/SnekCommandData.cs (100%) rename src/NadekoBot/{Common => }/Medusa/Models/SnekData.cs (100%) rename src/NadekoBot/{Common => }/Medusa/RemovablePlanner.cs (100%) create mode 100644 src/NadekoBot/Modules/Gambling/CurrencyProvider.cs create mode 100644 src/NadekoBot/PermissionChecker.cs rename src/NadekoBot/Services/Impl/{RedisImagesCache.cs => ImageCache.cs} (70%) rename src/NadekoBot/{Common => Services/Impl}/PubSub/JsonSeria.cs (100%) rename src/NadekoBot/{Common => Services/Impl}/PubSub/RedisPubSub.cs (100%) rename src/NadekoBot/{Common => Services/Impl}/PubSub/YamlSeria.cs (100%) rename src/NadekoBot/{Common/Cache => Services/Impl}/RedisBotCache.cs (100%) rename src/NadekoBot/Services/{strings/impl => Impl}/RedisBotStringsProvider.cs (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/aliases.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/bot.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/fonts/NotoSans-Bold.ttf (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/fonts/Symbola-10.24.ttf (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/fonts/Uni Sans.ttf (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/fonts/dotty.ttf (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/gambling.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/games.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/hangman/animals.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/hangman/anime.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/hangman/countries.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/hangman/movies.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/hangman/things.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ace_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ace_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ace_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ace_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/black_joker.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/eight_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/eight_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/eight_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/eight_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/five_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/five_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/five_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/five_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/four_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/four_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/four_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/four_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/jack_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/jack_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/jack_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/jack_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/king_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/king_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/king_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/king_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/nine_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/nine_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/nine_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/nine_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/queen_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/queen_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/queen_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/queen_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/red_joker.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/seven_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/seven_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/seven_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/seven_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/six_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/six_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/six_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/six_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ten_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ten_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ten_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/ten_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/three_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/three_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/three_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/three_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/two_of_clubs.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/two_of_diamonds.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/two_of_hearts.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/cards/two_of_spades.jpg (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/frame_gold.png (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/images/frame_silver.png (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/lib/libopus.so (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/lib/libsodium.dll (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/lib/libsodium.so (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/lib/opus.dll (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/magicitems.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/patron.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/pokemon/LICENSE (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/pokemon/name-id_map.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/pokemon/pokemon_abilities.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/pokemon/pokemon_list.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/searches.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/commands/commands.en-US.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.ar.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.cs-CZ.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.da-DK.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.de-DE.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.en-US.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.es-ES.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.fr-FR.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.he-IL.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.hu-HU.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.id-ID.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.it-IT.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.ja-JP.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.ko-KR.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.nb-NO.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.nl-NL.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.pl-PL.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.pt-BR.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.ro-RO.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.ru-RU.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.sr-cyrl-rs.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.sv-SE.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.tr-TR.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.ts-TS.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.uk-UA.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.zh-CN.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/strings/responses/responses.zh-TW.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/trivia_questions.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/typing_articles3.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/units.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/urero.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/wowjokes.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/xp.yml (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/xp_template.json (100%) rename src/{Nadeko.Bot.Common => NadekoBot}/data/yomama.txt (100%) diff --git a/NadekoBot.sln b/NadekoBot.sln index 4bb1b3a29..5cce753b9 100644 --- a/NadekoBot.sln +++ b/NadekoBot.sln @@ -35,13 +35,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Common", "src\Nadeko EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Econ", "src\Nadeko.Econ\Nadeko.Econ.csproj", "{4F4FBF7C-74F0-4AE4-B451-9E60BDCA9C37}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Expresssions", "src\NadekoBot.Modules.Expresssions\NadekoBot.Modules.Expresssions.csproj", "{92E239B9-C230-4475-9506-BED20174FD20}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Modules.Expresssions", "src\Nadeko.Bot.Modules.Expresssions\Nadeko.Bot.Modules.Expresssions.csproj", "{92E239B9-C230-4475-9506-BED20174FD20}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Db", "src\Nadeko.Bot.Db\Nadeko.Bot.Db.csproj", "{02499E3E-3B04-4BC8-9B3C-D9494661F78E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Common", "src\Nadeko.Bot.Common\Nadeko.Bot.Common.csproj", "{02ABC10E-3323-4698-A388-C61D7D03797E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Generators.Cloneable", "src\Nadeko.Bot.Generators.Cloneable\Nadeko.Bot.Generators.Cloneable.csproj", "{A5E71EE3-786E-438C-95C0-5BC558FCECCF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Modules.Gambling", "src\Nadeko.Bot.Modules.Gambling\Nadeko.Bot.Modules.Gambling.csproj", "{5F4F36A5-5874-4461-BB34-EE107E4B7F15}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -122,12 +122,12 @@ Global {02ABC10E-3323-4698-A388-C61D7D03797E}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU {02ABC10E-3323-4698-A388-C61D7D03797E}.Release|Any CPU.ActiveCfg = Release|Any CPU {02ABC10E-3323-4698-A388-C61D7D03797E}.Release|Any CPU.Build.0 = Release|Any CPU - {A5E71EE3-786E-438C-95C0-5BC558FCECCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A5E71EE3-786E-438C-95C0-5BC558FCECCF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5E71EE3-786E-438C-95C0-5BC558FCECCF}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU - {A5E71EE3-786E-438C-95C0-5BC558FCECCF}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU - {A5E71EE3-786E-438C-95C0-5BC558FCECCF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A5E71EE3-786E-438C-95C0-5BC558FCECCF}.Release|Any CPU.Build.0 = Release|Any CPU + {5F4F36A5-5874-4461-BB34-EE107E4B7F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F4F36A5-5874-4461-BB34-EE107E4B7F15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F4F36A5-5874-4461-BB34-EE107E4B7F15}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {5F4F36A5-5874-4461-BB34-EE107E4B7F15}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {5F4F36A5-5874-4461-BB34-EE107E4B7F15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F4F36A5-5874-4461-BB34-EE107E4B7F15}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -146,7 +146,7 @@ Global {92E239B9-C230-4475-9506-BED20174FD20} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {02499E3E-3B04-4BC8-9B3C-D9494661F78E} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {02ABC10E-3323-4698-A388-C61D7D03797E} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} - {A5E71EE3-786E-438C-95C0-5BC558FCECCF} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {5F4F36A5-5874-4461-BB34-EE107E4B7F15} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5F3F555C-855F-4BE8-B526-D062D3E8ACA4} diff --git a/src/Nadeko.Bot.Common/Abstractions/creds/IBotCredentials.cs b/src/Nadeko.Bot.Common/Abstractions/creds/IBotCredentials.cs index 530bdce02..ae7887ec6 100644 --- a/src/Nadeko.Bot.Common/Abstractions/creds/IBotCredentials.cs +++ b/src/Nadeko.Bot.Common/Abstractions/creds/IBotCredentials.cs @@ -1,4 +1,6 @@ #nullable disable +using NadekoBot.Common; + namespace NadekoBot; public interface IBotCredentials @@ -9,14 +11,14 @@ public interface IBotCredentials bool UsePrivilegedIntents { get; } string RapidApiKey { get; } - IDbOptions Db { get; } + Creds.DbOptions Db { get; } string OsuApiKey { get; } int TotalShards { get; } - IPatreonSettings Patreon { get; } + Creds.PatreonSettings Patreon { get; } string CleverbotApiKey { get; } string Gpt3ApiKey { get; } - IRestartConfig RestartCommand { get; } - IVotesSettings Votes { get; } + RestartConfig RestartCommand { get; } + Creds.VotesSettings Votes { get; } string BotListToken { get; } string RedisOptions { get; } string LocationIqApiKey { get; } @@ -26,7 +28,7 @@ public interface IBotCredentials string CoordinatorUrl { get; set; } string TwitchClientId { get; set; } string TwitchClientSecret { get; set; } - IGoogleApiConfig Google { get; set; } + GoogleApiConfig Google { get; set; } BotCacheImplemenation BotCache { get; set; } } diff --git a/src/NadekoBot/Common/Attributes/AliasesAttribute.cs b/src/Nadeko.Bot.Common/Attributes/AliasesAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/AliasesAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/AliasesAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/CmdAttribute.cs b/src/Nadeko.Bot.Common/Attributes/CmdAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/CmdAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/CmdAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/DIIgnoreAttribute.cs b/src/Nadeko.Bot.Common/Attributes/DIIgnoreAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/DIIgnoreAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/DIIgnoreAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/NadekoOptionsAttribute.cs b/src/Nadeko.Bot.Common/Attributes/NadekoOptionsAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/NadekoOptionsAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/NadekoOptionsAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/NoPublicBotAttribute.cs b/src/Nadeko.Bot.Common/Attributes/NoPublicBotAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/NoPublicBotAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/NoPublicBotAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/OnlyPublicBotAttribute.cs b/src/Nadeko.Bot.Common/Attributes/OnlyPublicBotAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/OnlyPublicBotAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/OnlyPublicBotAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs b/src/Nadeko.Bot.Common/Attributes/OwnerOnlyAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/OwnerOnlyAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/RatelimitAttribute.cs b/src/Nadeko.Bot.Common/Attributes/RatelimitAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/RatelimitAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/RatelimitAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/UserPermAttribute.cs b/src/Nadeko.Bot.Common/Attributes/UserPermAttribute.cs similarity index 85% rename from src/NadekoBot/Common/Attributes/UserPermAttribute.cs rename to src/Nadeko.Bot.Common/Attributes/UserPermAttribute.cs index 31087cb2e..2e0af0369 100644 --- a/src/NadekoBot/Common/Attributes/UserPermAttribute.cs +++ b/src/Nadeko.Bot.Common/Attributes/UserPermAttribute.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.DependencyInjection; -using NadekoBot.Modules.Administration.Services; namespace Discord; @@ -21,7 +20,7 @@ public class UserPermAttribute : RequireUserPermissionAttribute CommandInfo command, IServiceProvider services) { - var permService = services.GetRequiredService(); + var permService = services.GetRequiredService(); if (permService.TryGetOverrides(context.Guild?.Id ?? 0, command.Name.ToUpperInvariant(), out _)) return Task.FromResult(PreconditionResult.FromSuccess()); diff --git a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs b/src/Nadeko.Bot.Common/BotCommandTypeReader.cs similarity index 87% rename from src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs rename to src/Nadeko.Bot.Common/BotCommandTypeReader.cs index 9a95ce854..bd2ece7e4 100644 --- a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs +++ b/src/Nadeko.Bot.Common/BotCommandTypeReader.cs @@ -1,12 +1,14 @@ #nullable disable +using NadekoBot.Services; + namespace NadekoBot.Common.TypeReaders; public sealed class CommandTypeReader : NadekoTypeReader { private readonly CommandService _cmds; - private readonly CommandHandler _handler; + private readonly ICommandHandler _handler; - public CommandTypeReader(CommandHandler handler, CommandService cmds) + public CommandTypeReader(ICommandHandler handler, CommandService cmds) { _handler = handler; _cmds = cmds; diff --git a/src/NadekoBot/Modules/Permissions/CommandCooldown/CleverBotResponseStr.cs b/src/Nadeko.Bot.Common/CleverBotResponseStr.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/CommandCooldown/CleverBotResponseStr.cs rename to src/Nadeko.Bot.Common/CleverBotResponseStr.cs diff --git a/src/NadekoBot/Common/CommandNameLoadHelper.cs b/src/Nadeko.Bot.Common/CommandNameLoadHelper.cs similarity index 100% rename from src/NadekoBot/Common/CommandNameLoadHelper.cs rename to src/Nadeko.Bot.Common/CommandNameLoadHelper.cs diff --git a/src/NadekoBot/Common/AddRemove.cs b/src/Nadeko.Bot.Common/Common/AddRemove.cs similarity index 100% rename from src/NadekoBot/Common/AddRemove.cs rename to src/Nadeko.Bot.Common/Common/AddRemove.cs diff --git a/src/NadekoBot/Common/CmdStrings.cs b/src/Nadeko.Bot.Common/Common/CmdStrings.cs similarity index 100% rename from src/NadekoBot/Common/CmdStrings.cs rename to src/Nadeko.Bot.Common/Common/CmdStrings.cs diff --git a/src/NadekoBot/Common/CommandData.cs b/src/Nadeko.Bot.Common/Common/CommandData.cs similarity index 100% rename from src/NadekoBot/Common/CommandData.cs rename to src/Nadeko.Bot.Common/Common/CommandData.cs diff --git a/src/NadekoBot/Common/DownloadTracker.cs b/src/Nadeko.Bot.Common/Common/DownloadTracker.cs similarity index 100% rename from src/NadekoBot/Common/DownloadTracker.cs rename to src/Nadeko.Bot.Common/Common/DownloadTracker.cs diff --git a/src/NadekoBot/Common/Helpers.cs b/src/Nadeko.Bot.Common/Common/Helpers.cs similarity index 100% rename from src/NadekoBot/Common/Helpers.cs rename to src/Nadeko.Bot.Common/Common/Helpers.cs diff --git a/src/NadekoBot/Common/ImageUrls.cs b/src/Nadeko.Bot.Common/Common/ImageUrls.cs similarity index 100% rename from src/NadekoBot/Common/ImageUrls.cs rename to src/Nadeko.Bot.Common/Common/ImageUrls.cs diff --git a/src/NadekoBot/Common/JsonConverters/CultureInfoConverter.cs b/src/Nadeko.Bot.Common/Common/JsonConverters/CultureInfoConverter.cs similarity index 100% rename from src/NadekoBot/Common/JsonConverters/CultureInfoConverter.cs rename to src/Nadeko.Bot.Common/Common/JsonConverters/CultureInfoConverter.cs diff --git a/src/NadekoBot/Common/JsonConverters/Rgba32Converter.cs b/src/Nadeko.Bot.Common/Common/JsonConverters/Rgba32Converter.cs similarity index 100% rename from src/NadekoBot/Common/JsonConverters/Rgba32Converter.cs rename to src/Nadeko.Bot.Common/Common/JsonConverters/Rgba32Converter.cs diff --git a/src/NadekoBot/Common/LbOpts.cs b/src/Nadeko.Bot.Common/Common/LbOpts.cs similarity index 100% rename from src/NadekoBot/Common/LbOpts.cs rename to src/Nadeko.Bot.Common/Common/LbOpts.cs diff --git a/src/NadekoBot/Common/Linq2DbExpressions.cs b/src/Nadeko.Bot.Common/Common/Linq2DbExpressions.cs similarity index 100% rename from src/NadekoBot/Common/Linq2DbExpressions.cs rename to src/Nadeko.Bot.Common/Common/Linq2DbExpressions.cs diff --git a/src/NadekoBot/Common/LoginErrorHandler.cs b/src/Nadeko.Bot.Common/Common/LoginErrorHandler.cs similarity index 100% rename from src/NadekoBot/Common/LoginErrorHandler.cs rename to src/Nadeko.Bot.Common/Common/LoginErrorHandler.cs diff --git a/src/NadekoBot/Common/OldCreds.cs b/src/Nadeko.Bot.Common/Common/OldCreds.cs similarity index 100% rename from src/NadekoBot/Common/OldCreds.cs rename to src/Nadeko.Bot.Common/Common/OldCreds.cs diff --git a/src/NadekoBot/Common/OptionsParser.cs b/src/Nadeko.Bot.Common/Common/OptionsParser.cs similarity index 100% rename from src/NadekoBot/Common/OptionsParser.cs rename to src/Nadeko.Bot.Common/Common/OptionsParser.cs diff --git a/src/NadekoBot/Common/OsuMapData.cs b/src/Nadeko.Bot.Common/Common/OsuMapData.cs similarity index 100% rename from src/NadekoBot/Common/OsuMapData.cs rename to src/Nadeko.Bot.Common/Common/OsuMapData.cs diff --git a/src/NadekoBot/Common/OsuUserBets.cs b/src/Nadeko.Bot.Common/Common/OsuUserBets.cs similarity index 100% rename from src/NadekoBot/Common/OsuUserBets.cs rename to src/Nadeko.Bot.Common/Common/OsuUserBets.cs diff --git a/src/NadekoBot/Common/Pokemon/PokemonNameId.cs b/src/Nadeko.Bot.Common/Common/Pokemon/PokemonNameId.cs similarity index 100% rename from src/NadekoBot/Common/Pokemon/PokemonNameId.cs rename to src/Nadeko.Bot.Common/Common/Pokemon/PokemonNameId.cs diff --git a/src/NadekoBot/Common/Pokemon/SearchPokemon.cs b/src/Nadeko.Bot.Common/Common/Pokemon/SearchPokemon.cs similarity index 100% rename from src/NadekoBot/Common/Pokemon/SearchPokemon.cs rename to src/Nadeko.Bot.Common/Common/Pokemon/SearchPokemon.cs diff --git a/src/NadekoBot/Common/Pokemon/SearchPokemonAbility.cs b/src/Nadeko.Bot.Common/Common/Pokemon/SearchPokemonAbility.cs similarity index 100% rename from src/NadekoBot/Common/Pokemon/SearchPokemonAbility.cs rename to src/Nadeko.Bot.Common/Common/Pokemon/SearchPokemonAbility.cs diff --git a/src/NadekoBot/Common/RequireObjectPropertiesContractResolver.cs b/src/Nadeko.Bot.Common/Common/RequireObjectPropertiesContractResolver.cs similarity index 100% rename from src/NadekoBot/Common/RequireObjectPropertiesContractResolver.cs rename to src/Nadeko.Bot.Common/Common/RequireObjectPropertiesContractResolver.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/TriviaQuestionModel.cs b/src/Nadeko.Bot.Common/Common/TriviaQuestionModel.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/TriviaQuestionModel.cs rename to src/Nadeko.Bot.Common/Common/TriviaQuestionModel.cs diff --git a/src/NadekoBot/Common/TypeReaders/EmoteTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/EmoteTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/EmoteTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/EmoteTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/GuildTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/GuildTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/GuildUserTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/GuildUserTypeReader.cs similarity index 97% rename from src/NadekoBot/Common/TypeReaders/GuildUserTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/GuildUserTypeReader.cs index 1991443e5..837353f71 100644 --- a/src/NadekoBot/Common/TypeReaders/GuildUserTypeReader.cs +++ b/src/Nadeko.Bot.Common/Common/TypeReaders/GuildUserTypeReader.cs @@ -1,33 +1,33 @@ -namespace NadekoBot.Common.TypeReaders; - -public sealed class GuildUserTypeReader : NadekoTypeReader -{ - public override async ValueTask> ReadAsync(ICommandContext ctx, string input) - { - if (ctx.Guild is null) - return TypeReaderResult.FromError(CommandError.Unsuccessful, "Must be in a guild."); - - input = input.Trim(); - IGuildUser? user = null; - if (MentionUtils.TryParseUser(input, out var id)) - user = await ctx.Guild.GetUserAsync(id, CacheMode.AllowDownload); - - if (ulong.TryParse(input, out id)) - user = await ctx.Guild.GetUserAsync(id, CacheMode.AllowDownload); - - if (user is null) - { - var users = await ctx.Guild.GetUsersAsync(CacheMode.CacheOnly); - user = users.FirstOrDefault(x => x.Username == input) - ?? users.FirstOrDefault(x => - string.Equals(x.ToString(), input, StringComparison.InvariantCultureIgnoreCase)) - ?? users.FirstOrDefault(x => - string.Equals(x.Username, input, StringComparison.InvariantCultureIgnoreCase)); - } - - if (user is null) - return TypeReaderResult.FromError(CommandError.ObjectNotFound, "User not found."); - - return TypeReaderResult.FromSuccess(user); - } +namespace NadekoBot.Common.TypeReaders; + +public sealed class GuildUserTypeReader : NadekoTypeReader +{ + public override async ValueTask> ReadAsync(ICommandContext ctx, string input) + { + if (ctx.Guild is null) + return TypeReaderResult.FromError(CommandError.Unsuccessful, "Must be in a guild."); + + input = input.Trim(); + IGuildUser? user = null; + if (MentionUtils.TryParseUser(input, out var id)) + user = await ctx.Guild.GetUserAsync(id, CacheMode.AllowDownload); + + if (ulong.TryParse(input, out id)) + user = await ctx.Guild.GetUserAsync(id, CacheMode.AllowDownload); + + if (user is null) + { + var users = await ctx.Guild.GetUsersAsync(CacheMode.CacheOnly); + user = users.FirstOrDefault(x => x.Username == input) + ?? users.FirstOrDefault(x => + string.Equals(x.ToString(), input, StringComparison.InvariantCultureIgnoreCase)) + ?? users.FirstOrDefault(x => + string.Equals(x.Username, input, StringComparison.InvariantCultureIgnoreCase)); + } + + if (user is null) + return TypeReaderResult.FromError(CommandError.ObjectNotFound, "User not found."); + + return TypeReaderResult.FromSuccess(user); + } } \ No newline at end of file diff --git a/src/NadekoBot/Common/TypeReaders/KwumTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/KwumTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/KwumTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/KwumTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/Models/PermissionAction.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/Models/PermissionAction.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Models/PermissionAction.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/Models/PermissionAction.cs diff --git a/src/NadekoBot/Common/TypeReaders/Models/StoopidTime.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/Models/StoopidTime.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Models/StoopidTime.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/Models/StoopidTime.cs diff --git a/src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/ModuleTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/ModuleTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/PermissionActionTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/PermissionActionTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/Rgba32TypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/Rgba32TypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Rgba32TypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/Rgba32TypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/StoopidTimeTypeReader.cs b/src/Nadeko.Bot.Common/Common/TypeReaders/StoopidTimeTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/StoopidTimeTypeReader.cs rename to src/Nadeko.Bot.Common/Common/TypeReaders/StoopidTimeTypeReader.cs diff --git a/src/NadekoBot/Common/Creds.cs b/src/Nadeko.Bot.Common/Creds.cs similarity index 97% rename from src/NadekoBot/Common/Creds.cs rename to src/Nadeko.Bot.Common/Creds.cs index 00955513b..d3f20ff6c 100644 --- a/src/NadekoBot/Common/Creds.cs +++ b/src/Nadeko.Bot.Common/Creds.cs @@ -47,16 +47,16 @@ public sealed class Creds : IBotCredentials Do all steps again but enable image search for the ImageSearchId """)] - public IGoogleApiConfig Google { get; set; } + public GoogleApiConfig Google { get; set; } [Comment("""Settings for voting system for discordbots. Meant for use on global Nadeko.""")] - public IVotesSettings Votes { get; set; } + public VotesSettings Votes { get; set; } [Comment(""" Patreon auto reward system settings. go to https://www.patreon.com/portal -> my clients -> create client """)] - public IPatreonSettings Patreon { get; set; } + public PatreonSettings Patreon { get; set; } [Comment("""Api key for sending stats to DiscordBotList.""")] public string BotListToken { get; set; } @@ -81,7 +81,7 @@ public sealed class Creds : IBotCredentials public string RedisOptions { get; set; } [Comment("""Database options. Don't change if you don't know what you're doing. Leave null for default values""")] - public IDbOptions Db { get; set; } + public DbOptions Db { get; set; } [Comment(""" Address and port of the coordinator endpoint. Leave empty for default. @@ -143,7 +143,7 @@ public sealed class Creds : IBotCredentials cmd: NadekoBot.exe args: "{0}" """)] - public IRestartConfig RestartCommand { get; set; } + public RestartConfig RestartCommand { get; set; } public Creds() { diff --git a/src/NadekoBot/Services/Currency/CurrencyType.cs b/src/Nadeko.Bot.Common/Currency/CurrencyType.cs similarity index 100% rename from src/NadekoBot/Services/Currency/CurrencyType.cs rename to src/Nadeko.Bot.Common/Currency/CurrencyType.cs diff --git a/src/NadekoBot/Services/Currency/ICurrencyService.cs b/src/Nadeko.Bot.Common/Currency/ICurrencyService.cs similarity index 100% rename from src/NadekoBot/Services/Currency/ICurrencyService.cs rename to src/Nadeko.Bot.Common/Currency/ICurrencyService.cs diff --git a/src/NadekoBot/Services/Currency/ITxTracker.cs b/src/Nadeko.Bot.Common/Currency/ITxTracker.cs similarity index 100% rename from src/NadekoBot/Services/Currency/ITxTracker.cs rename to src/Nadeko.Bot.Common/Currency/ITxTracker.cs diff --git a/src/NadekoBot/Services/Currency/IWallet.cs b/src/Nadeko.Bot.Common/Currency/IWallet.cs similarity index 100% rename from src/NadekoBot/Services/Currency/IWallet.cs rename to src/Nadeko.Bot.Common/Currency/IWallet.cs diff --git a/src/NadekoBot/Services/Currency/TxData.cs b/src/Nadeko.Bot.Common/Currency/TxData.cs similarity index 100% rename from src/NadekoBot/Services/Currency/TxData.cs rename to src/Nadeko.Bot.Common/Currency/TxData.cs diff --git a/src/Nadeko.Bot.Common/GlobalUsings.cs b/src/Nadeko.Bot.Common/GlobalUsings.cs index 6029f602e..217849cb9 100644 --- a/src/Nadeko.Bot.Common/GlobalUsings.cs +++ b/src/Nadeko.Bot.Common/GlobalUsings.cs @@ -1,16 +1,16 @@ // // global using System.Collections.Concurrent; -// global using NonBlocking; +global using NonBlocking; // // // packages // global using Serilog; global using Humanizer; // // // nadekobot -// global using NadekoBot; -// global using NadekoBot.Services; +global using NadekoBot; +global using NadekoBot.Services; global using Nadeko.Common; // new project -// global using NadekoBot.Common; // old + nadekobot specific things -// global using NadekoBot.Common.Attributes; +global using NadekoBot.Common; // old + nadekobot specific things +global using NadekoBot.Common.Attributes; global using NadekoBot.Extensions; // global using Nadeko.Snake; @@ -28,4 +28,7 @@ global using LeftoverAttribute = Discord.Commands.RemainderAttribute; // global using TypeReaderResult = NadekoBot.Common.TypeReaders.TypeReaderResult; // non-essential -global using JetBrains.Annotations; \ No newline at end of file +global using JetBrains.Annotations; + + +global using Serilog; \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/IBot.cs b/src/Nadeko.Bot.Common/IBot.cs new file mode 100644 index 000000000..2ad0078a7 --- /dev/null +++ b/src/Nadeko.Bot.Common/IBot.cs @@ -0,0 +1,12 @@ +#nullable disable +using NadekoBot.Services.Database.Models; + +namespace NadekoBot; + +public interface IBot +{ + IReadOnlyList GetCurrentGuildIds(); + event Func JoinedGuild; + IReadOnlyCollection AllGuildConfigs { get; } + bool IsReady { get; } +} \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/ICurrencyProvider.cs b/src/Nadeko.Bot.Common/ICurrencyProvider.cs new file mode 100644 index 000000000..4341ac31a --- /dev/null +++ b/src/Nadeko.Bot.Common/ICurrencyProvider.cs @@ -0,0 +1,6 @@ +namespace Nadeko.Bot.Common; + +public interface ICurrencyProvider +{ + string GetCurrencySign(); +} \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/IDiscordPermOverrideService.cs b/src/Nadeko.Bot.Common/IDiscordPermOverrideService.cs new file mode 100644 index 000000000..4ee2b27de --- /dev/null +++ b/src/Nadeko.Bot.Common/IDiscordPermOverrideService.cs @@ -0,0 +1,7 @@ +#nullable disable +namespace Nadeko.Common; + +public interface IDiscordPermOverrideService +{ + bool TryGetOverrides(ulong guildId, string commandName, out Nadeko.Bot.Db.GuildPerm? perm); +} \ No newline at end of file diff --git a/src/NadekoBot/Common/INadekoCommandOptions.cs b/src/Nadeko.Bot.Common/INadekoCommandOptions.cs similarity index 100% rename from src/NadekoBot/Common/INadekoCommandOptions.cs rename to src/Nadeko.Bot.Common/INadekoCommandOptions.cs diff --git a/src/Nadeko.Bot.Common/IPermissionChecker.cs b/src/Nadeko.Bot.Common/IPermissionChecker.cs new file mode 100644 index 000000000..90c9d68ab --- /dev/null +++ b/src/Nadeko.Bot.Common/IPermissionChecker.cs @@ -0,0 +1,15 @@ +using NadekoBot; +using NadekoBot.Services; +using OneOf; +using OneOf.Types; + +namespace Nadeko.Bot.Common; + +public interface IPermissionChecker +{ + Task>> CheckAsync(IGuild guild, + IMessageChannel channel, + IUser author, + string module, + string cmd); +} \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj b/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj index e5ce4812d..95fe5b51f 100644 --- a/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj +++ b/src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj @@ -15,10 +15,12 @@ + + all True @@ -29,9 +31,6 @@ - - PreserveNewest - - + diff --git a/src/NadekoBot/Common/TypeReaders/NadekoTypeReader.cs b/src/Nadeko.Bot.Common/NadekoTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/NadekoTypeReader.cs rename to src/Nadeko.Bot.Common/NadekoTypeReader.cs diff --git a/src/Nadeko.Bot.Common/Patronage/FeatureLimitKey.cs b/src/Nadeko.Bot.Common/Patronage/FeatureLimitKey.cs new file mode 100644 index 000000000..36780b0e2 --- /dev/null +++ b/src/Nadeko.Bot.Common/Patronage/FeatureLimitKey.cs @@ -0,0 +1,7 @@ +namespace NadekoBot.Modules.Utility.Patronage; + +public readonly struct FeatureLimitKey +{ + public string PrettyName { get; init; } + public string Key { get; init; } +} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Utility/Patronage/FeatureQuotaStats.cs b/src/Nadeko.Bot.Common/Patronage/FeatureQuotaStats.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/FeatureQuotaStats.cs rename to src/Nadeko.Bot.Common/Patronage/FeatureQuotaStats.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/_common/IPatronData.cs b/src/Nadeko.Bot.Common/Patronage/IPatronData.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/_common/IPatronData.cs rename to src/Nadeko.Bot.Common/Patronage/IPatronData.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/_common/IPatronageService.cs b/src/Nadeko.Bot.Common/Patronage/IPatronageService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/_common/IPatronageService.cs rename to src/Nadeko.Bot.Common/Patronage/IPatronageService.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/_common/ISubscriptionHandler.cs b/src/Nadeko.Bot.Common/Patronage/ISubscriptionHandler.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/_common/ISubscriptionHandler.cs rename to src/Nadeko.Bot.Common/Patronage/ISubscriptionHandler.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/Patron.cs b/src/Nadeko.Bot.Common/Patronage/Patron.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/Patron.cs rename to src/Nadeko.Bot.Common/Patronage/Patron.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/Config/PatronConfigData.cs b/src/Nadeko.Bot.Common/Patronage/PatronConfigData.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/Config/PatronConfigData.cs rename to src/Nadeko.Bot.Common/Patronage/PatronConfigData.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/PatronExtensions.cs b/src/Nadeko.Bot.Common/Patronage/PatronExtensions.cs similarity index 84% rename from src/NadekoBot/Modules/Utility/Patronage/PatronExtensions.cs rename to src/Nadeko.Bot.Common/Patronage/PatronExtensions.cs index afd8a0d0f..e41fc66b5 100644 --- a/src/NadekoBot/Modules/Utility/Patronage/PatronExtensions.cs +++ b/src/Nadeko.Bot.Common/Patronage/PatronExtensions.cs @@ -2,12 +2,6 @@ public static class PatronExtensions { - public static DateOnly ToDateOnly(this DateTime dateTime) - => DateOnly.FromDateTime(dateTime); - - public static bool IsBeforeToday(this DateTime date) - => date < DateTime.UtcNow.Date; - public static string ToFullName(this PatronTier tier) => tier switch { diff --git a/src/NadekoBot/Modules/Utility/Patronage/Config/PatronTier.cs b/src/Nadeko.Bot.Common/Patronage/PatronTier.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/Config/PatronTier.cs rename to src/Nadeko.Bot.Common/Patronage/PatronTier.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/QuotaLimit.cs b/src/Nadeko.Bot.Common/Patronage/QuotaLimit.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/QuotaLimit.cs rename to src/Nadeko.Bot.Common/Patronage/QuotaLimit.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/Config/QuotaPer.cs b/src/Nadeko.Bot.Common/Patronage/QuotaPer.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/Config/QuotaPer.cs rename to src/Nadeko.Bot.Common/Patronage/QuotaPer.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/SubscriptionChargeStatus.cs b/src/Nadeko.Bot.Common/Patronage/SubscriptionChargeStatus.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/SubscriptionChargeStatus.cs rename to src/Nadeko.Bot.Common/Patronage/SubscriptionChargeStatus.cs diff --git a/src/NadekoBot/Modules/Utility/Patronage/UserQuotaStats.cs b/src/Nadeko.Bot.Common/Patronage/UserQuotaStats.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Patronage/UserQuotaStats.cs rename to src/Nadeko.Bot.Common/Patronage/UserQuotaStats.cs diff --git a/src/NadekoBot/Services/CommandHandler.cs b/src/Nadeko.Bot.Common/Services/CommandHandler.cs similarity index 99% rename from src/NadekoBot/Services/CommandHandler.cs rename to src/Nadeko.Bot.Common/Services/CommandHandler.cs index 8671007bd..8fc9d6ac8 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/src/Nadeko.Bot.Common/Services/CommandHandler.cs @@ -24,7 +24,7 @@ public class CommandHandler : INService, IReadyExecutor, ICommandHandler private readonly DiscordSocketClient _client; private readonly CommandService _commandService; private readonly BotConfigService _bss; - private readonly Bot _bot; + private readonly IBot _bot; private readonly IBehaviorHandler _behaviorHandler; private readonly IServiceProvider _services; @@ -38,7 +38,7 @@ public class CommandHandler : INService, IReadyExecutor, ICommandHandler DbService db, CommandService commandService, BotConfigService bss, - Bot bot, + IBot bot, IBehaviorHandler behaviorHandler, // InteractionService interactions, IServiceProvider services) diff --git a/src/NadekoBot/Services/Currency/CurrencyService.cs b/src/Nadeko.Bot.Common/Services/Currency/CurrencyService.cs similarity index 100% rename from src/NadekoBot/Services/Currency/CurrencyService.cs rename to src/Nadeko.Bot.Common/Services/Currency/CurrencyService.cs diff --git a/src/NadekoBot/Services/Currency/CurrencyServiceExtensions.cs b/src/Nadeko.Bot.Common/Services/Currency/CurrencyServiceExtensions.cs similarity index 100% rename from src/NadekoBot/Services/Currency/CurrencyServiceExtensions.cs rename to src/Nadeko.Bot.Common/Services/Currency/CurrencyServiceExtensions.cs diff --git a/src/NadekoBot/Services/Currency/DefaultWallet.cs b/src/Nadeko.Bot.Common/Services/Currency/DefaultWallet.cs similarity index 100% rename from src/NadekoBot/Services/Currency/DefaultWallet.cs rename to src/Nadeko.Bot.Common/Services/Currency/DefaultWallet.cs diff --git a/src/NadekoBot/Services/Currency/GamblingTxTracker.cs b/src/Nadeko.Bot.Common/Services/Currency/GamblingTxTracker.cs similarity index 100% rename from src/NadekoBot/Services/Currency/GamblingTxTracker.cs rename to src/Nadeko.Bot.Common/Services/Currency/GamblingTxTracker.cs diff --git a/src/NadekoBot/Services/ILocalDataCache.cs b/src/Nadeko.Bot.Common/Services/ILocalDataCache.cs similarity index 100% rename from src/NadekoBot/Services/ILocalDataCache.cs rename to src/Nadeko.Bot.Common/Services/ILocalDataCache.cs diff --git a/src/Nadeko.Bot.Common/Services/IRemindService.cs b/src/Nadeko.Bot.Common/Services/IRemindService.cs new file mode 100644 index 000000000..e2276b717 --- /dev/null +++ b/src/Nadeko.Bot.Common/Services/IRemindService.cs @@ -0,0 +1,12 @@ +#nullable disable +namespace NadekoBot.Modules.Utility.Services; + +public interface IRemindService +{ + Task AddReminderAsync(ulong userId, + ulong targetId, + ulong? guildId, + bool isPrivate, + DateTime time, + string message); +} \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/Services/IStatsService.cs b/src/Nadeko.Bot.Common/Services/IStatsService.cs index 37a093020..62f727e81 100644 --- a/src/Nadeko.Bot.Common/Services/IStatsService.cs +++ b/src/Nadeko.Bot.Common/Services/IStatsService.cs @@ -13,11 +13,6 @@ public interface IStatsService /// long CommandsRan { get; } - /// - /// The Discord framework used by the bot. - /// - string Library { get; } - /// /// The amount of messages seen by the bot since startup. /// diff --git a/src/NadekoBot/Services/Impl/FontProvider.cs b/src/Nadeko.Bot.Common/Services/Impl/FontProvider.cs similarity index 100% rename from src/NadekoBot/Services/Impl/FontProvider.cs rename to src/Nadeko.Bot.Common/Services/Impl/FontProvider.cs diff --git a/src/Nadeko.Bot.Common/Services/Impl/IImageCache.cs b/src/Nadeko.Bot.Common/Services/Impl/IImageCache.cs new file mode 100644 index 000000000..2c3cf916d --- /dev/null +++ b/src/Nadeko.Bot.Common/Services/Impl/IImageCache.cs @@ -0,0 +1,17 @@ +namespace NadekoBot.Services; + +public interface IImageCache +{ + Task GetHeadsImageAsync(); + Task GetTailsImageAsync(); + Task GetCurrencyImageAsync(); + Task GetXpBackgroundImageAsync(); + Task GetRategirlBgAsync(); + Task GetRategirlDotAsync(); + Task GetDiceAsync(int num); + Task GetSlotEmojiAsync(int number); + Task GetSlotBgAsync(); + Task GetRipBgAsync(); + Task GetRipOverlayAsync(); + Task GetImageDataAsync(Uri url); +} \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/Services/Impl/ImagesConfig.cs b/src/Nadeko.Bot.Common/Services/Impl/ImagesConfig.cs new file mode 100644 index 000000000..f19aff44d --- /dev/null +++ b/src/Nadeko.Bot.Common/Services/Impl/ImagesConfig.cs @@ -0,0 +1,19 @@ +using NadekoBot.Common.Configs; + +namespace NadekoBot.Services; + +public sealed class ImagesConfig : ConfigServiceBase +{ + private const string PATH = "data/images.yml"; + + private static readonly TypedKey _changeKey = + new("config.images.updated"); + + public override string Name + => "images"; + + public ImagesConfig(IConfigSeria serializer, IPubSub pubSub) + : base(PATH, serializer, pubSub, _changeKey) + { + } +} \ No newline at end of file diff --git a/src/NadekoBot/Services/Impl/RedisImageExtensions.cs b/src/Nadeko.Bot.Common/Services/Impl/RedisImageExtensions.cs similarity index 100% rename from src/NadekoBot/Services/Impl/RedisImageExtensions.cs rename to src/Nadeko.Bot.Common/Services/Impl/RedisImageExtensions.cs diff --git a/src/NadekoBot/Services/Impl/SingleProcessCoordinator.cs b/src/Nadeko.Bot.Common/Services/Impl/SingleProcessCoordinator.cs similarity index 100% rename from src/NadekoBot/Services/Impl/SingleProcessCoordinator.cs rename to src/Nadeko.Bot.Common/Services/Impl/SingleProcessCoordinator.cs diff --git a/src/NadekoBot/Services/Impl/StartingGuildsListService.cs b/src/Nadeko.Bot.Common/Services/Impl/StartingGuildsListService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/StartingGuildsListService.cs rename to src/Nadeko.Bot.Common/Services/Impl/StartingGuildsListService.cs diff --git a/src/NadekoBot/Services/Impl/YtdlOperation.cs b/src/Nadeko.Bot.Common/Services/Impl/YtdlOperation.cs similarity index 100% rename from src/NadekoBot/Services/Impl/YtdlOperation.cs rename to src/Nadeko.Bot.Common/Services/Impl/YtdlOperation.cs diff --git a/src/NadekoBot/Services/strings/impl/BotStrings.cs b/src/Nadeko.Bot.Common/Services/strings/impl/BotStrings.cs similarity index 100% rename from src/NadekoBot/Services/strings/impl/BotStrings.cs rename to src/Nadeko.Bot.Common/Services/strings/impl/BotStrings.cs diff --git a/src/NadekoBot/Services/strings/impl/LocalFileStringsSource.cs b/src/Nadeko.Bot.Common/Services/strings/impl/LocalFileStringsSource.cs similarity index 100% rename from src/NadekoBot/Services/strings/impl/LocalFileStringsSource.cs rename to src/Nadeko.Bot.Common/Services/strings/impl/LocalFileStringsSource.cs diff --git a/src/NadekoBot/Services/strings/impl/MemoryBotStringsProvider.cs b/src/Nadeko.Bot.Common/Services/strings/impl/MemoryBotStringsProvider.cs similarity index 100% rename from src/NadekoBot/Services/strings/impl/MemoryBotStringsProvider.cs rename to src/Nadeko.Bot.Common/Services/strings/impl/MemoryBotStringsProvider.cs diff --git a/src/NadekoBot/Common/TypeReaders/TypeReaderResult.cs b/src/Nadeko.Bot.Common/TypeReaderResult.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/TypeReaderResult.cs rename to src/Nadeko.Bot.Common/TypeReaderResult.cs diff --git a/src/Nadeko.Bot.Common/_Extensions/Extensions.cs b/src/Nadeko.Bot.Common/_Extensions/Extensions.cs index e81e8ab8e..83934dbb4 100644 --- a/src/Nadeko.Bot.Common/_Extensions/Extensions.cs +++ b/src/Nadeko.Bot.Common/_Extensions/Extensions.cs @@ -11,6 +11,12 @@ namespace NadekoBot.Extensions; public static class Extensions { + public static DateOnly ToDateOnly(this DateTime dateTime) + => DateOnly.FromDateTime(dateTime); + + public static bool IsBeforeToday(this DateTime date) + => date < DateTime.UtcNow.Date; + private static readonly Regex _urlRegex = new(@"^(https?|ftp)://(?[^\s/$.?#].[^\s]*)$", RegexOptions.Compiled); @@ -40,7 +46,7 @@ public static class Extensions public static ulong[] GetGuildIds(this DiscordSocketClient client) => client.Guilds - .Map(x => x.Id); + .Map(x => x.Id); /// /// Generates a string in the format HHH:mm if timespan is >= 2m. @@ -98,7 +104,7 @@ public static class Extensions { description = strings.GetCommandStrings(cmd.Summary, culture).Desc; } - + return string.Format(description, prefix); } @@ -123,7 +129,7 @@ public static class Extensions { args = strings.GetCommandStrings(cmd.Summary, culture).Args; } - + return args.Map(arg => GetFullUsage(cmd.Aliases.First(), arg, prefix)); } @@ -154,8 +160,13 @@ public static class Extensions if (logService is not null) logService.AddDeleteIgnore(msg.Id); - try { await msg.DeleteAsync(); } - catch { } + try + { + await msg.DeleteAsync(); + } + catch + { + } }); return msg; } diff --git a/src/Nadeko.Bot.Common/data/last_known_version.txt b/src/Nadeko.Bot.Common/data/last_known_version.txt deleted file mode 100644 index d18c8f478..000000000 --- a/src/Nadeko.Bot.Common/data/last_known_version.txt +++ /dev/null @@ -1 +0,0 @@ -4.3.13 \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.deps.json b/src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.deps.json deleted file mode 100644 index f83b4fdbe..000000000 --- a/src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.deps.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v6.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v6.0": { - "NorthShirahebi/1.0.0": { - "dependencies": { - "Nadeko.Medusa": "4.3.10" - }, - "runtime": { - "NorthShirahebi.dll": {} - } - }, - "Discord.Net.Core/3.104.0": { - "dependencies": { - "Newtonsoft.Json": "13.0.1", - "System.Collections.Immutable": "5.0.0", - "System.Interactive.Async": "5.0.0", - "System.ValueTuple": "4.5.0" - } - }, - "Nadeko.Medusa/4.3.10": { - "dependencies": { - "Discord.Net.Core": "3.104.0", - "Serilog": "2.11.0", - "YamlDotNet": "11.2.1" - } - }, - "Newtonsoft.Json/13.0.1": {}, - "Serilog/2.11.0": {}, - "System.Collections.Immutable/5.0.0": {}, - "System.Interactive.Async/5.0.0": { - "dependencies": { - "System.Linq.Async": "5.0.0" - } - }, - "System.Linq.Async/5.0.0": {}, - "System.ValueTuple/4.5.0": {}, - "YamlDotNet/11.2.1": {} - } - }, - "libraries": { - "NorthShirahebi/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Discord.Net.Core/3.104.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kGCH8WA5C39oLGNb/4+r6M038BKnrxNFyjFZ0YPUiNXPki3CGCugMleSvPjUcUaz7UnvOFA9W8JzgN6KQWbuOQ==", - "path": "discord.net.core/3.104.0", - "hashPath": "discord.net.core.3.104.0.nupkg.sha512" - }, - "Nadeko.Medusa/4.3.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-vwuTD/Gu+6SBU5wG+wnaijcbjkAiYiQK2oTKCiJnP5uqWtLD33pTAoXNkMMu0soQj1hetFVoDUUbMLeg/JLAKg==", - "path": "nadeko.medusa/4.3.10", - "hashPath": "nadeko.medusa.4.3.10.nupkg.sha512" - }, - "Newtonsoft.Json/13.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==", - "path": "newtonsoft.json/13.0.1", - "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512" - }, - "Serilog/2.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ysv+hBzTul6Dp+Hvm10FlhJO3yMQcFKSAleus+LpiIzvNstpeV4Z7gGuIZ1OPNfIMulSHOjmLuGAEDKzpnV8ZQ==", - "path": "serilog/2.11.0", - "hashPath": "serilog.2.11.0.nupkg.sha512" - }, - "System.Collections.Immutable/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==", - "path": "system.collections.immutable/5.0.0", - "hashPath": "system.collections.immutable.5.0.0.nupkg.sha512" - }, - "System.Interactive.Async/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-QaqhQVDiULcu4vm6o89+iP329HcK44cETHOYgy/jfEjtzeFy0ZxmuM7nel9ocjnKxEM4yh1mli7hgh8Q9o+/Iw==", - "path": "system.interactive.async/5.0.0", - "hashPath": "system.interactive.async.5.0.0.nupkg.sha512" - }, - "System.Linq.Async/5.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-cPtIuuH8TIjVHSi2ewwReWGW1PfChPE0LxPIDlfwVcLuTM9GANFTXiMB7k3aC4sk3f0cQU25LNKzx+jZMxijqw==", - "path": "system.linq.async/5.0.0", - "hashPath": "system.linq.async.5.0.0.nupkg.sha512" - }, - "System.ValueTuple/4.5.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==", - "path": "system.valuetuple/4.5.0", - "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" - }, - "YamlDotNet/11.2.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tBt8K+korVfrjH9wyDEhiLKxbs8qoLCLIFwvYgkSUuMC9//w3z0cFQ8LQAI/5MCKq+BMil0cfRTRvPeE7eXhQw==", - "path": "yamldotnet/11.2.1", - "hashPath": "yamldotnet.11.2.1.nupkg.sha512" - } - } -} \ No newline at end of file diff --git a/src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.dll b/src/Nadeko.Bot.Common/data/medusae/NorthShirahebi/NorthShirahebi.dll deleted file mode 100644 index 8eaf4ca0abf36619d0f1359c912880cb6f295151..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30208 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 GetAllGuildConfigs( this DbSet configs, - List availableGuilds) + IReadOnlyList availableGuilds) => configs.IncludeEverything().AsNoTracking().Where(x => availableGuilds.Contains(x.GuildId)).ToList(); /// diff --git a/src/NadekoBot.Modules.Expresssions/ExportedExpr.cs b/src/Nadeko.Bot.Modules.Expresssions/ExportedExpr.cs similarity index 100% rename from src/NadekoBot.Modules.Expresssions/ExportedExpr.cs rename to src/Nadeko.Bot.Modules.Expresssions/ExportedExpr.cs diff --git a/src/NadekoBot.Modules.Expresssions/ExprField.cs b/src/Nadeko.Bot.Modules.Expresssions/ExprField.cs similarity index 100% rename from src/NadekoBot.Modules.Expresssions/ExprField.cs rename to src/Nadeko.Bot.Modules.Expresssions/ExprField.cs diff --git a/src/NadekoBot.Modules.Expresssions/GlobalUsings.cs b/src/Nadeko.Bot.Modules.Expresssions/GlobalUsings.cs similarity index 75% rename from src/NadekoBot.Modules.Expresssions/GlobalUsings.cs rename to src/Nadeko.Bot.Modules.Expresssions/GlobalUsings.cs index 9f214124f..f23c88d19 100644 --- a/src/NadekoBot.Modules.Expresssions/GlobalUsings.cs +++ b/src/Nadeko.Bot.Modules.Expresssions/GlobalUsings.cs @@ -23,9 +23,9 @@ global using Discord.WebSocket; // aliases global using GuildPerm = Discord.GuildPermission; global using ChannelPerm = Discord.ChannelPermission; -// global using BotPermAttribute = Discord.Commands.RequireBotPermissionAttribute; -// global using LeftoverAttribute = Discord.Commands.RemainderAttribute; -// global using TypeReaderResult = NadekoBot.Common.TypeReaders.TypeReaderResult; +global using BotPermAttribute = Discord.Commands.RequireBotPermissionAttribute; +global using LeftoverAttribute = Discord.Commands.RemainderAttribute; +global using TypeReaderResult = NadekoBot.Common.TypeReaders.TypeReaderResult; // non-essential // global using JetBrains.Annotations; \ No newline at end of file diff --git a/src/NadekoBot.Modules.Expresssions/NadekoBot.Modules.Expresssions.csproj b/src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj similarity index 91% rename from src/NadekoBot.Modules.Expresssions/NadekoBot.Modules.Expresssions.csproj rename to src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj index 57e4863e2..4dd08788e 100644 --- a/src/NadekoBot.Modules.Expresssions/NadekoBot.Modules.Expresssions.csproj +++ b/src/Nadeko.Bot.Modules.Expresssions/Nadeko.Bot.Modules.Expresssions.csproj @@ -4,6 +4,7 @@ net7.0 enable enable + NadekoBot.Modules.Expresssions diff --git a/src/NadekoBot.Modules.Expresssions/NadekoExpressionExtensions.cs b/src/Nadeko.Bot.Modules.Expresssions/NadekoExpressionExtensions.cs similarity index 100% rename from src/NadekoBot.Modules.Expresssions/NadekoExpressionExtensions.cs rename to src/Nadeko.Bot.Modules.Expresssions/NadekoExpressionExtensions.cs diff --git a/src/NadekoBot.Modules.Expresssions/NadekoExpressions.cs b/src/Nadeko.Bot.Modules.Expresssions/NadekoExpressions.cs similarity index 99% rename from src/NadekoBot.Modules.Expresssions/NadekoExpressions.cs rename to src/Nadeko.Bot.Modules.Expresssions/NadekoExpressions.cs index b97aab3ff..daa88fab6 100644 --- a/src/NadekoBot.Modules.Expresssions/NadekoExpressions.cs +++ b/src/Nadeko.Bot.Modules.Expresssions/NadekoExpressions.cs @@ -1,5 +1,7 @@ #nullable disable +using NadekoBot.Common.Attributes; + namespace NadekoBot.Modules.NadekoExpressions; [Name("Expressions")] diff --git a/src/NadekoBot.Modules.Expresssions/NadekoExpressionsService.cs b/src/Nadeko.Bot.Modules.Expresssions/NadekoExpressionsService.cs similarity index 89% rename from src/NadekoBot.Modules.Expresssions/NadekoExpressionsService.cs rename to src/Nadeko.Bot.Modules.Expresssions/NadekoExpressionsService.cs index f420ff00b..03a31f29e 100644 --- a/src/NadekoBot.Modules.Expresssions/NadekoExpressionsService.cs +++ b/src/Nadeko.Bot.Modules.Expresssions/NadekoExpressionsService.cs @@ -3,11 +3,10 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.Yml; using NadekoBot.Db; -using NadekoBot.Modules.Permissions.Common; -using NadekoBot.Modules.Permissions.Services; using NadekoBot.Services.Database.Models; using System.Runtime.CompilerServices; using LinqToDB.EntityFrameworkCore; +using Nadeko.Bot.Common; using Nadeko.Common; using NadekoBot.Services; using Serilog; @@ -66,12 +65,13 @@ public sealed class NadekoExpressionsService : IExecOnMessage, IReadyExecutor private readonly DbService _db; private readonly DiscordSocketClient _client; - private readonly PermissionService _perms; - private readonly CommandHandler _cmd; + // private readonly PermissionService _perms; + // private readonly GlobalPermissionService _gperm; + // private readonly CmdCdService _cmdCds; + private readonly IPermissionChecker _permChecker; + private readonly ICommandHandler _cmd; private readonly IBotStrings _strings; - private readonly Bot _bot; - private readonly GlobalPermissionService _gperm; - private readonly CmdCdService _cmdCds; + private readonly IBot _bot; private readonly IPubSub _pubSub; private readonly IEmbedBuilderService _eb; private readonly Random _rng; @@ -80,27 +80,23 @@ public sealed class NadekoExpressionsService : IExecOnMessage, IReadyExecutor private ConcurrentHashSet _disabledGlobalExpressionGuilds; public NadekoExpressionsService( - PermissionService perms, DbService db, IBotStrings strings, - Bot bot, + IBot bot, DiscordSocketClient client, - CommandHandler cmd, - GlobalPermissionService gperm, - CmdCdService cmdCds, + ICommandHandler cmd, IPubSub pubSub, - IEmbedBuilderService eb) + IEmbedBuilderService eb, + IPermissionChecker permChecker) { _db = db; _client = client; - _perms = perms; _cmd = cmd; _strings = strings; _bot = bot; - _gperm = gperm; - _cmdCds = cmdCds; _pubSub = pubSub; _eb = eb; + _permChecker = permChecker; _rng = new NadekoRandom(); _pubSub.Sub(_exprsReloadedKey, OnExprsShouldReload); @@ -123,7 +119,7 @@ public sealed class NadekoExpressionsService : IExecOnMessage, IReadyExecutor .ToDictionary(g => g.Key, g => g.Select(x => { - x.Trigger = x.Trigger.Replace(MENTION_PH, _bot.Mention); + x.Trigger = x.Trigger.Replace(MENTION_PH, _client.CurrentUser.Mention); return x; }) .ToArray()) @@ -141,7 +137,7 @@ public sealed class NadekoExpressionsService : IExecOnMessage, IReadyExecutor .AsEnumerable() .Select(x => { - x.Trigger = x.Trigger.Replace(MENTION_PH, _bot.Mention); + x.Trigger = x.Trigger.Replace(MENTION_PH, _client.CurrentUser.Mention); return x; }) .ToArray(); @@ -243,46 +239,59 @@ public sealed class NadekoExpressionsService : IExecOnMessage, IReadyExecutor if (expr is null || expr.Response == "-") return false; - if (await _cmdCds.TryBlock(guild, msg.Author, expr.Trigger)) + var result = await _permChecker.CheckAsync( + guild, + msg.Channel, + msg.Author, + "ACTUALEXPRESSIONS", + expr.Trigger + ); + + if (!result.IsT0) return false; + // todo print error etc + + // if (await _cmdCds.TryBlock(guild, msg.Author, expr.Trigger)) + // return false; + try { - if (_gperm.BlockedModules.Contains("ACTUALEXPRESSIONS")) - { - Log.Information( - "User {UserName} [{UserId}] tried to use an expression but 'ActualExpressions' are globally disabled", - msg.Author.ToString(), - msg.Author.Id); - - return true; - } - - if (guild is SocketGuild sg) - { - var pc = _perms.GetCacheFor(guild.Id); - if (!pc.Permissions.CheckPermissions(msg, expr.Trigger, "ACTUALEXPRESSIONS", out var index)) - { - if (pc.Verbose) - { - var permissionMessage = _strings.GetText(strs.perm_prevent(index + 1, - Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), sg))), - sg.Id); - - try - { - await msg.Channel.SendErrorAsync(_eb, permissionMessage); - } - catch - { - } - - Log.Information("{PermissionMessage}", permissionMessage); - } - - return true; - } - } + // if (_gperm.BlockedModules.Contains("ACTUALEXPRESSIONS")) + // { + // Log.Information( + // "User {UserName} [{UserId}] tried to use an expression but 'ActualExpressions' are globally disabled", + // msg.Author.ToString(), + // msg.Author.Id); + // + // return true; + // } + // + // if (guild is SocketGuild sg) + // { + // var pc = _perms.GetCacheFor(guild.Id); + // if (!pc.Permissions.CheckPermissions(msg, expr.Trigger, "ACTUALEXPRESSIONS", out var index)) + // { + // if (pc.Verbose) + // { + // var permissionMessage = _strings.GetText(strs.perm_prevent(index + 1, + // Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), sg))), + // sg.Id); + // + // try + // { + // await msg.Channel.SendErrorAsync(_eb, permissionMessage); + // } + // catch + // { + // } + // + // Log.Information("{PermissionMessage}", permissionMessage); + // } + // + // return true; + // } + // } var sentMsg = await expr.Send(msg, _client, false); @@ -582,8 +591,8 @@ public sealed class NadekoExpressionsService : IExecOnMessage, IReadyExecutor #region Event Handlers - public Task OnReadyAsync() - => ReloadInternal(_bot.GetCurrentGuildIds()); + public async Task OnReadyAsync() + => await OnExprsShouldReload(true); private ValueTask OnExprsShouldReload(bool _) => new(ReloadInternal(_bot.GetCurrentGuildIds())); diff --git a/src/NadekoBot.Modules.Expresssions/TypeReaders/CommandOrExprTypeReader.cs b/src/Nadeko.Bot.Modules.Expresssions/TypeReaders/CommandOrExprTypeReader.cs similarity index 86% rename from src/NadekoBot.Modules.Expresssions/TypeReaders/CommandOrExprTypeReader.cs rename to src/Nadeko.Bot.Modules.Expresssions/TypeReaders/CommandOrExprTypeReader.cs index b22e265a2..16cac6a72 100644 --- a/src/NadekoBot.Modules.Expresssions/TypeReaders/CommandOrExprTypeReader.cs +++ b/src/Nadeko.Bot.Modules.Expresssions/TypeReaders/CommandOrExprTypeReader.cs @@ -1,13 +1,16 @@ #nullable disable +using NadekoBot.Modules.NadekoExpressions; +using NadekoBot.Services; + namespace NadekoBot.Common.TypeReaders; public sealed class CommandOrExprTypeReader : NadekoTypeReader { private readonly CommandService _cmds; - private readonly CommandHandler _commandHandler; + private readonly ICommandHandler _commandHandler; private readonly NadekoExpressionsService _exprs; - public CommandOrExprTypeReader(CommandService cmds, NadekoExpressionsService exprs, CommandHandler commandHandler) + public CommandOrExprTypeReader(CommandService cmds, NadekoExpressionsService exprs, ICommandHandler commandHandler) { _cmds = cmds; _exprs = exprs; diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRace.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRace.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRace.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRace.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRaceService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRaceService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRaceService.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRacingCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRacingCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRacingUser.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/AnimalRacingUser.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/AnimalRacingUser.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/AlreadyJoinedException.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/AlreadyStartedException.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/AnimalRaceFullException.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/Exceptions/NotEnoughFundsException.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacing/RaceOptions.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/RaceOptions.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacing/RaceOptions.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/AnimalRacing/RaceOptions.cs diff --git a/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Bank/BankService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Bank/BankService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/BankService.cs diff --git a/src/NadekoBot/Modules/Gambling/Bank/IBankService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/IBankService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Bank/IBankService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Bank/IBankService.cs diff --git a/src/NadekoBot/Modules/Gambling/BlackJack/BlackJackCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/BlackJackCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/BlackJack/BlackJackCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/BlackJackCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/BlackJack/BlackJackService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/BlackJackService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/BlackJack/BlackJackService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/BlackJackService.cs diff --git a/src/NadekoBot/Modules/Gambling/BlackJack/Blackjack.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/Blackjack.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/BlackJack/Blackjack.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/Blackjack.cs diff --git a/src/NadekoBot/Modules/Gambling/BlackJack/Player.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/Player.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/BlackJack/Player.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/BlackJack/Player.cs diff --git a/src/NadekoBot/Modules/Gambling/Connect4/Connect4.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Connect4/Connect4.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Connect4/Connect4.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Connect4/Connect4.cs diff --git a/src/NadekoBot/Modules/Gambling/Connect4/Connect4Commands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Connect4/Connect4Commands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Connect4/Connect4Commands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Connect4/Connect4Commands.cs diff --git a/src/NadekoBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/DiceRoll/DiceRollCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/DiceRoll/DiceRollCommands.cs index c49fe3930..76e0ed284 100644 --- a/src/NadekoBot/Modules/Gambling/DiceRoll/DiceRollCommands.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/DiceRoll/DiceRollCommands.cs @@ -19,7 +19,7 @@ public partial class Gambling private static readonly char[] _fateRolls = { '-', ' ', '+' }; private readonly IImageCache _images; - public DiceRollCommands(ImageCache images) + public DiceRollCommands(IImageCache images) => _images = images; [Cmd] diff --git a/src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Draw/DrawCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Draw/DrawCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/EconomyResult.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/EconomyResult.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/EconomyResult.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/EconomyResult.cs diff --git a/src/NadekoBot/Modules/Gambling/Events/CurrencyEventsCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Events/CurrencyEventsCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Events/CurrencyEventsCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Events/CurrencyEventsCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Events/CurrencyEventsService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Events/CurrencyEventsService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Events/CurrencyEventsService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Events/CurrencyEventsService.cs diff --git a/src/NadekoBot/Modules/Gambling/Events/EventOptions.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Events/EventOptions.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Events/EventOptions.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Events/EventOptions.cs diff --git a/src/NadekoBot/Modules/Gambling/Events/GameStatusEvent.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Events/GameStatusEvent.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Events/GameStatusEvent.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Events/GameStatusEvent.cs diff --git a/src/NadekoBot/Modules/Gambling/Events/ICurrencyEvent.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Events/ICurrencyEvent.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Events/ICurrencyEvent.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Events/ICurrencyEvent.cs diff --git a/src/NadekoBot/Modules/Gambling/Events/ReactionEvent.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Events/ReactionEvent.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Events/ReactionEvent.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Events/ReactionEvent.cs diff --git a/src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/FlipCoin/FlipCoinCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/FlipCoin/FlipCoinCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/FlipCoin/FlipResult.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/FlipCoin/FlipResult.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/FlipCoin/FlipResult.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/FlipCoin/FlipResult.cs diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Gambling.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/Gambling.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Gambling.cs index 28bd148b8..136ab7f36 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Gambling.cs @@ -29,7 +29,7 @@ public partial class Gambling : GamblingModule private readonly GamblingConfigService _configService; private readonly IBankService _bank; private readonly IPatronageService _ps; - private readonly RemindService _remind; + private readonly IRemindService _remind; private readonly GamblingTxTracker _gamblingTxTracker; private IUserMessage rdMsg; @@ -43,7 +43,7 @@ public partial class Gambling : GamblingModule GamblingConfigService configService, IBankService bank, IPatronageService ps, - RemindService remind, + IRemindService remind, GamblingTxTracker gamblingTxTracker) : base(configService) { diff --git a/src/NadekoBot/Modules/Gambling/GamblingConfig.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingConfig.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/GamblingConfig.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingConfig.cs diff --git a/src/NadekoBot/Modules/Gambling/GamblingConfigService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingConfigService.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/GamblingConfigService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingConfigService.cs index 3f4bbefe6..d67072c6e 100644 --- a/src/NadekoBot/Modules/Gambling/GamblingConfigService.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingConfigService.cs @@ -1,6 +1,8 @@ #nullable disable +using Nadeko.Common; using NadekoBot.Common.Configs; using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Services; namespace NadekoBot.Modules.Gambling.Services; diff --git a/src/NadekoBot/Modules/Gambling/GamblingService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingService.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/GamblingService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingService.cs index d64761afa..1ba66d96e 100644 --- a/src/NadekoBot/Modules/Gambling/GamblingService.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingService.cs @@ -15,7 +15,7 @@ public class GamblingService : INService, IReadyExecutor public ConcurrentDictionary Connect4Games { get; } = new(); private readonly DbService _db; private readonly ICurrencyService _cs; - private readonly Bot _bot; + private readonly IBot _bot; private readonly DiscordSocketClient _client; private readonly IBotCache _cache; private readonly GamblingConfigService _gss; @@ -24,7 +24,6 @@ public class GamblingService : INService, IReadyExecutor public GamblingService( DbService db, - Bot bot, ICurrencyService cs, DiscordSocketClient client, IBotCache cache, @@ -32,7 +31,6 @@ public class GamblingService : INService, IReadyExecutor { _db = db; _cs = cs; - _bot = bot; _client = client; _cache = cache; _gss = gss; @@ -43,7 +41,7 @@ public class GamblingService : INService, IReadyExecutor private async Task TransactionClearLoopAsync() { - if (_bot.Client.ShardId != 0) + if (_client.ShardId != 0) return; using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); @@ -72,7 +70,7 @@ public class GamblingService : INService, IReadyExecutor private async Task CurrencyDecayLoopAsync() { - if (_bot.Client.ShardId != 0) + if (_client.ShardId != 0) return; using var timer = new PeriodicTimer(TimeSpan.FromMinutes(5)); diff --git a/src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingTopLevelModule.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingTopLevelModule.cs index c1a53e779..2fe50e876 100644 --- a/src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/GamblingTopLevelModule.cs @@ -2,6 +2,8 @@ using NadekoBot.Modules.Gambling.Services; using System.Globalization; using System.Numerics; +using Discord; +using NadekoBot.Common; namespace NadekoBot.Modules.Gambling.Common; diff --git a/src/Nadeko.Bot.Modules.Gambling/Gambling/GlobalUsings.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/GlobalUsings.cs new file mode 100644 index 000000000..f36328bd4 --- /dev/null +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/GlobalUsings.cs @@ -0,0 +1,31 @@ +// global using System.Collections.Concurrent; +global using NonBlocking; + +// packages +global using Serilog; +global using Humanizer; + +// nadekobot +global using NadekoBot; +global using NadekoBot.Services; +global using Nadeko.Common; // new project +global using NadekoBot.Common; // old + nadekobot specific things +global using NadekoBot.Common.Attributes; +global using NadekoBot.Extensions; +global using Nadeko.Snake; + +// discord +global using Discord; +global using Discord.Commands; +global using Discord.Net; +global using Discord.WebSocket; + +// aliases +global using GuildPerm = Discord.GuildPermission; +global using ChannelPerm = Discord.ChannelPermission; +global using BotPermAttribute = Discord.Commands.RequireBotPermissionAttribute; +global using LeftoverAttribute = Discord.Commands.RemainderAttribute; +global using TypeReaderResult = NadekoBot.Common.TypeReaders.TypeReaderResult; + +// non-essential +global using JetBrains.Annotations; \ No newline at end of file diff --git a/src/NadekoBot/Modules/Gambling/InputRpsPick.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/InputRpsPick.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/InputRpsPick.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/InputRpsPick.cs diff --git a/src/NadekoBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/PlantPick/PlantAndPickCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/PlantPick/PlantAndPickCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/PlantPick/PlantPickService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/PlantPick/PlantPickService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/PlantPick/PlantPickService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/PlantPick/PlantPickService.cs diff --git a/src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Raffle/CurrencyRaffleCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Raffle/CurrencyRaffleCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Raffle/CurrencyRaffleGame.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Raffle/CurrencyRaffleGame.cs diff --git a/src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Raffle/CurrencyRaffleService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Raffle/CurrencyRaffleService.cs diff --git a/src/NadekoBot/Modules/Gambling/Shop/IShopService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/IShopService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Shop/IShopService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/IShopService.cs diff --git a/src/NadekoBot/Modules/Gambling/Shop/ShopCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Shop/ShopCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Shop/ShopService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Shop/ShopService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Shop/ShopService.cs diff --git a/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Slot/SlotCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Slot/SlotCommands.cs index f0a6db472..2599f0d1b 100644 --- a/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Slot/SlotCommands.cs @@ -34,7 +34,7 @@ public partial class Gambling private object _slotStatsLock = new(); public SlotCommands( - ImageCache images, + IImageCache images, FontProvider fonts, DbService db, GamblingConfigService gamb) diff --git a/src/NadekoBot/Modules/Gambling/VoteRewardService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/VoteRewardService.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/VoteRewardService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/VoteRewardService.cs index 1a92cefdb..fc656b1e6 100644 --- a/src/NadekoBot/Modules/Gambling/VoteRewardService.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/VoteRewardService.cs @@ -2,6 +2,9 @@ using NadekoBot.Common.ModuleBehaviors; using System.Text.Json; using System.Text.Json.Serialization; +using Discord.WebSocket; +using NadekoBot.Services; +using Serilog; namespace NadekoBot.Modules.Gambling.Services; diff --git a/src/NadekoBot/Modules/Gambling/Waifus/Common/AffinityTitle.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/AffinityTitle.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/Common/AffinityTitle.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/AffinityTitle.cs diff --git a/src/NadekoBot/Modules/Gambling/Waifus/Common/ClaimTitle.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/ClaimTitle.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/Common/ClaimTitle.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/ClaimTitle.cs diff --git a/src/NadekoBot/Modules/Gambling/Waifus/Common/DivorceResult.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/DivorceResult.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/Common/DivorceResult.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/DivorceResult.cs diff --git a/src/NadekoBot/Modules/Gambling/Waifus/Common/Extensions.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/Extensions.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/Common/Extensions.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/Extensions.cs diff --git a/src/NadekoBot/Modules/Gambling/Waifus/Common/WaifuClaimResult.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/WaifuClaimResult.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/Common/WaifuClaimResult.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/Common/WaifuClaimResult.cs diff --git a/src/NadekoBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuClaimCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuClaimCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Waifus/WaifuService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Waifus/WaifuService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuService.cs diff --git a/src/NadekoBot/Modules/Gambling/~Shared/Decks/QuadDeck.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/Decks/QuadDeck.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/~Shared/Decks/QuadDeck.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/Decks/QuadDeck.cs diff --git a/src/NadekoBot/Modules/Gambling/~Shared/IGamblingService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/IGamblingService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/~Shared/IGamblingService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/IGamblingService.cs diff --git a/src/NadekoBot/Modules/Gambling/~Shared/NewGamblingService.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/NewGamblingService.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/~Shared/NewGamblingService.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/NewGamblingService.cs diff --git a/src/NadekoBot/Modules/Gambling/~Shared/RollDuelGame.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/RollDuelGame.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/~Shared/RollDuelGame.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/RollDuelGame.cs diff --git a/src/NadekoBot/Common/TypeReaders/Shmart/BaseShmartInputAmountReader.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders/BaseShmartInputAmountReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Shmart/BaseShmartInputAmountReader.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders/BaseShmartInputAmountReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/Shmart/ShmartBankInputAmountReader.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders/ShmartBankInputAmountReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Shmart/ShmartBankInputAmountReader.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders/ShmartBankInputAmountReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/Shmart/ShmartNumberTypeReader.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders/ShmartNumberTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Shmart/ShmartNumberTypeReader.cs rename to src/Nadeko.Bot.Modules.Gambling/Gambling/_Common/TypeReaders/ShmartNumberTypeReader.cs diff --git a/src/NadekoBot/Modules/Games/Acrophobia/Acrophobia.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Acrophobia/Acrophobia.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Acrophobia/Acrophobia.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Acrophobia/Acrophobia.cs diff --git a/src/NadekoBot/Modules/Games/Acrophobia/AcrophobiaUser.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Acrophobia/AcrophobiaUser.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Acrophobia/AcrophobiaUser.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Acrophobia/AcrophobiaUser.cs diff --git a/src/NadekoBot/Modules/Games/Acrophobia/AcropobiaCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Acrophobia/AcropobiaCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Acrophobia/AcropobiaCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Acrophobia/AcropobiaCommands.cs diff --git a/src/NadekoBot/Modules/Games/ChatterBot/ChatterbotService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/ChatterbotService.cs similarity index 86% rename from src/NadekoBot/Modules/Games/ChatterBot/ChatterbotService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/ChatterbotService.cs index 7900f34f1..e5e11e0a8 100644 --- a/src/NadekoBot/Modules/Games/ChatterBot/ChatterbotService.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/ChatterbotService.cs @@ -1,11 +1,10 @@ #nullable disable +using Nadeko.Bot.Common; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Db.Models; using NadekoBot.Modules.Games.Common; using NadekoBot.Modules.Games.Common.ChatterBot; using NadekoBot.Modules.Permissions; -using NadekoBot.Modules.Permissions.Common; -using NadekoBot.Modules.Permissions.Services; using NadekoBot.Modules.Utility.Patronage; namespace NadekoBot.Modules.Games.Services; @@ -20,27 +19,25 @@ public class ChatterBotService : IExecOnMessage private readonly FeatureLimitKey _flKey; private readonly DiscordSocketClient _client; - private readonly PermissionService _perms; + private readonly IPermissionChecker _perms; private readonly CommandHandler _cmd; private readonly IBotStrings _strings; private readonly IBotCredentials _creds; private readonly IEmbedBuilderService _eb; private readonly IHttpClientFactory _httpFactory; private readonly IPatronageService _ps; - private readonly CmdCdService _ccs; private readonly GamesConfigService _gcs; public ChatterBotService( DiscordSocketClient client, - PermissionService perms, - Bot bot, + IPermissionChecker perms, + IBot bot, CommandHandler cmd, IBotStrings strings, IHttpClientFactory factory, IBotCredentials creds, IEmbedBuilderService eb, IPatronageService ps, - CmdCdService cmdCdService, GamesConfigService gcs) { _client = client; @@ -51,7 +48,7 @@ public class ChatterBotService : IExecOnMessage _eb = eb; _httpFactory = factory; _ps = ps; - _ccs = cmdCdService; + _perms = perms; _gcs = gcs; _flKey = new FeatureLimitKey() @@ -128,30 +125,17 @@ public class ChatterBotService : IExecOnMessage if (message is null || cbs is null) return false; - var pc = _perms.GetCacheFor(guild.Id); - if (!pc.Permissions.CheckPermissions(usrMsg, - "cleverbot", - "games", - out var index)) - { - if (pc.Verbose) - { - var returnMsg = _strings.GetText(strs.perm_prevent(index + 1, - Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(sg), sg)))); - - try { await usrMsg.Channel.SendErrorAsync(_eb, returnMsg); } - catch { } - - Log.Information("{PermissionMessage}", returnMsg); - } - - return false; - } - - if (await _ccs.TryBlock(sg, usrMsg.Author, CleverBotResponseStr.CLEVERBOT_RESPONSE)) - { + var res = await _perms.CheckAsync(sg, + usrMsg.Channel, + usrMsg.Author, + "games", + CleverBotResponseStr.CLEVERBOT_RESPONSE); + + // todo this needs checking, this might block all messages in a channel if cleverbot is enabled but blocked + // need to check what kind of block it is + // might be the case for other classes using permission checker + if (!res.IsT0) return true; - } var channel = (ITextChannel)usrMsg.Channel; var conf = _ps.GetConfig(); diff --git a/src/NadekoBot/Modules/Games/ChatterBot/CleverBotCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/CleverBotCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/ChatterBot/CleverBotCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/CleverBotCommands.cs diff --git a/src/NadekoBot/Modules/Games/ChatterBot/_Common/CleverbotResponse.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/CleverbotResponse.cs similarity index 100% rename from src/NadekoBot/Modules/Games/ChatterBot/_Common/CleverbotResponse.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/CleverbotResponse.cs diff --git a/src/NadekoBot/Modules/Games/ChatterBot/_Common/Gpt3Response.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/Gpt3Response.cs similarity index 100% rename from src/NadekoBot/Modules/Games/ChatterBot/_Common/Gpt3Response.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/Gpt3Response.cs diff --git a/src/NadekoBot/Modules/Games/ChatterBot/_Common/IChatterBotSession.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/IChatterBotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/ChatterBot/_Common/IChatterBotSession.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/IChatterBotSession.cs diff --git a/src/NadekoBot/Modules/Games/ChatterBot/_Common/OfficialCleverbotSession.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/OfficialCleverbotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/ChatterBot/_Common/OfficialCleverbotSession.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/OfficialCleverbotSession.cs diff --git a/src/NadekoBot/Modules/Games/ChatterBot/_Common/OfficialGpt3Session.cs b/src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/OfficialGpt3Session.cs similarity index 100% rename from src/NadekoBot/Modules/Games/ChatterBot/_Common/OfficialGpt3Session.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/ChatterBot/_Common/OfficialGpt3Session.cs diff --git a/src/NadekoBot/Modules/Games/Games.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Games.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Games.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Games.cs diff --git a/src/NadekoBot/Modules/Games/GamesConfig.cs b/src/Nadeko.Bot.Modules.Gambling/Games/GamesConfig.cs similarity index 100% rename from src/NadekoBot/Modules/Games/GamesConfig.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/GamesConfig.cs diff --git a/src/NadekoBot/Modules/Games/GamesConfigService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/GamesConfigService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/GamesConfigService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/GamesConfigService.cs diff --git a/src/NadekoBot/Modules/Games/GamesService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/GamesService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/GamesService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/GamesService.cs diff --git a/src/NadekoBot/Modules/Games/GirlRating.cs b/src/Nadeko.Bot.Modules.Gambling/Games/GirlRating.cs similarity index 100% rename from src/NadekoBot/Modules/Games/GirlRating.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/GirlRating.cs diff --git a/src/NadekoBot/Modules/Games/Hangman/DefaultHangmanSource.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/DefaultHangmanSource.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Hangman/DefaultHangmanSource.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/DefaultHangmanSource.cs diff --git a/src/NadekoBot/Modules/Games/Hangman/HangmanCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Hangman/HangmanCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanCommands.cs diff --git a/src/NadekoBot/Modules/Games/Hangman/HangmanGame.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanGame.cs similarity index 92% rename from src/NadekoBot/Modules/Games/Hangman/HangmanGame.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanGame.cs index e878687fd..82b86bcd4 100644 --- a/src/NadekoBot/Modules/Games/Hangman/HangmanGame.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanGame.cs @@ -1,5 +1,4 @@ #nullable disable -using AngleSharp.Text; namespace NadekoBot.Modules.Games.Hangman; @@ -23,7 +22,7 @@ public sealed class HangmanGame _word = term.Word; _imageUrl = term.ImageUrl; - _remaining = _word.ToLowerInvariant().Where(x => x.IsLetter()).Select(char.ToLowerInvariant).ToHashSet(); + _remaining = _word.ToLowerInvariant().Where(x => char.IsLetter(x)).Select(char.ToLowerInvariant).ToHashSet(); } public State GetState(GuessResult guessResult = GuessResult.NoAction) @@ -42,7 +41,7 @@ public sealed class HangmanGame var ch = _word[i]; if (ch == ' ') output[i * 2] = ' '; - if (!ch.IsLetter() || !_remaining.Contains(char.ToLowerInvariant(ch))) + if (!char.IsLetter(ch) || !_remaining.Contains(char.ToLowerInvariant(ch))) output[i * 2] = ch; else output[i * 2] = '_'; diff --git a/src/NadekoBot/Modules/Games/Hangman/HangmanService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Hangman/HangmanService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanService.cs diff --git a/src/NadekoBot/Modules/Games/Hangman/HangmanTerm.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanTerm.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Hangman/HangmanTerm.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/HangmanTerm.cs diff --git a/src/NadekoBot/Modules/Games/Hangman/IHangmanService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/IHangmanService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Hangman/IHangmanService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/IHangmanService.cs diff --git a/src/NadekoBot/Modules/Games/Hangman/IHangmanSource.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Hangman/IHangmanSource.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Hangman/IHangmanSource.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Hangman/IHangmanSource.cs diff --git a/src/NadekoBot/Modules/Games/Nunchi/Nunchi.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Nunchi/Nunchi.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Nunchi/Nunchi.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Nunchi/Nunchi.cs diff --git a/src/NadekoBot/Modules/Games/Nunchi/NunchiCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Nunchi/NunchiCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Nunchi/NunchiCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Nunchi/NunchiCommands.cs diff --git a/src/NadekoBot/Modules/Games/Polls/PollCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Polls/PollCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Polls/PollCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Polls/PollCommands.cs diff --git a/src/NadekoBot/Modules/Games/Polls/PollRunner.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Polls/PollRunner.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Polls/PollRunner.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Polls/PollRunner.cs diff --git a/src/NadekoBot/Modules/Games/Polls/PollService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Polls/PollService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Polls/PollService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Polls/PollService.cs diff --git a/src/NadekoBot/Modules/Games/SpeedTyping/SpeedTypingCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/SpeedTyping/SpeedTypingCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/SpeedTyping/SpeedTypingCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/SpeedTyping/SpeedTypingCommands.cs diff --git a/src/NadekoBot/Modules/Games/SpeedTyping/TypingArticle.cs b/src/Nadeko.Bot.Modules.Gambling/Games/SpeedTyping/TypingArticle.cs similarity index 100% rename from src/NadekoBot/Modules/Games/SpeedTyping/TypingArticle.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/SpeedTyping/TypingArticle.cs diff --git a/src/NadekoBot/Modules/Games/SpeedTyping/TypingGame.cs b/src/Nadeko.Bot.Modules.Gambling/Games/SpeedTyping/TypingGame.cs similarity index 100% rename from src/NadekoBot/Modules/Games/SpeedTyping/TypingGame.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/SpeedTyping/TypingGame.cs diff --git a/src/NadekoBot/Modules/Games/TicTacToe/TicTacToe.cs b/src/Nadeko.Bot.Modules.Gambling/Games/TicTacToe/TicTacToe.cs similarity index 100% rename from src/NadekoBot/Modules/Games/TicTacToe/TicTacToe.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/TicTacToe/TicTacToe.cs diff --git a/src/NadekoBot/Modules/Games/TicTacToe/TicTacToeCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Games/TicTacToe/TicTacToeCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/TicTacToe/TicTacToeCommands.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/TicTacToe/TicTacToeCommands.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/Games.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/Games.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/Games.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/Games.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/QuestionPool/DefaultQuestionPool.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/QuestionPool/DefaultQuestionPool.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/QuestionPool/DefaultQuestionPool.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/QuestionPool/DefaultQuestionPool.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/QuestionPool/IQuestionPool.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/QuestionPool/IQuestionPool.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/QuestionPool/IQuestionPool.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/QuestionPool/IQuestionPool.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/QuestionPool/PokemonQuestionPool.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/QuestionPool/PokemonQuestionPool.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/QuestionPool/PokemonQuestionPool.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/QuestionPool/PokemonQuestionPool.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/TriviaGame.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaGame.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/TriviaGame.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaGame.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/TriviaGamesService.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaGamesService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/TriviaGamesService.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaGamesService.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/TriviaOptions.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaOptions.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/TriviaOptions.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaOptions.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/TriviaQuestion.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaQuestion.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/TriviaQuestion.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaQuestion.cs diff --git a/src/NadekoBot/Modules/Games/Trivia/TriviaUser.cs b/src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaUser.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Trivia/TriviaUser.cs rename to src/Nadeko.Bot.Modules.Gambling/Games/Trivia/TriviaUser.cs diff --git a/src/Nadeko.Bot.Modules.Gambling/Nadeko.Bot.Modules.Gambling.csproj b/src/Nadeko.Bot.Modules.Gambling/Nadeko.Bot.Modules.Gambling.csproj new file mode 100644 index 000000000..1a78c0607 --- /dev/null +++ b/src/Nadeko.Bot.Modules.Gambling/Nadeko.Bot.Modules.Gambling.csproj @@ -0,0 +1,19 @@ + + + + net7.0 + enable + enable + + + + + + + + + + + + + diff --git a/src/NadekoBot/Bot.cs b/src/NadekoBot/Bot.cs index f15216809..21b6072ab 100644 --- a/src/NadekoBot/Bot.cs +++ b/src/NadekoBot/Bot.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using NadekoBot.Common.Configs; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Db; +using NadekoBot.Modules.NadekoExpressions; using NadekoBot.Modules.Utility; using NadekoBot.Services.Database.Models; using Ninject; @@ -15,15 +16,16 @@ using RunMode = Discord.Commands.RunMode; namespace NadekoBot; -public sealed class Bot +public sealed class Bot : IBot { public event Func JoinedGuild = delegate { return Task.CompletedTask; }; public DiscordSocketClient Client { get; } - public ImmutableArray AllGuildConfigs { get; private set; } + public IReadOnlyCollection AllGuildConfigs { get; private set; } private IKernel Services { get; set; } + // todo remove public string Mention { get; private set; } public bool IsReady { get; private set; } public int ShardId { get; set; } @@ -33,6 +35,8 @@ public sealed class Bot private readonly DbService _db; private readonly IBotCredsProvider _credsProvider; + + private readonly Assembly[] _moduleAssemblies; // private readonly InteractionService _interactionService; public Bot(int shardId, int? totalShards, string credPath = null) @@ -83,10 +87,18 @@ public sealed class Bot // _interactionService = new(Client.Rest); Client.Log += Client_Log; + _moduleAssemblies = new[] + { + typeof(Bot).Assembly, // bot + typeof(Creds).Assembly, // bot.common + + // modules + typeof(NadekoExpressions).Assembly, + }; } - public List GetCurrentGuildIds() + public IReadOnlyList GetCurrentGuildIds() => Client.Guilds.Select(x => x.Id).ToList(); private void AddServices() @@ -117,14 +129,21 @@ public sealed class Bot kernel.Bind().ToConstant(Client).InSingletonScope(); kernel.Bind().ToConstant(_commandService).InSingletonScope(); kernel.Bind().ToConstant(this).InSingletonScope(); + kernel.Bind().ToConstant(this).InSingletonScope(); kernel.Bind().To().InSingletonScope(); kernel.Bind().To().InSingletonScope(); kernel.Bind().ToConstant(new MemoryCache(new MemoryCacheOptions())).InSingletonScope(); - kernel.AddConfigServices() - .AddConfigMigrators() - .AddMusic() + + foreach (var a in _moduleAssemblies) + { + kernel.AddConfigServices(a) + .AddConfigMigrators(a) + .AddLifetimeServices(a); + } + + kernel.AddMusic() .AddCache(_creds) .AddHttpClients(); @@ -137,8 +156,6 @@ public sealed class Bot kernel.Bind().To().InSingletonScope(); } - kernel.AddLifetimeServices(); - kernel.Bind().ToConstant(kernel).InSingletonScope(); //initialize Services @@ -149,7 +166,10 @@ public sealed class Bot if (Client.ShardId == 0) ApplyConfigMigrations(); - LoadTypeReaders(typeof(Bot).Assembly); + foreach (var a in _moduleAssemblies) + { + LoadTypeReaders(a); + } sw.Stop(); Log.Information("All services loaded in {ServiceLoadTime:F2}s", sw.Elapsed.TotalSeconds); @@ -166,16 +186,16 @@ public sealed class Bot private void LoadTypeReaders(Assembly assembly) { var filteredTypes = assembly.GetTypes() - .Where(x => x.IsSubclassOf(typeof(TypeReader)) - && x.BaseType?.GetGenericArguments().Length > 0 - && !x.IsAbstract); - + .Where(x => x.IsSubclassOf(typeof(TypeReader)) + && x.BaseType?.GetGenericArguments().Length > 0 + && !x.IsAbstract); + foreach (var ft in filteredTypes) { var baseType = ft.BaseType; if (baseType is null) continue; - + var typeReader = (TypeReader)ActivatorUtilities.CreateInstance(Services, ft); var typeArgs = baseType.GetGenericArguments(); _commandService.AddTypeReader(typeArgs[0], typeReader); @@ -280,7 +300,11 @@ public sealed class Bot // start handling messages received in commandhandler await commandHandler.StartHandling(); - await _commandService.AddModulesAsync(typeof(Bot).Assembly, Services); + foreach (var a in _moduleAssemblies) + { + await _commandService.AddModulesAsync(a, Services); + } + // await _interactionService.AddModulesAsync(typeof(Bot).Assembly, Services); IsReady = true; diff --git a/src/NadekoBot/Common/ServiceCollectionExtensions.cs b/src/NadekoBot/Common/ServiceCollectionExtensions.cs index 84c1bccfd..e4ebfaa28 100644 --- a/src/NadekoBot/Common/ServiceCollectionExtensions.cs +++ b/src/NadekoBot/Common/ServiceCollectionExtensions.cs @@ -34,11 +34,11 @@ public static class ServiceCollectionExtensions return kernel; } - public static IKernel AddConfigServices(this IKernel kernel) + public static IKernel AddConfigServices(this IKernel kernel, Assembly a) { kernel.Bind(x => { - var configs = x.FromThisAssembly() + var configs = x.From(a) .SelectAllClasses() .Where(f => f.IsAssignableToGenericType(typeof(ConfigServiceBase<>))); @@ -49,8 +49,8 @@ public static class ServiceCollectionExtensions return kernel; } - public static IKernel AddConfigMigrators(this IKernel kernel) - => kernel.AddSealedSubclassesOf(typeof(IConfigMigrator)); + public static IKernel AddConfigMigrators(this IKernel kernel, Assembly a) + => kernel.AddSealedSubclassesOf(typeof(IConfigMigrator), a); public static IKernel AddMusic(this IKernel kernel) { @@ -69,11 +69,11 @@ public static class ServiceCollectionExtensions return kernel; } - public static IKernel AddSealedSubclassesOf(this IKernel kernel, Type baseType) + public static IKernel AddSealedSubclassesOf(this IKernel kernel, Type baseType, Assembly a) { kernel.Bind(x => { - var classes = x.FromThisAssembly() + var classes = x.From(a) .SelectAllClasses() .Where(c => c.IsPublic && c.IsNested && baseType.IsAssignableFrom(baseType)); @@ -128,11 +128,11 @@ public static class ServiceCollectionExtensions public static IConfigureSyntax BindToSelfWithInterfaces(this IJoinExcludeIncludeBindSyntax matcher) => matcher.BindSelection((type, types) => types.Append(type)); - public static IKernel AddLifetimeServices(this IKernel kernel) + public static IKernel AddLifetimeServices(this IKernel kernel, Assembly a) { kernel.Bind(scan => { - scan.FromThisAssembly() + scan.From(a) .SelectAllClasses() .Where(c => (c.IsAssignableTo(typeof(INService)) || c.IsAssignableTo(typeof(IExecOnMessage)) diff --git a/src/NadekoBot/Common/Medusa/Adapters/BehaviorAdapter.cs b/src/NadekoBot/Medusa/Adapters/BehaviorAdapter.cs similarity index 96% rename from src/NadekoBot/Common/Medusa/Adapters/BehaviorAdapter.cs rename to src/NadekoBot/Medusa/Adapters/BehaviorAdapter.cs index 2e369824a..e08711757 100644 --- a/src/NadekoBot/Common/Medusa/Adapters/BehaviorAdapter.cs +++ b/src/NadekoBot/Medusa/Adapters/BehaviorAdapter.cs @@ -1,5 +1,9 @@ #nullable enable +using Nadeko.Snake; +using NadekoBot.Common; +using NadekoBot.Services; + [DIIgnore] public sealed class BehaviorAdapter : ICustomBehavior { diff --git a/src/NadekoBot/Common/Medusa/Adapters/ContextAdapterFactory.cs b/src/NadekoBot/Medusa/Adapters/ContextAdapterFactory.cs similarity index 82% rename from src/NadekoBot/Common/Medusa/Adapters/ContextAdapterFactory.cs rename to src/NadekoBot/Medusa/Adapters/ContextAdapterFactory.cs index 3f3be033c..5251a2f29 100644 --- a/src/NadekoBot/Common/Medusa/Adapters/ContextAdapterFactory.cs +++ b/src/NadekoBot/Medusa/Adapters/ContextAdapterFactory.cs @@ -1,4 +1,6 @@ -internal class ContextAdapterFactory +using Nadeko.Snake; + +internal class ContextAdapterFactory { public static AnyContext CreateNew(ICommandContext context, IMedusaStrings strings, IServiceProvider services) => context.Guild is null diff --git a/src/NadekoBot/Common/Medusa/Adapters/DmContextAdapter.cs b/src/NadekoBot/Medusa/Adapters/DmContextAdapter.cs similarity index 95% rename from src/NadekoBot/Common/Medusa/Adapters/DmContextAdapter.cs rename to src/NadekoBot/Medusa/Adapters/DmContextAdapter.cs index 80cb115b0..aae890916 100644 --- a/src/NadekoBot/Common/Medusa/Adapters/DmContextAdapter.cs +++ b/src/NadekoBot/Medusa/Adapters/DmContextAdapter.cs @@ -1,4 +1,8 @@ using Microsoft.Extensions.DependencyInjection; +using Nadeko.Snake; +using NadekoBot; +using NadekoBot.Common; +using NadekoBot.Services; public sealed class DmContextAdapter : DmContext { diff --git a/src/NadekoBot/Common/Medusa/Adapters/FilterAdapter.cs b/src/NadekoBot/Medusa/Adapters/FilterAdapter.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Adapters/FilterAdapter.cs rename to src/NadekoBot/Medusa/Adapters/FilterAdapter.cs diff --git a/src/NadekoBot/Common/Medusa/Adapters/GuildContextAdapter.cs b/src/NadekoBot/Medusa/Adapters/GuildContextAdapter.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Adapters/GuildContextAdapter.cs rename to src/NadekoBot/Medusa/Adapters/GuildContextAdapter.cs diff --git a/src/NadekoBot/Common/Medusa/Adapters/ParamParserAdapter.cs b/src/NadekoBot/Medusa/Adapters/ParamParserAdapter.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Adapters/ParamParserAdapter.cs rename to src/NadekoBot/Medusa/Adapters/ParamParserAdapter.cs diff --git a/src/NadekoBot/Common/Medusa/CommandContextType.cs b/src/NadekoBot/Medusa/CommandContextType.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/CommandContextType.cs rename to src/NadekoBot/Medusa/CommandContextType.cs diff --git a/src/NadekoBot/Common/Medusa/Config/IMedusaConfigService.cs b/src/NadekoBot/Medusa/Config/IMedusaConfigService.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Config/IMedusaConfigService.cs rename to src/NadekoBot/Medusa/Config/IMedusaConfigService.cs diff --git a/src/NadekoBot/Common/Medusa/Config/MedusaConfig.cs b/src/NadekoBot/Medusa/Config/MedusaConfig.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Config/MedusaConfig.cs rename to src/NadekoBot/Medusa/Config/MedusaConfig.cs diff --git a/src/NadekoBot/Common/Medusa/Config/MedusaConfigService.cs b/src/NadekoBot/Medusa/Config/MedusaConfigService.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Config/MedusaConfigService.cs rename to src/NadekoBot/Medusa/Config/MedusaConfigService.cs diff --git a/src/NadekoBot/Common/Medusa/MedusaAssemblyLoadContext.cs b/src/NadekoBot/Medusa/MedusaAssemblyLoadContext.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/MedusaAssemblyLoadContext.cs rename to src/NadekoBot/Medusa/MedusaAssemblyLoadContext.cs diff --git a/src/NadekoBot/Common/Medusa/MedusaIoCKernelModule.cs b/src/NadekoBot/Medusa/MedusaIoCKernelModule.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/MedusaIoCKernelModule.cs rename to src/NadekoBot/Medusa/MedusaIoCKernelModule.cs diff --git a/src/NadekoBot/Common/Medusa/MedusaLoaderService.cs b/src/NadekoBot/Medusa/MedusaLoaderService.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/MedusaLoaderService.cs rename to src/NadekoBot/Medusa/MedusaLoaderService.cs diff --git a/src/NadekoBot/Common/Medusa/Models/ParamData.cs b/src/NadekoBot/Medusa/Models/ParamData.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Models/ParamData.cs rename to src/NadekoBot/Medusa/Models/ParamData.cs diff --git a/src/NadekoBot/Common/Medusa/Models/ResolvedMedusa.cs b/src/NadekoBot/Medusa/Models/ResolvedMedusa.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Models/ResolvedMedusa.cs rename to src/NadekoBot/Medusa/Models/ResolvedMedusa.cs diff --git a/src/NadekoBot/Common/Medusa/Models/SnekCommandData.cs b/src/NadekoBot/Medusa/Models/SnekCommandData.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Models/SnekCommandData.cs rename to src/NadekoBot/Medusa/Models/SnekCommandData.cs diff --git a/src/NadekoBot/Common/Medusa/Models/SnekData.cs b/src/NadekoBot/Medusa/Models/SnekData.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/Models/SnekData.cs rename to src/NadekoBot/Medusa/Models/SnekData.cs diff --git a/src/NadekoBot/Common/Medusa/RemovablePlanner.cs b/src/NadekoBot/Medusa/RemovablePlanner.cs similarity index 100% rename from src/NadekoBot/Common/Medusa/RemovablePlanner.cs rename to src/NadekoBot/Medusa/RemovablePlanner.cs diff --git a/src/NadekoBot/Modules/Administration/PermOverrides/DiscordPermOverrideService.cs b/src/NadekoBot/Modules/Administration/PermOverrides/DiscordPermOverrideService.cs index e8e7774e5..27bbe0aa1 100644 --- a/src/NadekoBot/Modules/Administration/PermOverrides/DiscordPermOverrideService.cs +++ b/src/NadekoBot/Modules/Administration/PermOverrides/DiscordPermOverrideService.cs @@ -6,7 +6,7 @@ using NadekoBot.Services.Database.Models; namespace NadekoBot.Modules.Administration.Services; -public class DiscordPermOverrideService : INService, IExecPreCommand +public class DiscordPermOverrideService : INService, IExecPreCommand, IDiscordPermOverrideService { public int Priority { get; } = int.MaxValue; private readonly DbService _db; diff --git a/src/NadekoBot/Modules/Gambling/CurrencyProvider.cs b/src/NadekoBot/Modules/Gambling/CurrencyProvider.cs new file mode 100644 index 000000000..6b228a295 --- /dev/null +++ b/src/NadekoBot/Modules/Gambling/CurrencyProvider.cs @@ -0,0 +1,18 @@ +using Nadeko.Bot.Common; +using NadekoBot.Modules.Gambling.Services; + +namespace NadekoBot.Modules.Gambling; + +// todo do we need both currencyprovider and currencyservice +public sealed class CurrencyProvider : ICurrencyProvider +{ + private readonly GamblingConfigService _cs; + + public CurrencyProvider(GamblingConfigService cs) + { + _cs = cs; + } + + public string GetCurrencySign() + => _cs.Data.Currency.Sign; +} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs b/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs index b01582561..e6f96ab17 100644 --- a/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs +++ b/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs @@ -7,7 +7,8 @@ public static class PermissionExtensions { public static bool CheckPermissions( this IEnumerable permsEnumerable, - IUserMessage message, + IUser user, + IMessageChannel message, string commandName, string moduleName, out int permIndex) @@ -18,7 +19,7 @@ public static class PermissionExtensions { var perm = perms[i]; - var result = perm.CheckPermission(message, commandName, moduleName); + var result = perm.CheckPermission(user, message, commandName, moduleName); if (result is null) continue; @@ -35,7 +36,8 @@ public static class PermissionExtensions //false = applicable, not allowed public static bool? CheckPermission( this Permissionv2 perm, - IUserMessage message, + IUser user, + IMessageChannel channel, string commandName, string moduleName) { @@ -46,16 +48,16 @@ public static class PermissionExtensions || perm.SecondaryTarget == SecondaryPermissionType.AllModules)) return null; - var guildUser = message.Author as IGuildUser; + var guildUser = user as IGuildUser; switch (perm.PrimaryTarget) { case PrimaryPermissionType.User: - if (perm.PrimaryTargetId == message.Author.Id) + if (perm.PrimaryTargetId == user.Id) return perm.State; break; case PrimaryPermissionType.Channel: - if (perm.PrimaryTargetId == message.Channel.Id) + if (perm.PrimaryTargetId == channel.Id) return perm.State; break; case PrimaryPermissionType.Role: diff --git a/src/NadekoBot/Modules/Permissions/PermissionsService.cs b/src/NadekoBot/Modules/Permissions/PermissionsService.cs index d3a311912..532384cc0 100644 --- a/src/NadekoBot/Modules/Permissions/PermissionsService.cs +++ b/src/NadekoBot/Modules/Permissions/PermissionsService.cs @@ -108,7 +108,8 @@ public class PermissionService : IExecPreCommand, INService var resetCommand = commandName == "resetperms"; var pc = GetCacheFor(guild.Id); - if (!resetCommand && !pc.Permissions.CheckPermissions(msg, commandName, moduleName, out var index)) + if (!resetCommand + && !pc.Permissions.CheckPermissions(msg.Author, msg.Channel, commandName, moduleName, out var index)) { if (pc.Verbose) { diff --git a/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs b/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs index bbc3d301c..3c831f737 100644 --- a/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs +++ b/src/NadekoBot/Modules/Utility/Patronage/PatronageService.cs @@ -835,10 +835,4 @@ public sealed class PatronageService public PatronConfigData GetConfig() => _pConf.Data; -} - -public readonly struct FeatureLimitKey -{ - public string PrettyName { get; init; } - public string Key { get; init; } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Utility/Remind/RemindService.cs b/src/NadekoBot/Modules/Utility/Remind/RemindService.cs index f9e87d58a..60b4c992b 100644 --- a/src/NadekoBot/Modules/Utility/Remind/RemindService.cs +++ b/src/NadekoBot/Modules/Utility/Remind/RemindService.cs @@ -8,7 +8,7 @@ using System.Text.RegularExpressions; namespace NadekoBot.Modules.Utility.Services; -public class RemindService : INService, IReadyExecutor +public class RemindService : INService, IReadyExecutor, IRemindService { private readonly Regex _regex = new(@"^(?:(?:at|on(?:\sthe)?)?\s*(?(?:\d{2}:\d{2}\s)?\d{1,2}\.\d{1,2}(?:\.\d{2,4})?)|(?:in\s?)?\s*(?:(?\d+)(?:\s?(?:months?|mos?),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:weeks?|w),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:days?|d),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:hours?|h),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:minutes?|mins?|m),?))?)\s+(?:to:?\s+)?(?(?:\r\n|[\r\n]|.)+)", diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index df791c02d..e57f8a740 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -41,7 +41,7 @@ - + @@ -56,8 +56,8 @@ - - + + @@ -107,7 +107,9 @@ - + + + @@ -123,6 +125,12 @@ Always + + + + + + 5.0.0 diff --git a/src/NadekoBot/PermissionChecker.cs b/src/NadekoBot/PermissionChecker.cs new file mode 100644 index 000000000..f5498d542 --- /dev/null +++ b/src/NadekoBot/PermissionChecker.cs @@ -0,0 +1,78 @@ +using Nadeko.Bot.Common; +using NadekoBot.Modules.Permissions.Common; +using NadekoBot.Modules.Permissions.Services; +using OneOf; +using OneOf.Types; + +namespace NadekoBot; + +public sealed class PermissionChecker : IPermissionChecker, INService +{ + private readonly PermissionService _perms; + private readonly GlobalPermissionService _gperm; + private readonly CmdCdService _cmdCds; + + public PermissionChecker(PermissionService perms, GlobalPermissionService gperm, CmdCdService cmdCds) + { + _perms = perms; + _gperm = gperm; + _cmdCds = cmdCds; + } + + public async Task>> CheckAsync( + IGuild guild, + IMessageChannel channel, + IUser author, + string module, + string cmd) + { + // todo add proper string + if (await _cmdCds.TryBlock(guild, author, cmd)) + return new Error(new()); + + try + { + if (_gperm.BlockedModules.Contains(module)) + { + Log.Information("u:{UserId} tried to use module {Module} which is globally disabled.", + author.Id, + module + ); + + return new Success(); + } + + if (guild is SocketGuild sg) + { + var pc = _perms.GetCacheFor(guild.Id); + if (!pc.Permissions.CheckPermissions(author, channel, cmd, "ACTUALEXPRESSIONS", out var index)) + { + if (pc.Verbose) + { + // todo fix + // var permissionMessage = strs.perm_prevent(index + 1, + // Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), sg))); + // + // try + // { + // await msg.Channel.SendErrorAsync(_eb, permissionMessage); + // } + // catch + // { + // } + // + // Log.Information("{PermissionMessage}", permissionMessage); + } + + // todo add proper string + return new Error(new()); + } + } + } + catch + { + } + + return new Success(); + } +} \ No newline at end of file diff --git a/src/NadekoBot/Services/Impl/BotCredsProvider.cs b/src/NadekoBot/Services/Impl/BotCredsProvider.cs index 2876e64ad..3bef56503 100644 --- a/src/NadekoBot/Services/Impl/BotCredsProvider.cs +++ b/src/NadekoBot/Services/Impl/BotCredsProvider.cs @@ -60,9 +60,16 @@ public sealed class BotCredsProvider : IBotCredsProvider CredsExamplePath); } - _config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true) - .AddEnvironmentVariables("NadekoBot_") - .Build(); + try + { + _config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true) + .AddEnvironmentVariables("NadekoBot_") + .Build(); + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + } _changeToken = ChangeToken.OnChange(() => _config.GetReloadToken(), Reload); Reload(); diff --git a/src/NadekoBot/Services/Impl/RedisImagesCache.cs b/src/NadekoBot/Services/Impl/ImageCache.cs similarity index 70% rename from src/NadekoBot/Services/Impl/RedisImagesCache.cs rename to src/NadekoBot/Services/Impl/ImageCache.cs index 9957f8fdd..6c3292416 100644 --- a/src/NadekoBot/Services/Impl/RedisImagesCache.cs +++ b/src/NadekoBot/Services/Impl/ImageCache.cs @@ -1,38 +1,4 @@ -using NadekoBot.Common.Configs; - -namespace NadekoBot.Services; - -public sealed class ImagesConfig : ConfigServiceBase -{ - private const string PATH = "data/images.yml"; - - private static readonly TypedKey _changeKey = - new("config.images.updated"); - - public override string Name - => "images"; - - public ImagesConfig(IConfigSeria serializer, IPubSub pubSub) - : base(PATH, serializer, pubSub, _changeKey) - { - } -} - -public interface IImageCache -{ - Task GetHeadsImageAsync(); - Task GetTailsImageAsync(); - Task GetCurrencyImageAsync(); - Task GetXpBackgroundImageAsync(); - Task GetRategirlBgAsync(); - Task GetRategirlDotAsync(); - Task GetDiceAsync(int num); - Task GetSlotEmojiAsync(int number); - Task GetSlotBgAsync(); - Task GetRipBgAsync(); - Task GetRipOverlayAsync(); - Task GetImageDataAsync(Uri url); -} +namespace NadekoBot.Services; public sealed class ImageCache : IImageCache, INService { @@ -114,4 +80,4 @@ public sealed class ImageCache : IImageCache, INService public Task GetRipOverlayAsync() => GetImageDataAsync(_ic.Data.Rip.Overlay); -} +} \ No newline at end of file diff --git a/src/NadekoBot/Common/PubSub/JsonSeria.cs b/src/NadekoBot/Services/Impl/PubSub/JsonSeria.cs similarity index 100% rename from src/NadekoBot/Common/PubSub/JsonSeria.cs rename to src/NadekoBot/Services/Impl/PubSub/JsonSeria.cs diff --git a/src/NadekoBot/Common/PubSub/RedisPubSub.cs b/src/NadekoBot/Services/Impl/PubSub/RedisPubSub.cs similarity index 100% rename from src/NadekoBot/Common/PubSub/RedisPubSub.cs rename to src/NadekoBot/Services/Impl/PubSub/RedisPubSub.cs diff --git a/src/NadekoBot/Common/PubSub/YamlSeria.cs b/src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs similarity index 100% rename from src/NadekoBot/Common/PubSub/YamlSeria.cs rename to src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs diff --git a/src/NadekoBot/Common/Cache/RedisBotCache.cs b/src/NadekoBot/Services/Impl/RedisBotCache.cs similarity index 100% rename from src/NadekoBot/Common/Cache/RedisBotCache.cs rename to src/NadekoBot/Services/Impl/RedisBotCache.cs diff --git a/src/NadekoBot/Services/strings/impl/RedisBotStringsProvider.cs b/src/NadekoBot/Services/Impl/RedisBotStringsProvider.cs similarity index 100% rename from src/NadekoBot/Services/strings/impl/RedisBotStringsProvider.cs rename to src/NadekoBot/Services/Impl/RedisBotStringsProvider.cs diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index e1371e5e5..493508609 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -7,14 +7,11 @@ namespace NadekoBot.Services; public sealed class StatsService : IStatsService, IReadyExecutor, INService { - public const string BOT_VERSION = "4.3.13"; + public const string BOT_VERSION = "5.0.0-alpha1"; public string Author => "Kwoth#2452"; - public string Library - => "Discord.Net"; - public double MessagesPerSecond => MessageCounter / GetUptime().TotalSeconds; diff --git a/src/Nadeko.Bot.Common/data/aliases.yml b/src/NadekoBot/data/aliases.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/aliases.yml rename to src/NadekoBot/data/aliases.yml diff --git a/src/Nadeko.Bot.Common/data/bot.yml b/src/NadekoBot/data/bot.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/bot.yml rename to src/NadekoBot/data/bot.yml diff --git a/src/Nadeko.Bot.Common/data/fonts/NotoSans-Bold.ttf b/src/NadekoBot/data/fonts/NotoSans-Bold.ttf similarity index 100% rename from src/Nadeko.Bot.Common/data/fonts/NotoSans-Bold.ttf rename to src/NadekoBot/data/fonts/NotoSans-Bold.ttf diff --git a/src/Nadeko.Bot.Common/data/fonts/Symbola-10.24.ttf b/src/NadekoBot/data/fonts/Symbola-10.24.ttf similarity index 100% rename from src/Nadeko.Bot.Common/data/fonts/Symbola-10.24.ttf rename to src/NadekoBot/data/fonts/Symbola-10.24.ttf diff --git a/src/Nadeko.Bot.Common/data/fonts/Uni Sans.ttf b/src/NadekoBot/data/fonts/Uni Sans.ttf similarity index 100% rename from src/Nadeko.Bot.Common/data/fonts/Uni Sans.ttf rename to src/NadekoBot/data/fonts/Uni Sans.ttf diff --git a/src/Nadeko.Bot.Common/data/fonts/dotty.ttf b/src/NadekoBot/data/fonts/dotty.ttf similarity index 100% rename from src/Nadeko.Bot.Common/data/fonts/dotty.ttf rename to src/NadekoBot/data/fonts/dotty.ttf diff --git a/src/Nadeko.Bot.Common/data/gambling.yml b/src/NadekoBot/data/gambling.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/gambling.yml rename to src/NadekoBot/data/gambling.yml diff --git a/src/Nadeko.Bot.Common/data/games.yml b/src/NadekoBot/data/games.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/games.yml rename to src/NadekoBot/data/games.yml diff --git a/src/Nadeko.Bot.Common/data/hangman/animals.yml b/src/NadekoBot/data/hangman/animals.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/hangman/animals.yml rename to src/NadekoBot/data/hangman/animals.yml diff --git a/src/Nadeko.Bot.Common/data/hangman/anime.yml b/src/NadekoBot/data/hangman/anime.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/hangman/anime.yml rename to src/NadekoBot/data/hangman/anime.yml diff --git a/src/Nadeko.Bot.Common/data/hangman/countries.yml b/src/NadekoBot/data/hangman/countries.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/hangman/countries.yml rename to src/NadekoBot/data/hangman/countries.yml diff --git a/src/Nadeko.Bot.Common/data/hangman/movies.yml b/src/NadekoBot/data/hangman/movies.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/hangman/movies.yml rename to src/NadekoBot/data/hangman/movies.yml diff --git a/src/Nadeko.Bot.Common/data/hangman/things.yml b/src/NadekoBot/data/hangman/things.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/hangman/things.yml rename to src/NadekoBot/data/hangman/things.yml diff --git a/src/Nadeko.Bot.Common/data/images.yml b/src/NadekoBot/data/images.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/images.yml rename to src/NadekoBot/data/images.yml diff --git a/src/Nadeko.Bot.Common/data/images/cards/ace_of_clubs.jpg b/src/NadekoBot/data/images/cards/ace_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ace_of_clubs.jpg rename to src/NadekoBot/data/images/cards/ace_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ace_of_diamonds.jpg b/src/NadekoBot/data/images/cards/ace_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ace_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/ace_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ace_of_hearts.jpg b/src/NadekoBot/data/images/cards/ace_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ace_of_hearts.jpg rename to src/NadekoBot/data/images/cards/ace_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ace_of_spades.jpg b/src/NadekoBot/data/images/cards/ace_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ace_of_spades.jpg rename to src/NadekoBot/data/images/cards/ace_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/black_joker.jpg b/src/NadekoBot/data/images/cards/black_joker.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/black_joker.jpg rename to src/NadekoBot/data/images/cards/black_joker.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/eight_of_clubs.jpg b/src/NadekoBot/data/images/cards/eight_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/eight_of_clubs.jpg rename to src/NadekoBot/data/images/cards/eight_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/eight_of_diamonds.jpg b/src/NadekoBot/data/images/cards/eight_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/eight_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/eight_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/eight_of_hearts.jpg b/src/NadekoBot/data/images/cards/eight_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/eight_of_hearts.jpg rename to src/NadekoBot/data/images/cards/eight_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/eight_of_spades.jpg b/src/NadekoBot/data/images/cards/eight_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/eight_of_spades.jpg rename to src/NadekoBot/data/images/cards/eight_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/five_of_clubs.jpg b/src/NadekoBot/data/images/cards/five_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/five_of_clubs.jpg rename to src/NadekoBot/data/images/cards/five_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/five_of_diamonds.jpg b/src/NadekoBot/data/images/cards/five_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/five_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/five_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/five_of_hearts.jpg b/src/NadekoBot/data/images/cards/five_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/five_of_hearts.jpg rename to src/NadekoBot/data/images/cards/five_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/five_of_spades.jpg b/src/NadekoBot/data/images/cards/five_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/five_of_spades.jpg rename to src/NadekoBot/data/images/cards/five_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/four_of_clubs.jpg b/src/NadekoBot/data/images/cards/four_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/four_of_clubs.jpg rename to src/NadekoBot/data/images/cards/four_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/four_of_diamonds.jpg b/src/NadekoBot/data/images/cards/four_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/four_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/four_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/four_of_hearts.jpg b/src/NadekoBot/data/images/cards/four_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/four_of_hearts.jpg rename to src/NadekoBot/data/images/cards/four_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/four_of_spades.jpg b/src/NadekoBot/data/images/cards/four_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/four_of_spades.jpg rename to src/NadekoBot/data/images/cards/four_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/jack_of_clubs.jpg b/src/NadekoBot/data/images/cards/jack_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/jack_of_clubs.jpg rename to src/NadekoBot/data/images/cards/jack_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/jack_of_diamonds.jpg b/src/NadekoBot/data/images/cards/jack_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/jack_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/jack_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/jack_of_hearts.jpg b/src/NadekoBot/data/images/cards/jack_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/jack_of_hearts.jpg rename to src/NadekoBot/data/images/cards/jack_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/jack_of_spades.jpg b/src/NadekoBot/data/images/cards/jack_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/jack_of_spades.jpg rename to src/NadekoBot/data/images/cards/jack_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/king_of_clubs.jpg b/src/NadekoBot/data/images/cards/king_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/king_of_clubs.jpg rename to src/NadekoBot/data/images/cards/king_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/king_of_diamonds.jpg b/src/NadekoBot/data/images/cards/king_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/king_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/king_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/king_of_hearts.jpg b/src/NadekoBot/data/images/cards/king_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/king_of_hearts.jpg rename to src/NadekoBot/data/images/cards/king_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/king_of_spades.jpg b/src/NadekoBot/data/images/cards/king_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/king_of_spades.jpg rename to src/NadekoBot/data/images/cards/king_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/nine_of_clubs.jpg b/src/NadekoBot/data/images/cards/nine_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/nine_of_clubs.jpg rename to src/NadekoBot/data/images/cards/nine_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/nine_of_diamonds.jpg b/src/NadekoBot/data/images/cards/nine_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/nine_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/nine_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/nine_of_hearts.jpg b/src/NadekoBot/data/images/cards/nine_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/nine_of_hearts.jpg rename to src/NadekoBot/data/images/cards/nine_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/nine_of_spades.jpg b/src/NadekoBot/data/images/cards/nine_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/nine_of_spades.jpg rename to src/NadekoBot/data/images/cards/nine_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/queen_of_clubs.jpg b/src/NadekoBot/data/images/cards/queen_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/queen_of_clubs.jpg rename to src/NadekoBot/data/images/cards/queen_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/queen_of_diamonds.jpg b/src/NadekoBot/data/images/cards/queen_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/queen_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/queen_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/queen_of_hearts.jpg b/src/NadekoBot/data/images/cards/queen_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/queen_of_hearts.jpg rename to src/NadekoBot/data/images/cards/queen_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/queen_of_spades.jpg b/src/NadekoBot/data/images/cards/queen_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/queen_of_spades.jpg rename to src/NadekoBot/data/images/cards/queen_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/red_joker.jpg b/src/NadekoBot/data/images/cards/red_joker.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/red_joker.jpg rename to src/NadekoBot/data/images/cards/red_joker.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/seven_of_clubs.jpg b/src/NadekoBot/data/images/cards/seven_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/seven_of_clubs.jpg rename to src/NadekoBot/data/images/cards/seven_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/seven_of_diamonds.jpg b/src/NadekoBot/data/images/cards/seven_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/seven_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/seven_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/seven_of_hearts.jpg b/src/NadekoBot/data/images/cards/seven_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/seven_of_hearts.jpg rename to src/NadekoBot/data/images/cards/seven_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/seven_of_spades.jpg b/src/NadekoBot/data/images/cards/seven_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/seven_of_spades.jpg rename to src/NadekoBot/data/images/cards/seven_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/six_of_clubs.jpg b/src/NadekoBot/data/images/cards/six_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/six_of_clubs.jpg rename to src/NadekoBot/data/images/cards/six_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/six_of_diamonds.jpg b/src/NadekoBot/data/images/cards/six_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/six_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/six_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/six_of_hearts.jpg b/src/NadekoBot/data/images/cards/six_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/six_of_hearts.jpg rename to src/NadekoBot/data/images/cards/six_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/six_of_spades.jpg b/src/NadekoBot/data/images/cards/six_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/six_of_spades.jpg rename to src/NadekoBot/data/images/cards/six_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ten_of_clubs.jpg b/src/NadekoBot/data/images/cards/ten_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ten_of_clubs.jpg rename to src/NadekoBot/data/images/cards/ten_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ten_of_diamonds.jpg b/src/NadekoBot/data/images/cards/ten_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ten_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/ten_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ten_of_hearts.jpg b/src/NadekoBot/data/images/cards/ten_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ten_of_hearts.jpg rename to src/NadekoBot/data/images/cards/ten_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/ten_of_spades.jpg b/src/NadekoBot/data/images/cards/ten_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/ten_of_spades.jpg rename to src/NadekoBot/data/images/cards/ten_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/three_of_clubs.jpg b/src/NadekoBot/data/images/cards/three_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/three_of_clubs.jpg rename to src/NadekoBot/data/images/cards/three_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/three_of_diamonds.jpg b/src/NadekoBot/data/images/cards/three_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/three_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/three_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/three_of_hearts.jpg b/src/NadekoBot/data/images/cards/three_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/three_of_hearts.jpg rename to src/NadekoBot/data/images/cards/three_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/three_of_spades.jpg b/src/NadekoBot/data/images/cards/three_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/three_of_spades.jpg rename to src/NadekoBot/data/images/cards/three_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/two_of_clubs.jpg b/src/NadekoBot/data/images/cards/two_of_clubs.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/two_of_clubs.jpg rename to src/NadekoBot/data/images/cards/two_of_clubs.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/two_of_diamonds.jpg b/src/NadekoBot/data/images/cards/two_of_diamonds.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/two_of_diamonds.jpg rename to src/NadekoBot/data/images/cards/two_of_diamonds.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/two_of_hearts.jpg b/src/NadekoBot/data/images/cards/two_of_hearts.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/two_of_hearts.jpg rename to src/NadekoBot/data/images/cards/two_of_hearts.jpg diff --git a/src/Nadeko.Bot.Common/data/images/cards/two_of_spades.jpg b/src/NadekoBot/data/images/cards/two_of_spades.jpg similarity index 100% rename from src/Nadeko.Bot.Common/data/images/cards/two_of_spades.jpg rename to src/NadekoBot/data/images/cards/two_of_spades.jpg diff --git a/src/Nadeko.Bot.Common/data/images/frame_gold.png b/src/NadekoBot/data/images/frame_gold.png similarity index 100% rename from src/Nadeko.Bot.Common/data/images/frame_gold.png rename to src/NadekoBot/data/images/frame_gold.png diff --git a/src/Nadeko.Bot.Common/data/images/frame_silver.png b/src/NadekoBot/data/images/frame_silver.png similarity index 100% rename from src/Nadeko.Bot.Common/data/images/frame_silver.png rename to src/NadekoBot/data/images/frame_silver.png diff --git a/src/Nadeko.Bot.Common/data/lib/libopus.so b/src/NadekoBot/data/lib/libopus.so similarity index 100% rename from src/Nadeko.Bot.Common/data/lib/libopus.so rename to src/NadekoBot/data/lib/libopus.so diff --git a/src/Nadeko.Bot.Common/data/lib/libsodium.dll b/src/NadekoBot/data/lib/libsodium.dll similarity index 100% rename from src/Nadeko.Bot.Common/data/lib/libsodium.dll rename to src/NadekoBot/data/lib/libsodium.dll diff --git a/src/Nadeko.Bot.Common/data/lib/libsodium.so b/src/NadekoBot/data/lib/libsodium.so similarity index 100% rename from src/Nadeko.Bot.Common/data/lib/libsodium.so rename to src/NadekoBot/data/lib/libsodium.so diff --git a/src/Nadeko.Bot.Common/data/lib/opus.dll b/src/NadekoBot/data/lib/opus.dll similarity index 100% rename from src/Nadeko.Bot.Common/data/lib/opus.dll rename to src/NadekoBot/data/lib/opus.dll diff --git a/src/Nadeko.Bot.Common/data/magicitems.json b/src/NadekoBot/data/magicitems.json similarity index 100% rename from src/Nadeko.Bot.Common/data/magicitems.json rename to src/NadekoBot/data/magicitems.json diff --git a/src/Nadeko.Bot.Common/data/patron.yml b/src/NadekoBot/data/patron.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/patron.yml rename to src/NadekoBot/data/patron.yml diff --git a/src/Nadeko.Bot.Common/data/pokemon/LICENSE b/src/NadekoBot/data/pokemon/LICENSE similarity index 100% rename from src/Nadeko.Bot.Common/data/pokemon/LICENSE rename to src/NadekoBot/data/pokemon/LICENSE diff --git a/src/Nadeko.Bot.Common/data/pokemon/name-id_map.json b/src/NadekoBot/data/pokemon/name-id_map.json similarity index 100% rename from src/Nadeko.Bot.Common/data/pokemon/name-id_map.json rename to src/NadekoBot/data/pokemon/name-id_map.json diff --git a/src/Nadeko.Bot.Common/data/pokemon/pokemon_abilities.json b/src/NadekoBot/data/pokemon/pokemon_abilities.json similarity index 100% rename from src/Nadeko.Bot.Common/data/pokemon/pokemon_abilities.json rename to src/NadekoBot/data/pokemon/pokemon_abilities.json diff --git a/src/Nadeko.Bot.Common/data/pokemon/pokemon_list.json b/src/NadekoBot/data/pokemon/pokemon_list.json similarity index 100% rename from src/Nadeko.Bot.Common/data/pokemon/pokemon_list.json rename to src/NadekoBot/data/pokemon/pokemon_list.json diff --git a/src/Nadeko.Bot.Common/data/searches.yml b/src/NadekoBot/data/searches.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/searches.yml rename to src/NadekoBot/data/searches.yml diff --git a/src/Nadeko.Bot.Common/data/strings/commands/commands.en-US.yml b/src/NadekoBot/data/strings/commands/commands.en-US.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/commands/commands.en-US.yml rename to src/NadekoBot/data/strings/commands/commands.en-US.yml diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.ar.json b/src/NadekoBot/data/strings/responses/responses.ar.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.ar.json rename to src/NadekoBot/data/strings/responses/responses.ar.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.cs-CZ.json b/src/NadekoBot/data/strings/responses/responses.cs-CZ.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.cs-CZ.json rename to src/NadekoBot/data/strings/responses/responses.cs-CZ.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.da-DK.json b/src/NadekoBot/data/strings/responses/responses.da-DK.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.da-DK.json rename to src/NadekoBot/data/strings/responses/responses.da-DK.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.de-DE.json b/src/NadekoBot/data/strings/responses/responses.de-DE.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.de-DE.json rename to src/NadekoBot/data/strings/responses/responses.de-DE.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.en-US.json b/src/NadekoBot/data/strings/responses/responses.en-US.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.en-US.json rename to src/NadekoBot/data/strings/responses/responses.en-US.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.es-ES.json b/src/NadekoBot/data/strings/responses/responses.es-ES.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.es-ES.json rename to src/NadekoBot/data/strings/responses/responses.es-ES.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.fr-FR.json b/src/NadekoBot/data/strings/responses/responses.fr-FR.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.fr-FR.json rename to src/NadekoBot/data/strings/responses/responses.fr-FR.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.he-IL.json b/src/NadekoBot/data/strings/responses/responses.he-IL.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.he-IL.json rename to src/NadekoBot/data/strings/responses/responses.he-IL.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.hu-HU.json b/src/NadekoBot/data/strings/responses/responses.hu-HU.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.hu-HU.json rename to src/NadekoBot/data/strings/responses/responses.hu-HU.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.id-ID.json b/src/NadekoBot/data/strings/responses/responses.id-ID.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.id-ID.json rename to src/NadekoBot/data/strings/responses/responses.id-ID.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.it-IT.json b/src/NadekoBot/data/strings/responses/responses.it-IT.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.it-IT.json rename to src/NadekoBot/data/strings/responses/responses.it-IT.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.ja-JP.json b/src/NadekoBot/data/strings/responses/responses.ja-JP.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.ja-JP.json rename to src/NadekoBot/data/strings/responses/responses.ja-JP.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.ko-KR.json b/src/NadekoBot/data/strings/responses/responses.ko-KR.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.ko-KR.json rename to src/NadekoBot/data/strings/responses/responses.ko-KR.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.nb-NO.json b/src/NadekoBot/data/strings/responses/responses.nb-NO.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.nb-NO.json rename to src/NadekoBot/data/strings/responses/responses.nb-NO.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.nl-NL.json b/src/NadekoBot/data/strings/responses/responses.nl-NL.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.nl-NL.json rename to src/NadekoBot/data/strings/responses/responses.nl-NL.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.pl-PL.json b/src/NadekoBot/data/strings/responses/responses.pl-PL.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.pl-PL.json rename to src/NadekoBot/data/strings/responses/responses.pl-PL.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.pt-BR.json b/src/NadekoBot/data/strings/responses/responses.pt-BR.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.pt-BR.json rename to src/NadekoBot/data/strings/responses/responses.pt-BR.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.ro-RO.json b/src/NadekoBot/data/strings/responses/responses.ro-RO.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.ro-RO.json rename to src/NadekoBot/data/strings/responses/responses.ro-RO.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.ru-RU.json b/src/NadekoBot/data/strings/responses/responses.ru-RU.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.ru-RU.json rename to src/NadekoBot/data/strings/responses/responses.ru-RU.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.sr-cyrl-rs.json b/src/NadekoBot/data/strings/responses/responses.sr-cyrl-rs.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.sr-cyrl-rs.json rename to src/NadekoBot/data/strings/responses/responses.sr-cyrl-rs.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.sv-SE.json b/src/NadekoBot/data/strings/responses/responses.sv-SE.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.sv-SE.json rename to src/NadekoBot/data/strings/responses/responses.sv-SE.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.tr-TR.json b/src/NadekoBot/data/strings/responses/responses.tr-TR.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.tr-TR.json rename to src/NadekoBot/data/strings/responses/responses.tr-TR.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.ts-TS.json b/src/NadekoBot/data/strings/responses/responses.ts-TS.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.ts-TS.json rename to src/NadekoBot/data/strings/responses/responses.ts-TS.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.uk-UA.json b/src/NadekoBot/data/strings/responses/responses.uk-UA.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.uk-UA.json rename to src/NadekoBot/data/strings/responses/responses.uk-UA.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.zh-CN.json b/src/NadekoBot/data/strings/responses/responses.zh-CN.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.zh-CN.json rename to src/NadekoBot/data/strings/responses/responses.zh-CN.json diff --git a/src/Nadeko.Bot.Common/data/strings/responses/responses.zh-TW.json b/src/NadekoBot/data/strings/responses/responses.zh-TW.json similarity index 100% rename from src/Nadeko.Bot.Common/data/strings/responses/responses.zh-TW.json rename to src/NadekoBot/data/strings/responses/responses.zh-TW.json diff --git a/src/Nadeko.Bot.Common/data/trivia_questions.json b/src/NadekoBot/data/trivia_questions.json similarity index 100% rename from src/Nadeko.Bot.Common/data/trivia_questions.json rename to src/NadekoBot/data/trivia_questions.json diff --git a/src/Nadeko.Bot.Common/data/typing_articles3.json b/src/NadekoBot/data/typing_articles3.json similarity index 100% rename from src/Nadeko.Bot.Common/data/typing_articles3.json rename to src/NadekoBot/data/typing_articles3.json diff --git a/src/Nadeko.Bot.Common/data/units.json b/src/NadekoBot/data/units.json similarity index 100% rename from src/Nadeko.Bot.Common/data/units.json rename to src/NadekoBot/data/units.json diff --git a/src/Nadeko.Bot.Common/data/urero.json b/src/NadekoBot/data/urero.json similarity index 100% rename from src/Nadeko.Bot.Common/data/urero.json rename to src/NadekoBot/data/urero.json diff --git a/src/Nadeko.Bot.Common/data/wowjokes.json b/src/NadekoBot/data/wowjokes.json similarity index 100% rename from src/Nadeko.Bot.Common/data/wowjokes.json rename to src/NadekoBot/data/wowjokes.json diff --git a/src/Nadeko.Bot.Common/data/xp.yml b/src/NadekoBot/data/xp.yml similarity index 100% rename from src/Nadeko.Bot.Common/data/xp.yml rename to src/NadekoBot/data/xp.yml diff --git a/src/Nadeko.Bot.Common/data/xp_template.json b/src/NadekoBot/data/xp_template.json similarity index 100% rename from src/Nadeko.Bot.Common/data/xp_template.json rename to src/NadekoBot/data/xp_template.json diff --git a/src/Nadeko.Bot.Common/data/yomama.txt b/src/NadekoBot/data/yomama.txt similarity index 100% rename from src/Nadeko.Bot.Common/data/yomama.txt rename to src/NadekoBot/data/yomama.txt