From 599245b1cae5cfcdff38acb5b9c2f77e038d7a79 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sat, 30 Sep 2017 00:46:33 +0200 Subject: [PATCH 001/192] Initial split of the modules --- .../Common/AsyncLazy.cs | 0 .../Common/Attributes/Aliases.cs | 0 .../Common/Attributes/Description.cs | 0 .../Common/Attributes/NadekoCommand.cs | 0 .../Attributes/NadekoModuleAttribute.cs | 0 .../Common/Attributes/OwnerOnlyAttribute.cs | 0 .../Common/Attributes/Usage.cs | 0 .../Common/BotConfigEditType.cs | 0 .../Common/CREmbed.cs | 0 .../Common/Collections/ConcurrentHashSet.cs | 0 .../Collections/DisposableImutableList.cs | 0 .../Common/Collections/IndexedCollection.cs | 0 .../Common/Collections/PoopyRingBuffer.cs | 0 .../Common/CommandData.cs | 0 .../Common/ModuleBehaviors/IEarlyBlocker.cs | 0 .../ModuleBehaviors/IEarlyBlockingExecutor.cs | 0 .../Common/ModuleBehaviors/IEarlyExecutor.cs | 0 .../ModuleBehaviors/IINputTransformer.cs | 0 .../Common/ModuleBehaviors/ILateBlocker.cs | 0 .../ModuleBehaviors/ILateBlockingExecutor.cs | 0 .../Common/ModuleBehaviors/ILateExecutor.cs | 0 .../Common}/NadekoModule.cs | 0 .../Common}/NadekoModuleExtensions.cs | 0 .../Common/NadekoRandom.cs | 0 .../Common/NoPublicBotPrecondition.cs | 0 .../Common/PlatformHelper.cs | 0 .../Common/Replacements/ReplacementBuilder.cs | 66 +++++++------ .../Common/Replacements/Replacer.cs | 0 .../Common/Shard0Precondition.cs | 0 .../Common/ShardCom/IShardComMessage.cs | 0 .../Common/ShardCom/ShardComClient.cs | 0 .../Common/ShardCom/ShardComServer.cs | 0 .../Common}/SocketMessageEventWrapper.cs | 2 +- .../Common/TypeReaders/AddRemove.cs | 0 .../TypeReaders/BotCommandTypeReader.cs | 73 ++++++++++++++ .../TypeReaders/GuildDateTimeTypeReader.cs | 40 ++++++++ .../Common/TypeReaders/GuildTypeReader.cs | 0 .../TypeReaders/Models/PermissionAction.cs | 0 .../Common/TypeReaders/ModuleTypeReader.cs | 0 .../TypeReaders/PermissionActionTypeReader.cs | 0 .../20161011200458_first.Designer.cs | 0 .../Migrations/20161011200458_first.cs | 0 ...1015005020_CurrencyTransaction.Designer.cs | 0 .../20161015005020_CurrencyTransaction.cs | 0 .../Migrations/20161015102407_coc.Designer.cs | 0 .../Migrations/20161015102407_coc.cs | 0 .../20161019055137_MuteRoleName.Designer.cs | 0 .../Migrations/20161019055137_MuteRoleName.cs | 0 .../20161107213222_Cleverbot.Designer.cs | 0 .../Migrations/20161107213222_Cleverbot.cs | 0 ...2100602_Greet and bye improved.Designer.cs | 0 .../20161122100602_Greet and bye improved.cs | 0 .../20161127233843_PokeGame.Designer.cs | 0 .../Migrations/20161127233843_PokeGame.cs | 0 .../20161213025624_mutedusers.Designer.cs | 0 .../Migrations/20161213025624_mutedusers.cs | 0 .../20161224032833_logsettings.Designer.cs | 0 .../Migrations/20161224032833_logsettings.cs | 0 .../20170110111159_repeater-drop.Designer.cs | 0 .../20170110111159_repeater-drop.cs | 0 .../20170110111302_repeater-new.Designer.cs | 0 .../Migrations/20170110111302_repeater-new.cs | 0 .../20170110180534_protection.Designer.cs | 0 .../Migrations/20170110180534_protection.cs | 0 ...2185538_currency-modifications.Designer.cs | 0 .../20170112185538_currency-modifications.cs | 0 ...20170118202307_ok-error-colors.Designer.cs | 0 .../20170118202307_ok-error-colors.cs | 0 .../20170122044958_waifus.Designer.cs | 0 .../Migrations/20170122044958_waifus.cs | 0 ...4350_guild-timezone-and-locale.Designer.cs | 0 ...0170213164350_guild-timezone-and-locale.cs | 0 .../20170222162505_dateadded.Designer.cs | 0 .../Migrations/20170222162505_dateadded.cs | 0 .../20170308033058_permsv2.Designer.cs | 0 .../Migrations/20170308033058_permsv2.cs | 0 .../20170310210952_unmute-timers.Designer.cs | 0 .../20170310210952_unmute-timers.cs | 0 .../20170311054632_vcrole.Designer.cs | 0 .../Migrations/20170311054632_vcrole.cs | 0 .../20170318190018_crad-and-crdm.Designer.cs | 0 .../20170318190018_crad-and-crdm.cs | 0 ...0170320090138_command-aliasing.Designer.cs | 0 .../20170320090138_command-aliasing.cs | 0 ...0170330000613_warning-commands.Designer.cs | 0 .../20170330000613_warning-commands.cs | 0 ...0170331093025_startup-commands.Designer.cs | 0 .../20170331093025_startup-commands.cs | 0 ...70401161600_slowmode-whitelist.Designer.cs | 0 .../20170401161600_slowmode-whitelist.cs | 0 ...20170401205753_patreon-rewards.Designer.cs | 0 .../20170401205753_patreon-rewards.cs | 0 .../20170405161814_flower-shop.Designer.cs | 0 .../Migrations/20170405161814_flower-shop.cs | 0 ...70408162851_game-voice-channel.Designer.cs | 0 .../20170408162851_game-voice-channel.cs | 0 .../20170409193757_gmod-and-cmod.Designer.cs | 0 .../20170409193757_gmod-and-cmod.cs | 0 .../20170501103455_patreon-id.Designer.cs | 0 .../Migrations/20170501103455_patreon-id.cs | 0 ...0528001839_permissions-version.Designer.cs | 0 .../20170528001839_permissions-version.cs | 0 .../20170530033406_guild-prefixes.Designer.cs | 0 .../20170530033406_guild-prefixes.cs | 0 .../20170612094138_verbose-errors.Designer.cs | 0 .../20170612094138_verbose-errors.cs | 0 ...70612234751_repeat time of day.Designer.cs | 0 .../20170612234751_repeat time of day.cs | 0 .../20170613231358_maxdropamount.Designer.cs | 0 .../20170613231358_maxdropamount.cs | 0 .../20170616154106_crstartswith.Designer.cs | 0 .../Migrations/20170616154106_crstartswith.cs | 0 .../20170714021615_stream-role.Designer.cs | 0 .../Migrations/20170714021615_stream-role.cs | 0 ...0719023924_streamrole-kw-bl-wl.Designer.cs | 0 .../20170719023924_streamrole-kw-bl-wl.cs | 0 .../20170721004230_nsfw-blacklist.Designer.cs | 0 .../20170721004230_nsfw-blacklist.cs | 0 .../20170722074959_cr-ca.Designer.cs | 0 .../Migrations/20170722074959_cr-ca.cs | 0 .../20170814044636_waifu-items.Designer.cs | 0 .../Migrations/20170814044636_waifu-items.cs | 0 ...70815222316_mute-time-antispam.Designer.cs | 0 .../20170815222316_mute-time-antispam.cs | 0 .../20170908230730_xp-and-clubs.Designer.cs | 0 .../Migrations/20170908230730_xp-and-clubs.cs | 0 .../20170911200031_lastXpGain.Designer.cs | 0 .../Migrations/20170911200031_lastXpGain.cs | 0 .../20170913022654_total-xp.Designer.cs | 0 .../Migrations/20170913022654_total-xp.cs | 0 .../20170915034808_club-admins.Designer.cs | 0 .../Migrations/20170915034808_club-admins.cs | 0 .../20170921185313_feeds.Designer.cs | 0 .../Migrations/20170921185313_feeds.cs | 0 .../20170923002439_xprr-fix.Designer.cs | 0 .../Migrations/20170923002439_xprr-fix.cs | 0 .../Migrations/MigrationQueries.cs | 0 .../NadekoSqliteContextModelSnapshot.cs | 0 .../Modules/Administration/Administration.cs | 0 .../Administration/AutoAssignRoleCommands.cs | 0 .../Administration/Common/Migration/0_9..cs | 0 .../Common/Migration/MigrationException.cs | 0 .../Administration/Common/ProtectionStats.cs | 0 .../Administration/Common/Ratelimiter.cs | 0 .../Administration/Common/UserSpamStats.cs | 0 .../Administration/GameChannelCommands.cs | 0 .../Administration/LocalizationCommands.cs | 0 .../Modules/Administration/LogCommands.cs | 0 .../Administration/MigrationCommands.cs | 0 .../Modules/Administration/MuteCommands.cs | 0 .../Administration/PlayingRotateCommands.cs | 0 .../Modules/Administration/PrefixCommands.cs | 0 .../Administration/ProtectionCommands.cs | 0 .../Modules/Administration/PruneCommands.cs | 0 .../Administration/RatelimitCommands.cs | 0 .../SelfAssignedRolesCommands.cs | 0 .../Modules/Administration/SelfCommands.cs | 6 +- .../Administration/ServerGreetCommands.cs | 0 .../Services/AdministrationService.cs | 0 .../Services/AutoAssignRoleService.cs | 0 .../Services/GameVoiceChannelService.cs | 0 .../Services/GuildTimezoneService.cs | 0 .../Services/LogCommandService.cs | 0 .../Administration/Services/MuteService.cs | 0 .../Services/PlayingRotateService.cs | 11 +-- .../Services/ProtectionService.cs | 0 .../Administration/Services/PruneService.cs | 0 .../Services/RatelimitService.cs | 0 .../Administration/Services/SelfService.cs | 0 .../Services/UserPunishService.cs | 0 .../Administration/Services/VcRoleService.cs | 0 .../Administration/Services/VplusTService.cs | 0 .../Administration/TimeZoneCommands.cs | 0 .../Administration/UserPunishCommands.cs | 0 .../Modules/Administration/VcRoleCommands.cs | 0 .../Administration/VoicePlusTextCommands.cs | 0 .../Modules/Help/Help.cs | 0 .../Modules/Help/Services/HelpService.cs | 0 .../Modules/Permissions/BlacklistCommands.cs | 27 ------ .../Modules/Permissions/CmdCdsCommands.cs | 0 .../Permissions/CommandCostCommands.cs | 0 .../Permissions/Common/PermissionCache.cs | 0 .../Common/PermissionExtensions.cs | 0 .../Common/PermissionsCollection.cs | 0 .../Modules/Permissions/FilterCommands.cs | 0 .../Permissions/GlobalPermissionCommands.cs | 0 .../Modules/Permissions/Permissions.cs | 0 .../Permissions/ResetPermissionsCommands.cs | 0 .../Permissions/Services/BlacklistService.cs | 0 .../Permissions/Services/CmdCdService.cs | 0 .../Permissions/Services/FilterService.cs | 0 .../Services/GlobalPermissionService.cs | 0 .../Services/PermissionsService.cs | 0 .../Services/ResetPermissionsService.cs | 0 NadekoBot.Core/NadekoBot.Core.csproj | 38 ++++++++ .../Services/CommandHandler.cs | 0 .../Services/CurrencyService.cs | 0 .../Services/Database/IUnitOfWork.cs | 0 .../Database/Models/AntiProtection.cs | 0 .../Services/Database/Models/BotConfig.cs | 0 .../Services/Database/Models/ClashCaller.cs | 0 .../Services/Database/Models/ClashWar.cs | 0 .../Services/Database/Models/ClubInfo.cs | 0 .../Database/Models/CommandCooldown.cs | 0 .../Services/Database/Models/CommandCost.cs | 0 .../Services/Database/Models/CommandPrice.cs | 0 .../Services/Database/Models/ConvertUnit.cs | 0 .../Services/Database/Models/Currency.cs | 0 .../Database/Models/CurrencyTransaction.cs | 0 .../Database/Models/CustomReaction.cs | 0 .../Services/Database/Models/DbEntity.cs | 0 .../Services/Database/Models/DiscordUser.cs | 0 .../Services/Database/Models/Donator.cs | 0 .../Services/Database/Models/FeedSub.cs | 0 .../Database/Models/FollowedStream.cs | 0 .../Services/Database/Models/GuildConfig.cs | 0 .../Database/Models/IgnoredLogChannel.cs | 0 .../Services/Database/Models/LogSetting.cs | 0 .../Services/Database/Models/MusicPlaylist.cs | 0 .../Services/Database/Models/Permission.cs | 0 .../Services/Database/Models/PlaylistSong.cs | 0 .../Services/Database/Models/PokeType.cs | 0 .../Services/Database/Models/Quote.cs | 0 .../Services/Database/Models/Reminder.cs | 0 .../Services/Database/Models/Repeater.cs | 0 .../Services/Database/Models/RewardedUser.cs | 0 .../Database/Models/SelfAssignableRole.cs | 0 .../Services/Database/Models/ShopEntry.cs | 0 .../Database/Models/StreamRoleSettings.cs | 0 .../Services/Database/Models/UserXpStats.cs | 0 .../Database/Models/VoicePresenceChannel.cs | 0 .../Services/Database/Models/Waifu.cs | 0 .../Services/Database/Models/WaifuItem.cs | 0 .../Services/Database/Models/WaifuUpdate.cs | 0 .../Services/Database/Models/Warning.cs | 0 .../Services/Database/Models/XpSettings.cs | 0 .../Services/Database/NadekoContext.cs | 0 .../Repositories/IBotConfigRepository.cs | 0 .../Repositories/IClashOfClansRepository.cs | 0 .../Database/Repositories/IClubRepository.cs | 0 .../Repositories/ICurrencyRepository.cs | 0 .../ICurrencyTransactionsRepository.cs | 0 .../Repositories/ICustomReactionRepository.cs | 0 .../Repositories/IDiscordUserRepository.cs | 0 .../Repositories/IDonatorsRepository.cs | 0 .../Repositories/IGuildConfigRepository.cs | 0 .../Repositories/IMusicPlaylistRepository.cs | 0 .../Repositories/IPokeGameRepository.cs | 0 .../Database/Repositories/IQuoteRepository.cs | 0 .../Repositories/IReminderRepository.cs | 0 .../Database/Repositories/IRepository.cs | 0 .../ISelfAssignedRolesRepository.cs | 0 .../Repositories/IUnitConverterRepository.cs | 0 .../Database/Repositories/IWaifuRepository.cs | 0 .../Repositories/IWarningsRepository.cs | 0 .../Database/Repositories/IXpRepository.cs | 0 .../Repositories/Impl/BotConfigRepository.cs | 0 .../Impl/ClashOfClansRepository.cs | 0 .../Repositories/Impl/ClubRepository.cs | 0 .../Repositories/Impl/CurrencyRepository.cs | 0 .../Impl/CurrencyTransactionsRepository.cs | 0 .../Impl/CustomReactionRepository.cs | 0 .../Impl/DiscordUserRepository.cs | 0 .../Repositories/Impl/DonatorsRepository.cs | 0 .../Impl/GuildConfigRepository.cs | 0 .../Impl/MusicPlaylistRepository.cs | 0 .../Repositories/Impl/PokeGameRepository.cs | 0 .../Repositories/Impl/QuoteRepository.cs | 0 .../Repositories/Impl/ReminderRepository.cs | 0 .../Database/Repositories/Impl/Repository.cs | 0 .../Impl/SelfAssignedRolesRepository.cs | 0 .../Impl/UnitCOnverterRepository.cs | 0 .../Repositories/Impl/WaifuRepository.cs | 0 .../Repositories/Impl/WarningsRepository.cs | 0 .../Repositories/Impl/XpRepository.cs | 0 .../Services/Database/UnitOfWork.cs | 0 .../Services/DbService.cs | 0 .../Services/GreetSettingsService.cs | 0 .../Services/IBotConfigProvider.cs | 0 .../Services/IBotCredentials.cs | 0 .../Services/IDataCache.cs | 0 .../Services/IGoogleApiService.cs | 0 .../Services/IImagesService.cs | 0 .../Services/ILocalization.cs | 0 .../Services/INService.cs | 0 .../Services/IStatsService.cs | 0 .../Services/Impl/BotConfigProvider.cs | 0 .../Services/Impl/BotCredentials.cs | 0 .../Services/Impl/GoogleApiService.cs | 0 .../Services/Impl/ImagesService.cs | 0 .../Services/Impl/Localization.cs | 0 .../Services/Impl/NadekoStrings.cs | 0 .../Services/Impl/RedisCache.cs | 0 .../Services/Impl/SoundCloudApiService.cs | 0 .../Impl/StartingGuildsListService.cs | 0 .../Services/Impl/StatsService.cs | 0 .../Services/Impl/SyncPreconditionService.cs | 0 .../Services/Impl/Ytdl.cs | 0 .../Services/LogSetup.cs | 0 .../Services}/NadekoBot.cs | 5 +- .../Services/ServiceProvider.cs | 0 .../Services}/ShardsCoordinator.cs | 6 +- .../_Extensions/Extensions.cs | 2 +- .../_Extensions/IEnumerableExtensions.cs | 0 .../_Extensions/IMessageChannelExtensions.cs | 0 .../_Extensions/IUserExtensions.cs | 0 .../_Extensions/MusicExtensions.cs | 0 .../_Extensions/NumberExtensions.cs | 0 .../_Extensions/StringExtensions.cs | 0 .../_libs/32/libsodium.dll | Bin .../_libs/32/opus.dll | Bin .../_libs/64/libsodium.dll | Bin .../_libs/64/opus.dll | Bin .../_strings/ResponseStrings.ar.json | 0 .../_strings/ResponseStrings.cs-CZ.json | 0 .../_strings/ResponseStrings.da-DK.json | 0 .../_strings/ResponseStrings.de-DE.json | 0 .../_strings/ResponseStrings.en-US.json | 0 .../_strings/ResponseStrings.es-ES.json | 0 .../_strings/ResponseStrings.fr-FR.json | 0 .../_strings/ResponseStrings.he-IL.json | 0 .../_strings/ResponseStrings.id-ID.json | 0 .../_strings/ResponseStrings.it-IT.json | 0 .../_strings/ResponseStrings.ja-JP.json | 0 .../_strings/ResponseStrings.ko-KR.json | 0 .../_strings/ResponseStrings.nb-NO.json | 0 .../_strings/ResponseStrings.nl-NL.json | 0 .../_strings/ResponseStrings.pl-PL.json | 0 .../_strings/ResponseStrings.pt-BR.json | 0 .../_strings/ResponseStrings.ro-RO.json | 0 .../_strings/ResponseStrings.ru-RU.json | 0 .../_strings/ResponseStrings.sr-cyrl-rs.json | 0 .../_strings/ResponseStrings.sv-SE.json | 0 .../_strings/ResponseStrings.tr-TR.json | 0 .../_strings/ResponseStrings.zh-CN.json | 0 .../_strings/ResponseStrings.zh-TW.json | 0 .../AnimeSearchCommands.cs | 0 .../Common/AnimeResult.cs | 0 .../Common/DefineModel.cs | 0 .../Exceptions/StreamNotFoundException.cs | 0 .../Common/GoogleSearchResult.cs | 0 .../Common/MagicItem.cs | 0 .../Common/MangaResult.cs | 0 .../Common/OmdbProvider.cs | 0 .../Common/OverwatchApiModel.cs | 0 .../Common/SearchImageCacher.cs | 0 .../Common/SearchPokemon.cs | 0 .../Common/StreamResponses.cs | 0 .../Common/TimeModels.cs | 0 .../Common/WeatherModels.cs | 0 .../Common/WikipediaApiModel.cs | 0 .../Common/WoWJoke.cs | 0 .../FeedCommands.cs | 0 .../JokeCommands.cs | 0 .../LoLCommands.cs | 0 .../MemegenCommands.cs | 0 .../NadekoBot.Modules.Searches.csproj | 16 ++++ .../OsuCommands.cs | 0 .../OverwatchCommands.cs | 0 .../PlaceCommands.cs | 0 .../PokemonSearchCommands.cs | 0 .../Searches.cs | 0 .../Services/AnimeSearchService.cs | 0 .../Services/FeedsService.cs | 0 .../Services/SearchesService.cs | 4 +- .../Services/StreamNotificationService.cs | 0 .../StreamNotificationCommands.cs | 0 .../TranslatorCommands.cs | 0 .../XkcdCommands.cs | 0 .../CustomReactions.cs | 0 .../Extensions/Extensions.cs | 0 .../NadekoBot.Modules.CustomReactions.csproj | 15 +++ .../Services/CustomReactionsService.cs | 0 .../AnimalRacingCommands.cs | 0 .../Common/AnimalRacing/AnimalRace.cs | 0 .../Common/AnimalRacing/AnimalRacingUser.cs | 0 .../Exceptions/AlreadyJoinedException.cs | 0 .../Exceptions/AlreadyStartedException.cs | 0 .../Exceptions/AnimalRaceFullException.cs | 0 .../Exceptions/NotEnoughFundsException.cs | 0 .../Common/Cards.cs | 0 .../Common/WheelOfFortune/WheelOfFortune.cs | 0 .../CurrencyEventsCommands.cs | 0 .../DiceRollCommands.cs | 0 .../DrawCommands.cs | 0 .../FlipCoinCommands.cs | 0 .../FlowerShopCommands.cs | 0 .../Gambling.cs | 0 .../NadekoBot.Modules.Gambling.csproj | 11 +++ .../SlotCommands.cs | 0 .../WaifuClaimCommands.cs | 0 .../WheelOfFortuneCommands.cs | 0 .../AcropobiaCommands.cs | 0 .../CleverBotCommands.cs | 0 .../Common/Acrophobia/Acrophobia.cs | 0 .../Common/Acrophobia/AcrophobiaUser.cs | 0 .../Common/ChatterBot/ChatterBotResponse.cs | 0 .../Common/ChatterBot/ChatterBotSession.cs | 0 .../Common/ChatterBot/CleverbotResponse.cs | 0 .../Common/ChatterBot/IChatterBotSession.cs | 0 .../ChatterBot/OfficialCleverbotSession.cs | 0 .../Common/Connect4/Connect4.cs | 0 .../Common/GirlRating.cs | 0 .../Exceptions/TermNotFoundException.cs | 0 .../Common/Hangman/Hangman.cs | 0 .../Common/Hangman/HangmanObject.cs | 0 .../Common/Hangman/Phase.cs | 0 .../Common/Hangman/TermPool.cs | 0 .../Common/Hangman/TermType.cs | 0 .../Common/Nunchi/Nunchi.cs | 0 .../Common/Poll.cs | 0 .../Common/Trivia/TriviaGame.cs | 0 .../Common/Trivia/TriviaQuestion.cs | 0 .../Common/Trivia/TriviaQuestionPool.cs | 0 .../Common/TypingArticle.cs | 0 .../Common/TypingGame.cs | 0 .../Connect4Commands.cs | 0 .../Games.cs | 0 .../HangmanCommands.cs | 0 .../LeetCommands.cs | 0 .../NadekoBot.Modules.Games.csproj | 15 +++ .../NunchiCommands.cs | 0 .../PlantAndPickCommands.cs | 0 .../PollCommands.cs | 0 .../Services/ChatterbotService.cs | 0 .../Services/GamesService.cs | 0 .../Services/PollService.cs | 0 .../SpeedTypingCommands.cs | 0 .../TicTacToeCommands.cs | 0 .../TriviaCommands.cs | 0 .../Exceptions/NotInVoiceChannelException.cs | 0 .../Common/Exceptions/QueueFullException.cs | 0 .../Exceptions/SongNotFoundException.cs | 0 .../Common/MusicPlayer.cs | 0 .../Common/MusicQueue.cs | 0 .../Common/SongBuffer.cs | 0 .../Common/SongHandler.cs | 0 .../Common/SongInfo.cs | 0 .../SongResolver/ISongResolverFactory.cs | 0 .../SongResolver/SongResolverFactory.cs | 0 .../Strategies/IResolverStrategy.cs | 0 .../Strategies/LocalSongResolveStrategy.cs | 0 .../Strategies/RadioResolveStrategy.cs | 0 .../Strategies/SoundCloudResolveStrategy.cs | 0 .../Strategies/YoutubeResolveStrategy.cs | 0 .../Extensions/Extensions.cs | 0 .../Music.cs | 0 .../NadekoBot.Modules.Music.csproj | 15 +++ .../Services/MusicService.cs | 0 .../Exceptions/TagBlacklistedException.cs | 0 .../NSFW => NadekoBot.Modules.Nsfw}/NSFW.cs | 0 .../NadekoBot.Modules.Nsfw.csproj | 16 ++++ .../Common/PokeStats.cs | 0 .../Common/PokemonType.cs | 0 .../NadekoBot.Modules.Pokemon.csproj | 11 +++ .../Pokemon.cs | 0 .../Services/PokemonService.cs | 0 .../BotConfigCommands.cs | 0 .../CalcCommands.cs | 0 .../CommandMapCommands.cs | 0 .../Exceptions/StreamRoleNotFoundException.cs | 0 .../StreamRolePermissionException.cs | 0 .../Common/Patreon/PatreonData.cs | 0 .../Common/Patreon/PatreonPledge.cs | 0 .../Common/Patreon/PatreonUser.cs | 0 .../Common/RepeatRunner.cs | 0 .../Common/StreamRoleListType.cs | 0 .../Extensions/StreamRoleExtensions.cs | 0 .../InfoCommands.cs | 0 .../NadekoBot.Modules.Utility.csproj | 16 ++++ .../PatreonCommands.cs | 0 .../QuoteCommands.cs | 0 .../RemindCommands.cs | 0 .../RepeatCommands.cs | 86 +++++++++-------- .../Services/CommandMapService.cs | 0 .../Services/ConverterService.cs | 0 .../Services/MessageRepeaterService.cs | 0 .../Services/PatreonRewardsService.cs | 0 .../Services/RemindService.cs | 0 .../Services/StreamRoleService.cs | 0 .../Services/VerboseErrorsService.cs | 0 .../StreamRoleCommands.cs | 0 .../UnitConversionCommands.cs | 0 .../Utility.cs | 0 .../VerboseErrorCommands.cs | 0 .../Xp => NadekoBot.Modules.Xp}/Club.cs | 0 .../Common/FullUserStats.cs | 0 .../Common/LevelStats.cs | 0 .../Extensions/Extensions.cs | 0 .../NadekoBot.Modules.Xp.csproj | 15 +++ .../Services/ClubService.cs | 0 .../Services/UserCacheItem.cs | 0 .../Services/XpService.cs | 0 .../Modules/Xp => NadekoBot.Modules.Xp}/Xp.cs | 0 NadekoBot.sln | 90 ++++++++++++++++++ docs/Placeholders.md | 1 + .../TypeReaders/BotCommandTypeReader.cs | 74 -------------- .../TypeReaders/GuildDateTimeTypeReader.cs | 40 -------- src/NadekoBot/NadekoBot.csproj | 24 ++--- 499 files changed, 469 insertions(+), 256 deletions(-) rename {src/NadekoBot => NadekoBot.Core}/Common/AsyncLazy.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Attributes/Aliases.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Attributes/Description.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Attributes/NadekoCommand.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Attributes/NadekoModuleAttribute.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Attributes/OwnerOnlyAttribute.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Attributes/Usage.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/BotConfigEditType.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/CREmbed.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Collections/ConcurrentHashSet.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Collections/DisposableImutableList.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Collections/IndexedCollection.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Collections/PoopyRingBuffer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/CommandData.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/IEarlyBlocker.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/IEarlyExecutor.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/IINputTransformer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/ILateBlocker.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/ILateBlockingExecutor.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ModuleBehaviors/ILateExecutor.cs (100%) rename {src/NadekoBot/Modules => NadekoBot.Core/Common}/NadekoModule.cs (100%) rename {src/NadekoBot/Modules => NadekoBot.Core/Common}/NadekoModuleExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/NadekoRandom.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/NoPublicBotPrecondition.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/PlatformHelper.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Replacements/ReplacementBuilder.cs (73%) rename {src/NadekoBot => NadekoBot.Core}/Common/Replacements/Replacer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/Shard0Precondition.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ShardCom/IShardComMessage.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ShardCom/ShardComClient.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/ShardCom/ShardComServer.cs (100%) rename {src/NadekoBot/Services/Discord => NadekoBot.Core/Common}/SocketMessageEventWrapper.cs (98%) rename {src/NadekoBot => NadekoBot.Core}/Common/TypeReaders/AddRemove.cs (100%) create mode 100644 NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs create mode 100644 NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs rename {src/NadekoBot => NadekoBot.Core}/Common/TypeReaders/GuildTypeReader.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/TypeReaders/Models/PermissionAction.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/TypeReaders/ModuleTypeReader.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Common/TypeReaders/PermissionActionTypeReader.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161011200458_first.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161011200458_first.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161015005020_CurrencyTransaction.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161015005020_CurrencyTransaction.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161015102407_coc.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161015102407_coc.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161019055137_MuteRoleName.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161019055137_MuteRoleName.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161107213222_Cleverbot.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161107213222_Cleverbot.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161122100602_Greet and bye improved.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161122100602_Greet and bye improved.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161127233843_PokeGame.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161127233843_PokeGame.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161213025624_mutedusers.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161213025624_mutedusers.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161224032833_logsettings.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20161224032833_logsettings.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170110111159_repeater-drop.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170110111159_repeater-drop.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170110111302_repeater-new.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170110111302_repeater-new.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170110180534_protection.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170110180534_protection.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170112185538_currency-modifications.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170112185538_currency-modifications.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170118202307_ok-error-colors.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170118202307_ok-error-colors.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170122044958_waifus.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170122044958_waifus.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170213164350_guild-timezone-and-locale.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170222162505_dateadded.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170222162505_dateadded.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170308033058_permsv2.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170308033058_permsv2.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170310210952_unmute-timers.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170310210952_unmute-timers.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170311054632_vcrole.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170311054632_vcrole.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170318190018_crad-and-crdm.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170318190018_crad-and-crdm.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170320090138_command-aliasing.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170320090138_command-aliasing.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170330000613_warning-commands.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170330000613_warning-commands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170331093025_startup-commands.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170331093025_startup-commands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170401161600_slowmode-whitelist.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170401161600_slowmode-whitelist.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170401205753_patreon-rewards.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170401205753_patreon-rewards.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170405161814_flower-shop.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170405161814_flower-shop.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170408162851_game-voice-channel.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170408162851_game-voice-channel.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170409193757_gmod-and-cmod.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170409193757_gmod-and-cmod.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170501103455_patreon-id.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170501103455_patreon-id.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170528001839_permissions-version.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170528001839_permissions-version.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170530033406_guild-prefixes.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170530033406_guild-prefixes.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170612094138_verbose-errors.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170612094138_verbose-errors.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170612234751_repeat time of day.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170612234751_repeat time of day.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170613231358_maxdropamount.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170613231358_maxdropamount.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170616154106_crstartswith.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170616154106_crstartswith.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170714021615_stream-role.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170714021615_stream-role.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170719023924_streamrole-kw-bl-wl.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170721004230_nsfw-blacklist.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170721004230_nsfw-blacklist.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170722074959_cr-ca.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170722074959_cr-ca.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170814044636_waifu-items.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170814044636_waifu-items.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170815222316_mute-time-antispam.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170815222316_mute-time-antispam.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170908230730_xp-and-clubs.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170908230730_xp-and-clubs.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170911200031_lastXpGain.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170911200031_lastXpGain.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170913022654_total-xp.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170913022654_total-xp.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170915034808_club-admins.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170915034808_club-admins.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170921185313_feeds.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170921185313_feeds.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170923002439_xprr-fix.Designer.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/20170923002439_xprr-fix.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/MigrationQueries.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Migrations/NadekoSqliteContextModelSnapshot.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Administration.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/AutoAssignRoleCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Common/Migration/0_9..cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Common/Migration/MigrationException.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Common/ProtectionStats.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Common/Ratelimiter.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Common/UserSpamStats.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/GameChannelCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/LocalizationCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/LogCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/MigrationCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/MuteCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/PlayingRotateCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/PrefixCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/ProtectionCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/PruneCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/RatelimitCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/SelfAssignedRolesCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/SelfCommands.cs (98%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/ServerGreetCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/AdministrationService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/AutoAssignRoleService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/GameVoiceChannelService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/GuildTimezoneService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/LogCommandService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/MuteService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/PlayingRotateService.cs (90%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/ProtectionService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/PruneService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/RatelimitService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/SelfService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/UserPunishService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/VcRoleService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/Services/VplusTService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/TimeZoneCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/UserPunishCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/VcRoleCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Administration/VoicePlusTextCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Help/Help.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Help/Services/HelpService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/BlacklistCommands.cs (78%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/CmdCdsCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/CommandCostCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Common/PermissionCache.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Common/PermissionExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Common/PermissionsCollection.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/FilterCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/GlobalPermissionCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Permissions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/ResetPermissionsCommands.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Services/BlacklistService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Services/CmdCdService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Services/FilterService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Services/GlobalPermissionService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Services/PermissionsService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Modules/Permissions/Services/ResetPermissionsService.cs (100%) create mode 100644 NadekoBot.Core/NadekoBot.Core.csproj rename {src/NadekoBot => NadekoBot.Core}/Services/CommandHandler.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/CurrencyService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/IUnitOfWork.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/AntiProtection.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/BotConfig.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/ClashCaller.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/ClashWar.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/ClubInfo.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/CommandCooldown.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/CommandCost.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/CommandPrice.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/ConvertUnit.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Currency.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/CurrencyTransaction.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/CustomReaction.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/DbEntity.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/DiscordUser.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Donator.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/FeedSub.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/FollowedStream.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/GuildConfig.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/IgnoredLogChannel.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/LogSetting.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/MusicPlaylist.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Permission.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/PlaylistSong.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/PokeType.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Quote.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Reminder.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Repeater.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/RewardedUser.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/SelfAssignableRole.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/ShopEntry.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/StreamRoleSettings.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/UserXpStats.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/VoicePresenceChannel.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Waifu.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/WaifuItem.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/WaifuUpdate.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/Warning.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Models/XpSettings.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/NadekoContext.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IBotConfigRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IClashOfClansRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IClubRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/ICurrencyRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/ICurrencyTransactionsRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/ICustomReactionRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IDiscordUserRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IDonatorsRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IGuildConfigRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IMusicPlaylistRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IPokeGameRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IQuoteRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IReminderRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/ISelfAssignedRolesRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IUnitConverterRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IWaifuRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IWarningsRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/IXpRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/BotConfigRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/ClashOfClansRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/ClubRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/CurrencyRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/CustomReactionRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/DiscordUserRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/DonatorsRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/GuildConfigRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/PokeGameRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/QuoteRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/ReminderRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/Repository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/WaifuRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/WarningsRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/Repositories/Impl/XpRepository.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Database/UnitOfWork.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/DbService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/GreetSettingsService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/IBotConfigProvider.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/IBotCredentials.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/IDataCache.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/IGoogleApiService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/IImagesService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/ILocalization.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/INService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/IStatsService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/BotConfigProvider.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/BotCredentials.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/GoogleApiService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/ImagesService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/Localization.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/NadekoStrings.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/RedisCache.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/SoundCloudApiService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/StartingGuildsListService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/StatsService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/SyncPreconditionService.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/Impl/Ytdl.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/Services/LogSetup.cs (100%) rename {src/NadekoBot => NadekoBot.Core/Services}/NadekoBot.cs (98%) rename {src/NadekoBot => NadekoBot.Core}/Services/ServiceProvider.cs (100%) rename {src/NadekoBot => NadekoBot.Core/Services}/ShardsCoordinator.cs (96%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/Extensions.cs (99%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/IEnumerableExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/IMessageChannelExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/IUserExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/MusicExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/NumberExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/_Extensions/StringExtensions.cs (100%) rename {src/NadekoBot => NadekoBot.Core}/_libs/32/libsodium.dll (100%) rename {src/NadekoBot => NadekoBot.Core}/_libs/32/opus.dll (100%) rename {src/NadekoBot => NadekoBot.Core}/_libs/64/libsodium.dll (100%) rename {src/NadekoBot => NadekoBot.Core}/_libs/64/opus.dll (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.ar.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.cs-CZ.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.da-DK.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.de-DE.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.en-US.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.es-ES.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.fr-FR.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.he-IL.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.id-ID.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.it-IT.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.ja-JP.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.ko-KR.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.nb-NO.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.nl-NL.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.pl-PL.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.pt-BR.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.ro-RO.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.ru-RU.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.sr-cyrl-rs.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.sv-SE.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.tr-TR.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.zh-CN.json (100%) rename {src/NadekoBot => NadekoBot.Core}/_strings/ResponseStrings.zh-TW.json (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/AnimeSearchCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/AnimeResult.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/DefineModel.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/Exceptions/StreamNotFoundException.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/GoogleSearchResult.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/MagicItem.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/MangaResult.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/OmdbProvider.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/OverwatchApiModel.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/SearchImageCacher.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/SearchPokemon.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/StreamResponses.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/TimeModels.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/WeatherModels.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/WikipediaApiModel.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Common/WoWJoke.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/FeedCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/JokeCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/LoLCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/MemegenCommands.cs (100%) create mode 100644 NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/OsuCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/OverwatchCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/PlaceCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/PokemonSearchCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Searches.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Services/AnimeSearchService.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Services/FeedsService.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Services/SearchesService.cs (98%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/Services/StreamNotificationService.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/StreamNotificationCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/TranslatorCommands.cs (100%) rename {src/NadekoBot/Modules/Searches => NadekoBot.Module.Searches}/XkcdCommands.cs (100%) rename {src/NadekoBot/Modules/CustomReactions => NadekoBot.Modules.CustomReactions}/CustomReactions.cs (100%) rename {src/NadekoBot/Modules/CustomReactions => NadekoBot.Modules.CustomReactions}/Extensions/Extensions.cs (100%) create mode 100644 NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj rename {src/NadekoBot/Modules/CustomReactions => NadekoBot.Modules.CustomReactions}/Services/CustomReactionsService.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/AnimalRacingCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/AnimalRacing/AnimalRace.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/AnimalRacing/AnimalRacingUser.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/Cards.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Common/WheelOfFortune/WheelOfFortune.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/CurrencyEventsCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/DiceRollCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/DrawCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/FlipCoinCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/FlowerShopCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/Gambling.cs (100%) create mode 100644 NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/SlotCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/WaifuClaimCommands.cs (100%) rename {src/NadekoBot/Modules/Gambling => NadekoBot.Modules.Gambling}/WheelOfFortuneCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/AcropobiaCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/CleverBotCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Acrophobia/Acrophobia.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Acrophobia/AcrophobiaUser.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/ChatterBot/ChatterBotResponse.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/ChatterBot/ChatterBotSession.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/ChatterBot/CleverbotResponse.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/ChatterBot/IChatterBotSession.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/ChatterBot/OfficialCleverbotSession.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Connect4/Connect4.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/GirlRating.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Hangman/Exceptions/TermNotFoundException.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Hangman/Hangman.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Hangman/HangmanObject.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Hangman/Phase.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Hangman/TermPool.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Hangman/TermType.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Nunchi/Nunchi.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Poll.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Trivia/TriviaGame.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Trivia/TriviaQuestion.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/Trivia/TriviaQuestionPool.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/TypingArticle.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Common/TypingGame.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Connect4Commands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Games.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/HangmanCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/LeetCommands.cs (100%) create mode 100644 NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/NunchiCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/PlantAndPickCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/PollCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Services/ChatterbotService.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Services/GamesService.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/Services/PollService.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/SpeedTypingCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/TicTacToeCommands.cs (100%) rename {src/NadekoBot/Modules/Games => NadekoBot.Modules.Games}/TriviaCommands.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/Exceptions/NotInVoiceChannelException.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/Exceptions/QueueFullException.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/Exceptions/SongNotFoundException.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/MusicPlayer.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/MusicQueue.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongBuffer.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongHandler.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongInfo.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/ISongResolverFactory.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/SongResolverFactory.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/Strategies/IResolverStrategy.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/Strategies/RadioResolveStrategy.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Extensions/Extensions.cs (100%) rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Music.cs (100%) create mode 100644 NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj rename {src/NadekoBot/Modules/Music => NadekoBot.Modules.Music}/Services/MusicService.cs (100%) rename {src/NadekoBot/Modules/NSFW => NadekoBot.Modules.Nsfw}/Exceptions/TagBlacklistedException.cs (100%) rename {src/NadekoBot/Modules/NSFW => NadekoBot.Modules.Nsfw}/NSFW.cs (100%) create mode 100644 NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj rename {src/NadekoBot/Modules/Pokemon => NadekoBot.Modules.Pokemon}/Common/PokeStats.cs (100%) rename {src/NadekoBot/Modules/Pokemon => NadekoBot.Modules.Pokemon}/Common/PokemonType.cs (100%) create mode 100644 NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj rename {src/NadekoBot/Modules/Pokemon => NadekoBot.Modules.Pokemon}/Pokemon.cs (100%) rename {src/NadekoBot/Modules/Pokemon => NadekoBot.Modules.Pokemon}/Services/PokemonService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/BotConfigCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/CalcCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/CommandMapCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/Exceptions/StreamRoleNotFoundException.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/Exceptions/StreamRolePermissionException.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/Patreon/PatreonData.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/Patreon/PatreonPledge.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/Patreon/PatreonUser.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/RepeatRunner.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Common/StreamRoleListType.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Extensions/StreamRoleExtensions.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/InfoCommands.cs (100%) create mode 100644 NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/PatreonCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/QuoteCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/RemindCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/RepeatCommands.cs (74%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/CommandMapService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/ConverterService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/MessageRepeaterService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/PatreonRewardsService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/RemindService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/StreamRoleService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Services/VerboseErrorsService.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/StreamRoleCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/UnitConversionCommands.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/Utility.cs (100%) rename {src/NadekoBot/Modules/Utility => NadekoBot.Modules.Utility}/VerboseErrorCommands.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Club.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Common/FullUserStats.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Common/LevelStats.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Extensions/Extensions.cs (100%) create mode 100644 NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Services/ClubService.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Services/UserCacheItem.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Services/XpService.cs (100%) rename {src/NadekoBot/Modules/Xp => NadekoBot.Modules.Xp}/Xp.cs (100%) delete mode 100644 src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs delete mode 100644 src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs diff --git a/src/NadekoBot/Common/AsyncLazy.cs b/NadekoBot.Core/Common/AsyncLazy.cs similarity index 100% rename from src/NadekoBot/Common/AsyncLazy.cs rename to NadekoBot.Core/Common/AsyncLazy.cs diff --git a/src/NadekoBot/Common/Attributes/Aliases.cs b/NadekoBot.Core/Common/Attributes/Aliases.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/Aliases.cs rename to NadekoBot.Core/Common/Attributes/Aliases.cs diff --git a/src/NadekoBot/Common/Attributes/Description.cs b/NadekoBot.Core/Common/Attributes/Description.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/Description.cs rename to NadekoBot.Core/Common/Attributes/Description.cs diff --git a/src/NadekoBot/Common/Attributes/NadekoCommand.cs b/NadekoBot.Core/Common/Attributes/NadekoCommand.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/NadekoCommand.cs rename to NadekoBot.Core/Common/Attributes/NadekoCommand.cs diff --git a/src/NadekoBot/Common/Attributes/NadekoModuleAttribute.cs b/NadekoBot.Core/Common/Attributes/NadekoModuleAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/NadekoModuleAttribute.cs rename to NadekoBot.Core/Common/Attributes/NadekoModuleAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs b/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs rename to NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/Usage.cs b/NadekoBot.Core/Common/Attributes/Usage.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/Usage.cs rename to NadekoBot.Core/Common/Attributes/Usage.cs diff --git a/src/NadekoBot/Common/BotConfigEditType.cs b/NadekoBot.Core/Common/BotConfigEditType.cs similarity index 100% rename from src/NadekoBot/Common/BotConfigEditType.cs rename to NadekoBot.Core/Common/BotConfigEditType.cs diff --git a/src/NadekoBot/Common/CREmbed.cs b/NadekoBot.Core/Common/CREmbed.cs similarity index 100% rename from src/NadekoBot/Common/CREmbed.cs rename to NadekoBot.Core/Common/CREmbed.cs diff --git a/src/NadekoBot/Common/Collections/ConcurrentHashSet.cs b/NadekoBot.Core/Common/Collections/ConcurrentHashSet.cs similarity index 100% rename from src/NadekoBot/Common/Collections/ConcurrentHashSet.cs rename to NadekoBot.Core/Common/Collections/ConcurrentHashSet.cs diff --git a/src/NadekoBot/Common/Collections/DisposableImutableList.cs b/NadekoBot.Core/Common/Collections/DisposableImutableList.cs similarity index 100% rename from src/NadekoBot/Common/Collections/DisposableImutableList.cs rename to NadekoBot.Core/Common/Collections/DisposableImutableList.cs diff --git a/src/NadekoBot/Common/Collections/IndexedCollection.cs b/NadekoBot.Core/Common/Collections/IndexedCollection.cs similarity index 100% rename from src/NadekoBot/Common/Collections/IndexedCollection.cs rename to NadekoBot.Core/Common/Collections/IndexedCollection.cs diff --git a/src/NadekoBot/Common/Collections/PoopyRingBuffer.cs b/NadekoBot.Core/Common/Collections/PoopyRingBuffer.cs similarity index 100% rename from src/NadekoBot/Common/Collections/PoopyRingBuffer.cs rename to NadekoBot.Core/Common/Collections/PoopyRingBuffer.cs diff --git a/src/NadekoBot/Common/CommandData.cs b/NadekoBot.Core/Common/CommandData.cs similarity index 100% rename from src/NadekoBot/Common/CommandData.cs rename to NadekoBot.Core/Common/CommandData.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IEarlyBlocker.cs b/NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlocker.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IEarlyBlocker.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlocker.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IEarlyExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/IEarlyExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IEarlyExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IEarlyExecutor.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IINputTransformer.cs b/NadekoBot.Core/Common/ModuleBehaviors/IINputTransformer.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IINputTransformer.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IINputTransformer.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/ILateBlocker.cs b/NadekoBot.Core/Common/ModuleBehaviors/ILateBlocker.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/ILateBlocker.cs rename to NadekoBot.Core/Common/ModuleBehaviors/ILateBlocker.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/ILateBlockingExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/ILateBlockingExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/ILateBlockingExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/ILateBlockingExecutor.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/ILateExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/ILateExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/ILateExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/ILateExecutor.cs diff --git a/src/NadekoBot/Modules/NadekoModule.cs b/NadekoBot.Core/Common/NadekoModule.cs similarity index 100% rename from src/NadekoBot/Modules/NadekoModule.cs rename to NadekoBot.Core/Common/NadekoModule.cs diff --git a/src/NadekoBot/Modules/NadekoModuleExtensions.cs b/NadekoBot.Core/Common/NadekoModuleExtensions.cs similarity index 100% rename from src/NadekoBot/Modules/NadekoModuleExtensions.cs rename to NadekoBot.Core/Common/NadekoModuleExtensions.cs diff --git a/src/NadekoBot/Common/NadekoRandom.cs b/NadekoBot.Core/Common/NadekoRandom.cs similarity index 100% rename from src/NadekoBot/Common/NadekoRandom.cs rename to NadekoBot.Core/Common/NadekoRandom.cs diff --git a/src/NadekoBot/Common/NoPublicBotPrecondition.cs b/NadekoBot.Core/Common/NoPublicBotPrecondition.cs similarity index 100% rename from src/NadekoBot/Common/NoPublicBotPrecondition.cs rename to NadekoBot.Core/Common/NoPublicBotPrecondition.cs diff --git a/src/NadekoBot/Common/PlatformHelper.cs b/NadekoBot.Core/Common/PlatformHelper.cs similarity index 100% rename from src/NadekoBot/Common/PlatformHelper.cs rename to NadekoBot.Core/Common/PlatformHelper.cs diff --git a/src/NadekoBot/Common/Replacements/ReplacementBuilder.cs b/NadekoBot.Core/Common/Replacements/ReplacementBuilder.cs similarity index 73% rename from src/NadekoBot/Common/Replacements/ReplacementBuilder.cs rename to NadekoBot.Core/Common/Replacements/ReplacementBuilder.cs index 4df63980..1d59d5b6 100644 --- a/src/NadekoBot/Common/Replacements/ReplacementBuilder.cs +++ b/NadekoBot.Core/Common/Replacements/ReplacementBuilder.cs @@ -6,8 +6,6 @@ using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Modules.Administration.Services; -using NadekoBot.Modules.Music.Services; namespace NadekoBot.Common.Replacements { @@ -46,19 +44,19 @@ namespace NadekoBot.Common.Replacements _reps.TryAdd("%sid%", () => g == null ? "DM" : g.Id.ToString()); _reps.TryAdd("%server%", () => g == null ? "DM" : g.Name); - _reps.TryAdd("%server_time%", () => - { - TimeZoneInfo to = TimeZoneInfo.Local; - if (g != null) - { - if (GuildTimezoneService.AllServices.TryGetValue(client.CurrentUser.Id, out var tz)) - to = tz.GetTimeZoneOrDefault(g.Id) ?? TimeZoneInfo.Local; - } + //_reps.TryAdd("%server_time%", () => + //{ + // TimeZoneInfo to = TimeZoneInfo.Local; + // if (g != null) + // { + // if (GuildTimezoneService.AllServices.TryGetValue(client.CurrentUser.Id, out var tz)) + // to = tz.GetTimeZoneOrDefault(g.Id) ?? TimeZoneInfo.Local; + // } - return TimeZoneInfo.ConvertTime(DateTime.UtcNow, - TimeZoneInfo.Utc, - to).ToString("HH:mm ") + to.StandardName.GetInitials(); - }); + // return TimeZoneInfo.ConvertTime(DateTime.UtcNow, + // TimeZoneInfo.Utc, + // to).ToString("HH:mm ") + to.StandardName.GetInitials(); + //}); return this; } @@ -88,26 +86,26 @@ namespace NadekoBot.Common.Replacements return this; } - public ReplacementBuilder WithMusic(MusicService ms) - { - _reps.TryAdd("%playing%", () => - { - var cnt = ms.MusicPlayers.Count(kvp => kvp.Value.Current.Current != null); - if (cnt != 1) return cnt.ToString(); - try - { - var mp = ms.MusicPlayers.FirstOrDefault(); - var title = mp.Value?.Current.Current?.Title; - return title ?? "No songs"; - } - catch - { - return "error"; - } - }); - _reps.TryAdd("%queued%", () => ms.MusicPlayers.Sum(kvp => kvp.Value.QueueArray().Songs.Length).ToString()); - return this; - } + //public ReplacementBuilder WithMusic(MusicService ms) + //{ + // _reps.TryAdd("%playing%", () => + // { + // var cnt = ms.MusicPlayers.Count(kvp => kvp.Value.Current.Current != null); + // if (cnt != 1) return cnt.ToString(); + // try + // { + // var mp = ms.MusicPlayers.FirstOrDefault(); + // var title = mp.Value?.Current.Current?.Title; + // return title ?? "No songs"; + // } + // catch + // { + // return "error"; + // } + // }); + // _reps.TryAdd("%queued%", () => ms.MusicPlayers.Sum(kvp => kvp.Value.QueueArray().Songs.Length).ToString()); + // return this; + //} public ReplacementBuilder WithRngRegex() { diff --git a/src/NadekoBot/Common/Replacements/Replacer.cs b/NadekoBot.Core/Common/Replacements/Replacer.cs similarity index 100% rename from src/NadekoBot/Common/Replacements/Replacer.cs rename to NadekoBot.Core/Common/Replacements/Replacer.cs diff --git a/src/NadekoBot/Common/Shard0Precondition.cs b/NadekoBot.Core/Common/Shard0Precondition.cs similarity index 100% rename from src/NadekoBot/Common/Shard0Precondition.cs rename to NadekoBot.Core/Common/Shard0Precondition.cs diff --git a/src/NadekoBot/Common/ShardCom/IShardComMessage.cs b/NadekoBot.Core/Common/ShardCom/IShardComMessage.cs similarity index 100% rename from src/NadekoBot/Common/ShardCom/IShardComMessage.cs rename to NadekoBot.Core/Common/ShardCom/IShardComMessage.cs diff --git a/src/NadekoBot/Common/ShardCom/ShardComClient.cs b/NadekoBot.Core/Common/ShardCom/ShardComClient.cs similarity index 100% rename from src/NadekoBot/Common/ShardCom/ShardComClient.cs rename to NadekoBot.Core/Common/ShardCom/ShardComClient.cs diff --git a/src/NadekoBot/Common/ShardCom/ShardComServer.cs b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs similarity index 100% rename from src/NadekoBot/Common/ShardCom/ShardComServer.cs rename to NadekoBot.Core/Common/ShardCom/ShardComServer.cs diff --git a/src/NadekoBot/Services/Discord/SocketMessageEventWrapper.cs b/NadekoBot.Core/Common/SocketMessageEventWrapper.cs similarity index 98% rename from src/NadekoBot/Services/Discord/SocketMessageEventWrapper.cs rename to NadekoBot.Core/Common/SocketMessageEventWrapper.cs index 3c3aabf9..05e94025 100644 --- a/src/NadekoBot/Services/Discord/SocketMessageEventWrapper.cs +++ b/NadekoBot.Core/Common/SocketMessageEventWrapper.cs @@ -3,7 +3,7 @@ using Discord.WebSocket; using System; using System.Threading.Tasks; -namespace NadekoBot.Services.Discord +namespace NadekoBot.Common { public class ReactionEventWrapper : IDisposable { diff --git a/src/NadekoBot/Common/TypeReaders/AddRemove.cs b/NadekoBot.Core/Common/TypeReaders/AddRemove.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/AddRemove.cs rename to NadekoBot.Core/Common/TypeReaders/AddRemove.cs diff --git a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs new file mode 100644 index 00000000..32ba2151 --- /dev/null +++ b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs @@ -0,0 +1,73 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Discord.Commands; +using NadekoBot.Services; + +namespace NadekoBot.Common.TypeReaders +{ + public class CommandTypeReader : TypeReader + { + public override Task Read(ICommandContext context, string input, IServiceProvider services) + { + var _cmds = ((INServiceProvider)services).GetService(); + var _cmdHandler = ((INServiceProvider)services).GetService(); + input = input.ToUpperInvariant(); + var prefix = _cmdHandler.GetPrefix(context.Guild); + if (!input.StartsWith(prefix.ToUpperInvariant())) + return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found.")); + + input = input.Substring(prefix.Length); + + var cmd = _cmds.Commands.FirstOrDefault(c => + c.Aliases.Select(a => a.ToUpperInvariant()).Contains(input)); + if (cmd == null) + return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found.")); + + return Task.FromResult(TypeReaderResult.FromSuccess(cmd)); + } + } + //todo dependency on the module + //public class CommandOrCrTypeReader : CommandTypeReader + //{ + // public override async Task Read(ICommandContext context, string input, IServiceProvider services) + // { + // input = input.ToUpperInvariant(); + + // var _crs = ((INServiceProvider)services).GetService(); + + // if (_crs.GlobalReactions.Any(x => x.Trigger.ToUpperInvariant() == input)) + // { + // return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); + // } + // var guild = context.Guild; + // if (guild != null) + // { + // if (_crs.GuildReactions.TryGetValue(guild.Id, out var crs)) + // { + // if (crs.Concat(_crs.GlobalReactions).Any(x => x.Trigger.ToUpperInvariant() == input)) + // { + // return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); + // } + // } + // } + + // var cmd = await base.Read(context, input, services); + // if (cmd.IsSuccess) + // { + // return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name)); + // } + // return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or cr found."); + // } + //} + + public class CommandOrCrInfo + { + public string Name { get; set; } + + public CommandOrCrInfo(string input) + { + this.Name = input; + } + } +} diff --git a/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs new file mode 100644 index 00000000..95a39b85 --- /dev/null +++ b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs @@ -0,0 +1,40 @@ +//using System; +//using System.Threading.Tasks; +//using Discord.Commands; +//using NadekoBot.Modules.Administration.Services; + +//namespace NadekoBot.Common.TypeReaders +//{ +// public class GuildDateTimeTypeReader : TypeReader +// { +// public override Task Read(ICommandContext context, string input, IServiceProvider services) +// { +// var _gts = (GuildTimezoneService)services.GetService(typeof(GuildTimezoneService)); +// if (!DateTime.TryParse(input, out var dt)) +// return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Input string is in an incorrect format.")); + +// var tz = _gts.GetTimeZoneOrUtc(context.Guild.Id); + +// return Task.FromResult(TypeReaderResult.FromSuccess(new GuildDateTime(tz, dt))); +// } +// } + +// public class GuildDateTime +// { +// public TimeZoneInfo Timezone { get; } +// public DateTime CurrentGuildTime { get; } +// public DateTime InputTime { get; } +// public DateTime InputTimeUtc { get; } + +// private GuildDateTime() { } + +// public GuildDateTime(TimeZoneInfo guildTimezone, DateTime inputTime) +// { +// var now = DateTime.UtcNow; +// Timezone = guildTimezone; +// CurrentGuildTime = TimeZoneInfo.ConvertTime(now, TimeZoneInfo.Utc, Timezone); +// InputTime = inputTime; +// InputTimeUtc = TimeZoneInfo.ConvertTime(inputTime, Timezone, TimeZoneInfo.Utc); +// } +// } +//} diff --git a/src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/Models/PermissionAction.cs b/NadekoBot.Core/Common/TypeReaders/Models/PermissionAction.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Models/PermissionAction.cs rename to NadekoBot.Core/Common/TypeReaders/Models/PermissionAction.cs diff --git a/src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs diff --git a/src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs diff --git a/src/NadekoBot/Migrations/20161011200458_first.Designer.cs b/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161011200458_first.Designer.cs rename to NadekoBot.Core/Migrations/20161011200458_first.Designer.cs diff --git a/src/NadekoBot/Migrations/20161011200458_first.cs b/NadekoBot.Core/Migrations/20161011200458_first.cs similarity index 100% rename from src/NadekoBot/Migrations/20161011200458_first.cs rename to NadekoBot.Core/Migrations/20161011200458_first.cs diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs rename to NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.cs similarity index 100% rename from src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs rename to NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.cs diff --git a/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs b/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161015102407_coc.Designer.cs rename to NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs diff --git a/src/NadekoBot/Migrations/20161015102407_coc.cs b/NadekoBot.Core/Migrations/20161015102407_coc.cs similarity index 100% rename from src/NadekoBot/Migrations/20161015102407_coc.cs rename to NadekoBot.Core/Migrations/20161015102407_coc.cs diff --git a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs rename to NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs diff --git a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.cs similarity index 100% rename from src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs rename to NadekoBot.Core/Migrations/20161019055137_MuteRoleName.cs diff --git a/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs rename to NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs diff --git a/src/NadekoBot/Migrations/20161107213222_Cleverbot.cs b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.cs similarity index 100% rename from src/NadekoBot/Migrations/20161107213222_Cleverbot.cs rename to NadekoBot.Core/Migrations/20161107213222_Cleverbot.cs diff --git a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs rename to NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs diff --git a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.cs similarity index 100% rename from src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs rename to NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.cs diff --git a/src/NadekoBot/Migrations/20161127233843_PokeGame.Designer.cs b/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161127233843_PokeGame.Designer.cs rename to NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs diff --git a/src/NadekoBot/Migrations/20161127233843_PokeGame.cs b/NadekoBot.Core/Migrations/20161127233843_PokeGame.cs similarity index 100% rename from src/NadekoBot/Migrations/20161127233843_PokeGame.cs rename to NadekoBot.Core/Migrations/20161127233843_PokeGame.cs diff --git a/src/NadekoBot/Migrations/20161213025624_mutedusers.Designer.cs b/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161213025624_mutedusers.Designer.cs rename to NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs diff --git a/src/NadekoBot/Migrations/20161213025624_mutedusers.cs b/NadekoBot.Core/Migrations/20161213025624_mutedusers.cs similarity index 100% rename from src/NadekoBot/Migrations/20161213025624_mutedusers.cs rename to NadekoBot.Core/Migrations/20161213025624_mutedusers.cs diff --git a/src/NadekoBot/Migrations/20161224032833_logsettings.Designer.cs b/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20161224032833_logsettings.Designer.cs rename to NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs diff --git a/src/NadekoBot/Migrations/20161224032833_logsettings.cs b/NadekoBot.Core/Migrations/20161224032833_logsettings.cs similarity index 100% rename from src/NadekoBot/Migrations/20161224032833_logsettings.cs rename to NadekoBot.Core/Migrations/20161224032833_logsettings.cs diff --git a/src/NadekoBot/Migrations/20170110111159_repeater-drop.Designer.cs b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110111159_repeater-drop.Designer.cs rename to NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs diff --git a/src/NadekoBot/Migrations/20170110111159_repeater-drop.cs b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110111159_repeater-drop.cs rename to NadekoBot.Core/Migrations/20170110111159_repeater-drop.cs diff --git a/src/NadekoBot/Migrations/20170110111302_repeater-new.Designer.cs b/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110111302_repeater-new.Designer.cs rename to NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs diff --git a/src/NadekoBot/Migrations/20170110111302_repeater-new.cs b/NadekoBot.Core/Migrations/20170110111302_repeater-new.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110111302_repeater-new.cs rename to NadekoBot.Core/Migrations/20170110111302_repeater-new.cs diff --git a/src/NadekoBot/Migrations/20170110180534_protection.Designer.cs b/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110180534_protection.Designer.cs rename to NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs diff --git a/src/NadekoBot/Migrations/20170110180534_protection.cs b/NadekoBot.Core/Migrations/20170110180534_protection.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110180534_protection.cs rename to NadekoBot.Core/Migrations/20170110180534_protection.cs diff --git a/src/NadekoBot/Migrations/20170112185538_currency-modifications.Designer.cs b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170112185538_currency-modifications.Designer.cs rename to NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs diff --git a/src/NadekoBot/Migrations/20170112185538_currency-modifications.cs b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.cs similarity index 100% rename from src/NadekoBot/Migrations/20170112185538_currency-modifications.cs rename to NadekoBot.Core/Migrations/20170112185538_currency-modifications.cs diff --git a/src/NadekoBot/Migrations/20170118202307_ok-error-colors.Designer.cs b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170118202307_ok-error-colors.Designer.cs rename to NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs diff --git a/src/NadekoBot/Migrations/20170118202307_ok-error-colors.cs b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.cs similarity index 100% rename from src/NadekoBot/Migrations/20170118202307_ok-error-colors.cs rename to NadekoBot.Core/Migrations/20170118202307_ok-error-colors.cs diff --git a/src/NadekoBot/Migrations/20170122044958_waifus.Designer.cs b/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170122044958_waifus.Designer.cs rename to NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs diff --git a/src/NadekoBot/Migrations/20170122044958_waifus.cs b/NadekoBot.Core/Migrations/20170122044958_waifus.cs similarity index 100% rename from src/NadekoBot/Migrations/20170122044958_waifus.cs rename to NadekoBot.Core/Migrations/20170122044958_waifus.cs diff --git a/src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs rename to NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs diff --git a/src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.cs b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.cs similarity index 100% rename from src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.cs rename to NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.cs diff --git a/src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs b/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs rename to NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs diff --git a/src/NadekoBot/Migrations/20170222162505_dateadded.cs b/NadekoBot.Core/Migrations/20170222162505_dateadded.cs similarity index 100% rename from src/NadekoBot/Migrations/20170222162505_dateadded.cs rename to NadekoBot.Core/Migrations/20170222162505_dateadded.cs diff --git a/src/NadekoBot/Migrations/20170308033058_permsv2.Designer.cs b/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170308033058_permsv2.Designer.cs rename to NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs diff --git a/src/NadekoBot/Migrations/20170308033058_permsv2.cs b/NadekoBot.Core/Migrations/20170308033058_permsv2.cs similarity index 100% rename from src/NadekoBot/Migrations/20170308033058_permsv2.cs rename to NadekoBot.Core/Migrations/20170308033058_permsv2.cs diff --git a/src/NadekoBot/Migrations/20170310210952_unmute-timers.Designer.cs b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170310210952_unmute-timers.Designer.cs rename to NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs diff --git a/src/NadekoBot/Migrations/20170310210952_unmute-timers.cs b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.cs similarity index 100% rename from src/NadekoBot/Migrations/20170310210952_unmute-timers.cs rename to NadekoBot.Core/Migrations/20170310210952_unmute-timers.cs diff --git a/src/NadekoBot/Migrations/20170311054632_vcrole.Designer.cs b/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170311054632_vcrole.Designer.cs rename to NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs diff --git a/src/NadekoBot/Migrations/20170311054632_vcrole.cs b/NadekoBot.Core/Migrations/20170311054632_vcrole.cs similarity index 100% rename from src/NadekoBot/Migrations/20170311054632_vcrole.cs rename to NadekoBot.Core/Migrations/20170311054632_vcrole.cs diff --git a/src/NadekoBot/Migrations/20170318190018_crad-and-crdm.Designer.cs b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170318190018_crad-and-crdm.Designer.cs rename to NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs diff --git a/src/NadekoBot/Migrations/20170318190018_crad-and-crdm.cs b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.cs similarity index 100% rename from src/NadekoBot/Migrations/20170318190018_crad-and-crdm.cs rename to NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.cs diff --git a/src/NadekoBot/Migrations/20170320090138_command-aliasing.Designer.cs b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170320090138_command-aliasing.Designer.cs rename to NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs diff --git a/src/NadekoBot/Migrations/20170320090138_command-aliasing.cs b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.cs similarity index 100% rename from src/NadekoBot/Migrations/20170320090138_command-aliasing.cs rename to NadekoBot.Core/Migrations/20170320090138_command-aliasing.cs diff --git a/src/NadekoBot/Migrations/20170330000613_warning-commands.Designer.cs b/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170330000613_warning-commands.Designer.cs rename to NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs diff --git a/src/NadekoBot/Migrations/20170330000613_warning-commands.cs b/NadekoBot.Core/Migrations/20170330000613_warning-commands.cs similarity index 100% rename from src/NadekoBot/Migrations/20170330000613_warning-commands.cs rename to NadekoBot.Core/Migrations/20170330000613_warning-commands.cs diff --git a/src/NadekoBot/Migrations/20170331093025_startup-commands.Designer.cs b/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170331093025_startup-commands.Designer.cs rename to NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs diff --git a/src/NadekoBot/Migrations/20170331093025_startup-commands.cs b/NadekoBot.Core/Migrations/20170331093025_startup-commands.cs similarity index 100% rename from src/NadekoBot/Migrations/20170331093025_startup-commands.cs rename to NadekoBot.Core/Migrations/20170331093025_startup-commands.cs diff --git a/src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.Designer.cs b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.Designer.cs rename to NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs diff --git a/src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.cs b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.cs similarity index 100% rename from src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.cs rename to NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.cs diff --git a/src/NadekoBot/Migrations/20170401205753_patreon-rewards.Designer.cs b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170401205753_patreon-rewards.Designer.cs rename to NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs diff --git a/src/NadekoBot/Migrations/20170401205753_patreon-rewards.cs b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.cs similarity index 100% rename from src/NadekoBot/Migrations/20170401205753_patreon-rewards.cs rename to NadekoBot.Core/Migrations/20170401205753_patreon-rewards.cs diff --git a/src/NadekoBot/Migrations/20170405161814_flower-shop.Designer.cs b/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170405161814_flower-shop.Designer.cs rename to NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs diff --git a/src/NadekoBot/Migrations/20170405161814_flower-shop.cs b/NadekoBot.Core/Migrations/20170405161814_flower-shop.cs similarity index 100% rename from src/NadekoBot/Migrations/20170405161814_flower-shop.cs rename to NadekoBot.Core/Migrations/20170405161814_flower-shop.cs diff --git a/src/NadekoBot/Migrations/20170408162851_game-voice-channel.Designer.cs b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170408162851_game-voice-channel.Designer.cs rename to NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs diff --git a/src/NadekoBot/Migrations/20170408162851_game-voice-channel.cs b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.cs similarity index 100% rename from src/NadekoBot/Migrations/20170408162851_game-voice-channel.cs rename to NadekoBot.Core/Migrations/20170408162851_game-voice-channel.cs diff --git a/src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.Designer.cs b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.Designer.cs rename to NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs diff --git a/src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.cs b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.cs similarity index 100% rename from src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.cs rename to NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.cs diff --git a/src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs b/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs rename to NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs diff --git a/src/NadekoBot/Migrations/20170501103455_patreon-id.cs b/NadekoBot.Core/Migrations/20170501103455_patreon-id.cs similarity index 100% rename from src/NadekoBot/Migrations/20170501103455_patreon-id.cs rename to NadekoBot.Core/Migrations/20170501103455_patreon-id.cs diff --git a/src/NadekoBot/Migrations/20170528001839_permissions-version.Designer.cs b/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170528001839_permissions-version.Designer.cs rename to NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs diff --git a/src/NadekoBot/Migrations/20170528001839_permissions-version.cs b/NadekoBot.Core/Migrations/20170528001839_permissions-version.cs similarity index 100% rename from src/NadekoBot/Migrations/20170528001839_permissions-version.cs rename to NadekoBot.Core/Migrations/20170528001839_permissions-version.cs diff --git a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.Designer.cs b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170530033406_guild-prefixes.Designer.cs rename to NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs diff --git a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.cs similarity index 100% rename from src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs rename to NadekoBot.Core/Migrations/20170530033406_guild-prefixes.cs diff --git a/src/NadekoBot/Migrations/20170612094138_verbose-errors.Designer.cs b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170612094138_verbose-errors.Designer.cs rename to NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs diff --git a/src/NadekoBot/Migrations/20170612094138_verbose-errors.cs b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.cs similarity index 100% rename from src/NadekoBot/Migrations/20170612094138_verbose-errors.cs rename to NadekoBot.Core/Migrations/20170612094138_verbose-errors.cs diff --git a/src/NadekoBot/Migrations/20170612234751_repeat time of day.Designer.cs b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170612234751_repeat time of day.Designer.cs rename to NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs diff --git a/src/NadekoBot/Migrations/20170612234751_repeat time of day.cs b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.cs similarity index 100% rename from src/NadekoBot/Migrations/20170612234751_repeat time of day.cs rename to NadekoBot.Core/Migrations/20170612234751_repeat time of day.cs diff --git a/src/NadekoBot/Migrations/20170613231358_maxdropamount.Designer.cs b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170613231358_maxdropamount.Designer.cs rename to NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs diff --git a/src/NadekoBot/Migrations/20170613231358_maxdropamount.cs b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.cs similarity index 100% rename from src/NadekoBot/Migrations/20170613231358_maxdropamount.cs rename to NadekoBot.Core/Migrations/20170613231358_maxdropamount.cs diff --git a/src/NadekoBot/Migrations/20170616154106_crstartswith.Designer.cs b/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170616154106_crstartswith.Designer.cs rename to NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs diff --git a/src/NadekoBot/Migrations/20170616154106_crstartswith.cs b/NadekoBot.Core/Migrations/20170616154106_crstartswith.cs similarity index 100% rename from src/NadekoBot/Migrations/20170616154106_crstartswith.cs rename to NadekoBot.Core/Migrations/20170616154106_crstartswith.cs diff --git a/src/NadekoBot/Migrations/20170714021615_stream-role.Designer.cs b/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170714021615_stream-role.Designer.cs rename to NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs diff --git a/src/NadekoBot/Migrations/20170714021615_stream-role.cs b/NadekoBot.Core/Migrations/20170714021615_stream-role.cs similarity index 100% rename from src/NadekoBot/Migrations/20170714021615_stream-role.cs rename to NadekoBot.Core/Migrations/20170714021615_stream-role.cs diff --git a/src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs rename to NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs diff --git a/src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.cs b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.cs similarity index 100% rename from src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.cs rename to NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.cs diff --git a/src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.Designer.cs b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.Designer.cs rename to NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs diff --git a/src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.cs b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.cs similarity index 100% rename from src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.cs rename to NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.cs diff --git a/src/NadekoBot/Migrations/20170722074959_cr-ca.Designer.cs b/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170722074959_cr-ca.Designer.cs rename to NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs diff --git a/src/NadekoBot/Migrations/20170722074959_cr-ca.cs b/NadekoBot.Core/Migrations/20170722074959_cr-ca.cs similarity index 100% rename from src/NadekoBot/Migrations/20170722074959_cr-ca.cs rename to NadekoBot.Core/Migrations/20170722074959_cr-ca.cs diff --git a/src/NadekoBot/Migrations/20170814044636_waifu-items.Designer.cs b/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170814044636_waifu-items.Designer.cs rename to NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs diff --git a/src/NadekoBot/Migrations/20170814044636_waifu-items.cs b/NadekoBot.Core/Migrations/20170814044636_waifu-items.cs similarity index 100% rename from src/NadekoBot/Migrations/20170814044636_waifu-items.cs rename to NadekoBot.Core/Migrations/20170814044636_waifu-items.cs diff --git a/src/NadekoBot/Migrations/20170815222316_mute-time-antispam.Designer.cs b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170815222316_mute-time-antispam.Designer.cs rename to NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs diff --git a/src/NadekoBot/Migrations/20170815222316_mute-time-antispam.cs b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.cs similarity index 100% rename from src/NadekoBot/Migrations/20170815222316_mute-time-antispam.cs rename to NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.cs diff --git a/src/NadekoBot/Migrations/20170908230730_xp-and-clubs.Designer.cs b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170908230730_xp-and-clubs.Designer.cs rename to NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs diff --git a/src/NadekoBot/Migrations/20170908230730_xp-and-clubs.cs b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.cs similarity index 100% rename from src/NadekoBot/Migrations/20170908230730_xp-and-clubs.cs rename to NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.cs diff --git a/src/NadekoBot/Migrations/20170911200031_lastXpGain.Designer.cs b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170911200031_lastXpGain.Designer.cs rename to NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs diff --git a/src/NadekoBot/Migrations/20170911200031_lastXpGain.cs b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.cs similarity index 100% rename from src/NadekoBot/Migrations/20170911200031_lastXpGain.cs rename to NadekoBot.Core/Migrations/20170911200031_lastXpGain.cs diff --git a/src/NadekoBot/Migrations/20170913022654_total-xp.Designer.cs b/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170913022654_total-xp.Designer.cs rename to NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs diff --git a/src/NadekoBot/Migrations/20170913022654_total-xp.cs b/NadekoBot.Core/Migrations/20170913022654_total-xp.cs similarity index 100% rename from src/NadekoBot/Migrations/20170913022654_total-xp.cs rename to NadekoBot.Core/Migrations/20170913022654_total-xp.cs diff --git a/src/NadekoBot/Migrations/20170915034808_club-admins.Designer.cs b/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170915034808_club-admins.Designer.cs rename to NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs diff --git a/src/NadekoBot/Migrations/20170915034808_club-admins.cs b/NadekoBot.Core/Migrations/20170915034808_club-admins.cs similarity index 100% rename from src/NadekoBot/Migrations/20170915034808_club-admins.cs rename to NadekoBot.Core/Migrations/20170915034808_club-admins.cs diff --git a/src/NadekoBot/Migrations/20170921185313_feeds.Designer.cs b/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170921185313_feeds.Designer.cs rename to NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs diff --git a/src/NadekoBot/Migrations/20170921185313_feeds.cs b/NadekoBot.Core/Migrations/20170921185313_feeds.cs similarity index 100% rename from src/NadekoBot/Migrations/20170921185313_feeds.cs rename to NadekoBot.Core/Migrations/20170921185313_feeds.cs diff --git a/src/NadekoBot/Migrations/20170923002439_xprr-fix.Designer.cs b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs similarity index 100% rename from src/NadekoBot/Migrations/20170923002439_xprr-fix.Designer.cs rename to NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs diff --git a/src/NadekoBot/Migrations/20170923002439_xprr-fix.cs b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.cs similarity index 100% rename from src/NadekoBot/Migrations/20170923002439_xprr-fix.cs rename to NadekoBot.Core/Migrations/20170923002439_xprr-fix.cs diff --git a/src/NadekoBot/Migrations/MigrationQueries.cs b/NadekoBot.Core/Migrations/MigrationQueries.cs similarity index 100% rename from src/NadekoBot/Migrations/MigrationQueries.cs rename to NadekoBot.Core/Migrations/MigrationQueries.cs diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs similarity index 100% rename from src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs rename to NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/NadekoBot.Core/Modules/Administration/Administration.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Administration.cs rename to NadekoBot.Core/Modules/Administration/Administration.cs diff --git a/src/NadekoBot/Modules/Administration/AutoAssignRoleCommands.cs b/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/AutoAssignRoleCommands.cs rename to NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs diff --git a/src/NadekoBot/Modules/Administration/Common/Migration/0_9..cs b/NadekoBot.Core/Modules/Administration/Common/Migration/0_9..cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/Migration/0_9..cs rename to NadekoBot.Core/Modules/Administration/Common/Migration/0_9..cs diff --git a/src/NadekoBot/Modules/Administration/Common/Migration/MigrationException.cs b/NadekoBot.Core/Modules/Administration/Common/Migration/MigrationException.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/Migration/MigrationException.cs rename to NadekoBot.Core/Modules/Administration/Common/Migration/MigrationException.cs diff --git a/src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs b/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs rename to NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs diff --git a/src/NadekoBot/Modules/Administration/Common/Ratelimiter.cs b/NadekoBot.Core/Modules/Administration/Common/Ratelimiter.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/Ratelimiter.cs rename to NadekoBot.Core/Modules/Administration/Common/Ratelimiter.cs diff --git a/src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs b/NadekoBot.Core/Modules/Administration/Common/UserSpamStats.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs rename to NadekoBot.Core/Modules/Administration/Common/UserSpamStats.cs diff --git a/src/NadekoBot/Modules/Administration/GameChannelCommands.cs b/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/GameChannelCommands.cs rename to NadekoBot.Core/Modules/Administration/GameChannelCommands.cs diff --git a/src/NadekoBot/Modules/Administration/LocalizationCommands.cs b/NadekoBot.Core/Modules/Administration/LocalizationCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/LocalizationCommands.cs rename to NadekoBot.Core/Modules/Administration/LocalizationCommands.cs diff --git a/src/NadekoBot/Modules/Administration/LogCommands.cs b/NadekoBot.Core/Modules/Administration/LogCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/LogCommands.cs rename to NadekoBot.Core/Modules/Administration/LogCommands.cs diff --git a/src/NadekoBot/Modules/Administration/MigrationCommands.cs b/NadekoBot.Core/Modules/Administration/MigrationCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/MigrationCommands.cs rename to NadekoBot.Core/Modules/Administration/MigrationCommands.cs diff --git a/src/NadekoBot/Modules/Administration/MuteCommands.cs b/NadekoBot.Core/Modules/Administration/MuteCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/MuteCommands.cs rename to NadekoBot.Core/Modules/Administration/MuteCommands.cs diff --git a/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs b/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs rename to NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs diff --git a/src/NadekoBot/Modules/Administration/PrefixCommands.cs b/NadekoBot.Core/Modules/Administration/PrefixCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/PrefixCommands.cs rename to NadekoBot.Core/Modules/Administration/PrefixCommands.cs diff --git a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs b/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/ProtectionCommands.cs rename to NadekoBot.Core/Modules/Administration/ProtectionCommands.cs diff --git a/src/NadekoBot/Modules/Administration/PruneCommands.cs b/NadekoBot.Core/Modules/Administration/PruneCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/PruneCommands.cs rename to NadekoBot.Core/Modules/Administration/PruneCommands.cs diff --git a/src/NadekoBot/Modules/Administration/RatelimitCommands.cs b/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/RatelimitCommands.cs rename to NadekoBot.Core/Modules/Administration/RatelimitCommands.cs diff --git a/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs b/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs rename to NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs diff --git a/src/NadekoBot/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/SelfCommands.cs rename to NadekoBot.Core/Modules/Administration/SelfCommands.cs index 344b8379..65729695 100644 --- a/src/NadekoBot/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -14,7 +14,6 @@ using Microsoft.EntityFrameworkCore; using System.Diagnostics; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Administration.Services; -using NadekoBot.Modules.Music.Services; namespace NadekoBot.Modules.Administration { @@ -28,19 +27,17 @@ namespace NadekoBot.Modules.Administration private static readonly object _locker = new object(); private readonly DiscordSocketClient _client; private readonly IImagesService _images; - private readonly MusicService _music; private readonly IBotConfigProvider _bc; private readonly NadekoBot _bot; private readonly IBotCredentials _creds; public SelfCommands(DbService db, NadekoBot bot, DiscordSocketClient client, - MusicService music, IImagesService images, IBotConfigProvider bc, + IImagesService images, IBotConfigProvider bc, IBotCredentials creds) { _db = db; _client = client; _images = images; - _music = music; _bc = bc; _bot = bot; _creds = creds; @@ -279,7 +276,6 @@ namespace NadekoBot.Modules.Administration // ignored } await Task.Delay(2000).ConfigureAwait(false); - try { await _music.DestroyAllPlayers().ConfigureAwait(false); } catch { } Environment.Exit(0); } diff --git a/src/NadekoBot/Modules/Administration/ServerGreetCommands.cs b/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/ServerGreetCommands.cs rename to NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs diff --git a/src/NadekoBot/Modules/Administration/Services/AdministrationService.cs b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/AdministrationService.cs rename to NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/AutoAssignRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/AutoAssignRoleService.cs rename to NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/GameVoiceChannelService.cs b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/GameVoiceChannelService.cs rename to NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/GuildTimezoneService.cs b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/GuildTimezoneService.cs rename to NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/LogCommandService.cs rename to NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/MuteService.cs b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/MuteService.cs rename to NadekoBot.Core/Modules/Administration/Services/MuteService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/PlayingRotateService.cs b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs similarity index 90% rename from src/NadekoBot/Modules/Administration/Services/PlayingRotateService.cs rename to NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs index d0cd5eef..65956372 100644 --- a/src/NadekoBot/Modules/Administration/Services/PlayingRotateService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs @@ -3,11 +3,9 @@ using System.Linq; using System.Threading; using Discord.WebSocket; using NadekoBot.Common.Replacements; -using NadekoBot.Modules.Music.Services; using NadekoBot.Services; using NadekoBot.Services.Database.Models; using NLog; -using System.Threading.Tasks; namespace NadekoBot.Modules.Administration.Services { @@ -15,7 +13,6 @@ namespace NadekoBot.Modules.Administration.Services { private readonly Timer _t; private readonly DiscordSocketClient _client; - private readonly MusicService _music; private readonly Logger _log; private readonly IDataCache _cache; private readonly Replacer _rep; @@ -29,12 +26,11 @@ namespace NadekoBot.Modules.Administration.Services public int Index { get; set; } } - public PlayingRotateService(DiscordSocketClient client, IBotConfigProvider bcp, - MusicService music, DbService db, IDataCache cache, NadekoBot bot) + public PlayingRotateService(DiscordSocketClient client, IBotConfigProvider bcp, + DbService db, IDataCache cache, NadekoBot bot) { _client = client; _bcp = bcp; - _music = music; _db = db; _log = LogManager.GetCurrentClassLogger(); _cache = cache; @@ -45,7 +41,8 @@ namespace NadekoBot.Modules.Administration.Services _rep = new ReplacementBuilder() .WithClient(client) .WithStats(client) - .WithMusic(music) + //todo type readers + //.WithMusic(music) .Build(); _t = new Timer(async (objState) => diff --git a/src/NadekoBot/Modules/Administration/Services/ProtectionService.cs b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/ProtectionService.cs rename to NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/PruneService.cs b/NadekoBot.Core/Modules/Administration/Services/PruneService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/PruneService.cs rename to NadekoBot.Core/Modules/Administration/Services/PruneService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/RatelimitService.cs b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/RatelimitService.cs rename to NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/SelfService.cs b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/SelfService.cs rename to NadekoBot.Core/Modules/Administration/Services/SelfService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/UserPunishService.cs b/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/UserPunishService.cs rename to NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/VcRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/VcRoleService.cs rename to NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs diff --git a/src/NadekoBot/Modules/Administration/Services/VplusTService.cs b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Services/VplusTService.cs rename to NadekoBot.Core/Modules/Administration/Services/VplusTService.cs diff --git a/src/NadekoBot/Modules/Administration/TimeZoneCommands.cs b/NadekoBot.Core/Modules/Administration/TimeZoneCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/TimeZoneCommands.cs rename to NadekoBot.Core/Modules/Administration/TimeZoneCommands.cs diff --git a/src/NadekoBot/Modules/Administration/UserPunishCommands.cs b/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/UserPunishCommands.cs rename to NadekoBot.Core/Modules/Administration/UserPunishCommands.cs diff --git a/src/NadekoBot/Modules/Administration/VcRoleCommands.cs b/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/VcRoleCommands.cs rename to NadekoBot.Core/Modules/Administration/VcRoleCommands.cs diff --git a/src/NadekoBot/Modules/Administration/VoicePlusTextCommands.cs b/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/VoicePlusTextCommands.cs rename to NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs diff --git a/src/NadekoBot/Modules/Help/Help.cs b/NadekoBot.Core/Modules/Help/Help.cs similarity index 100% rename from src/NadekoBot/Modules/Help/Help.cs rename to NadekoBot.Core/Modules/Help/Help.cs diff --git a/src/NadekoBot/Modules/Help/Services/HelpService.cs b/NadekoBot.Core/Modules/Help/Services/HelpService.cs similarity index 100% rename from src/NadekoBot/Modules/Help/Services/HelpService.cs rename to NadekoBot.Core/Modules/Help/Services/HelpService.cs diff --git a/src/NadekoBot/Modules/Permissions/BlacklistCommands.cs b/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs similarity index 78% rename from src/NadekoBot/Modules/Permissions/BlacklistCommands.cs rename to NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs index 377631e0..78cb57ec 100644 --- a/src/NadekoBot/Modules/Permissions/BlacklistCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs @@ -2,11 +2,9 @@ using Discord.Commands; using NadekoBot.Services; using NadekoBot.Services.Database.Models; -using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; -using NadekoBot.Modules.Games.Common.Trivia; using NadekoBot.Modules.Permissions.Services; using NadekoBot.Common.TypeReaders; @@ -99,31 +97,6 @@ namespace NadekoBot.Modules.Permissions } await uow.CompleteAsync().ConfigureAwait(false); } - if (action == AddRemove.Add) - { - TriviaGame tg; - switch (type) - { - case BlacklistType.Server: - Games.Games.TriviaCommands.RunningTrivias.TryRemove(id, out tg); - if (tg != null) - { - await tg.StopGame().ConfigureAwait(false); - } - break; - case BlacklistType.Channel: - var item = Games.Games.TriviaCommands.RunningTrivias.FirstOrDefault(kvp => kvp.Value.Channel.Id == id); - Games.Games.TriviaCommands.RunningTrivias.TryRemove(item.Key, out tg); - if (tg != null) - { - await tg.StopGame().ConfigureAwait(false); - } - break; - case BlacklistType.User: - break; - } - - } if(action == AddRemove.Add) await ReplyConfirmLocalized("blacklisted", Format.Code(type.ToString()), Format.Code(id.ToString())).ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Permissions/CmdCdsCommands.cs b/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/CmdCdsCommands.cs rename to NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/CommandCostCommands.cs b/NadekoBot.Core/Modules/Permissions/CommandCostCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/CommandCostCommands.cs rename to NadekoBot.Core/Modules/Permissions/CommandCostCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/Common/PermissionCache.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Common/PermissionCache.cs rename to NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs diff --git a/src/NadekoBot/Modules/Permissions/Common/PermissionExtensions.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Common/PermissionExtensions.cs rename to NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs diff --git a/src/NadekoBot/Modules/Permissions/Common/PermissionsCollection.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Common/PermissionsCollection.cs rename to NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs diff --git a/src/NadekoBot/Modules/Permissions/FilterCommands.cs b/NadekoBot.Core/Modules/Permissions/FilterCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/FilterCommands.cs rename to NadekoBot.Core/Modules/Permissions/FilterCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/GlobalPermissionCommands.cs b/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/GlobalPermissionCommands.cs rename to NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/NadekoBot.Core/Modules/Permissions/Permissions.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Permissions.cs rename to NadekoBot.Core/Modules/Permissions/Permissions.cs diff --git a/src/NadekoBot/Modules/Permissions/ResetPermissionsCommands.cs b/NadekoBot.Core/Modules/Permissions/ResetPermissionsCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/ResetPermissionsCommands.cs rename to NadekoBot.Core/Modules/Permissions/ResetPermissionsCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/BlacklistService.cs b/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Services/BlacklistService.cs rename to NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/CmdCdService.cs b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Services/CmdCdService.cs rename to NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/FilterService.cs b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Services/FilterService.cs rename to NadekoBot.Core/Modules/Permissions/Services/FilterService.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/GlobalPermissionService.cs b/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Services/GlobalPermissionService.cs rename to NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs b/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs rename to NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/ResetPermissionsService.cs b/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/Services/ResetPermissionsService.cs rename to NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs diff --git a/NadekoBot.Core/NadekoBot.Core.csproj b/NadekoBot.Core/NadekoBot.Core.csproj new file mode 100644 index 00000000..209c92c0 --- /dev/null +++ b/NadekoBot.Core/NadekoBot.Core.csproj @@ -0,0 +1,38 @@ + + + + netcoreapp2.0 + + + + latest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/NadekoBot/Services/CommandHandler.cs b/NadekoBot.Core/Services/CommandHandler.cs similarity index 100% rename from src/NadekoBot/Services/CommandHandler.cs rename to NadekoBot.Core/Services/CommandHandler.cs diff --git a/src/NadekoBot/Services/CurrencyService.cs b/NadekoBot.Core/Services/CurrencyService.cs similarity index 100% rename from src/NadekoBot/Services/CurrencyService.cs rename to NadekoBot.Core/Services/CurrencyService.cs diff --git a/src/NadekoBot/Services/Database/IUnitOfWork.cs b/NadekoBot.Core/Services/Database/IUnitOfWork.cs similarity index 100% rename from src/NadekoBot/Services/Database/IUnitOfWork.cs rename to NadekoBot.Core/Services/Database/IUnitOfWork.cs diff --git a/src/NadekoBot/Services/Database/Models/AntiProtection.cs b/NadekoBot.Core/Services/Database/Models/AntiProtection.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/AntiProtection.cs rename to NadekoBot.Core/Services/Database/Models/AntiProtection.cs diff --git a/src/NadekoBot/Services/Database/Models/BotConfig.cs b/NadekoBot.Core/Services/Database/Models/BotConfig.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/BotConfig.cs rename to NadekoBot.Core/Services/Database/Models/BotConfig.cs diff --git a/src/NadekoBot/Services/Database/Models/ClashCaller.cs b/NadekoBot.Core/Services/Database/Models/ClashCaller.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/ClashCaller.cs rename to NadekoBot.Core/Services/Database/Models/ClashCaller.cs diff --git a/src/NadekoBot/Services/Database/Models/ClashWar.cs b/NadekoBot.Core/Services/Database/Models/ClashWar.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/ClashWar.cs rename to NadekoBot.Core/Services/Database/Models/ClashWar.cs diff --git a/src/NadekoBot/Services/Database/Models/ClubInfo.cs b/NadekoBot.Core/Services/Database/Models/ClubInfo.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/ClubInfo.cs rename to NadekoBot.Core/Services/Database/Models/ClubInfo.cs diff --git a/src/NadekoBot/Services/Database/Models/CommandCooldown.cs b/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/CommandCooldown.cs rename to NadekoBot.Core/Services/Database/Models/CommandCooldown.cs diff --git a/src/NadekoBot/Services/Database/Models/CommandCost.cs b/NadekoBot.Core/Services/Database/Models/CommandCost.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/CommandCost.cs rename to NadekoBot.Core/Services/Database/Models/CommandCost.cs diff --git a/src/NadekoBot/Services/Database/Models/CommandPrice.cs b/NadekoBot.Core/Services/Database/Models/CommandPrice.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/CommandPrice.cs rename to NadekoBot.Core/Services/Database/Models/CommandPrice.cs diff --git a/src/NadekoBot/Services/Database/Models/ConvertUnit.cs b/NadekoBot.Core/Services/Database/Models/ConvertUnit.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/ConvertUnit.cs rename to NadekoBot.Core/Services/Database/Models/ConvertUnit.cs diff --git a/src/NadekoBot/Services/Database/Models/Currency.cs b/NadekoBot.Core/Services/Database/Models/Currency.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Currency.cs rename to NadekoBot.Core/Services/Database/Models/Currency.cs diff --git a/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs b/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs rename to NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs diff --git a/src/NadekoBot/Services/Database/Models/CustomReaction.cs b/NadekoBot.Core/Services/Database/Models/CustomReaction.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/CustomReaction.cs rename to NadekoBot.Core/Services/Database/Models/CustomReaction.cs diff --git a/src/NadekoBot/Services/Database/Models/DbEntity.cs b/NadekoBot.Core/Services/Database/Models/DbEntity.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/DbEntity.cs rename to NadekoBot.Core/Services/Database/Models/DbEntity.cs diff --git a/src/NadekoBot/Services/Database/Models/DiscordUser.cs b/NadekoBot.Core/Services/Database/Models/DiscordUser.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/DiscordUser.cs rename to NadekoBot.Core/Services/Database/Models/DiscordUser.cs diff --git a/src/NadekoBot/Services/Database/Models/Donator.cs b/NadekoBot.Core/Services/Database/Models/Donator.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Donator.cs rename to NadekoBot.Core/Services/Database/Models/Donator.cs diff --git a/src/NadekoBot/Services/Database/Models/FeedSub.cs b/NadekoBot.Core/Services/Database/Models/FeedSub.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/FeedSub.cs rename to NadekoBot.Core/Services/Database/Models/FeedSub.cs diff --git a/src/NadekoBot/Services/Database/Models/FollowedStream.cs b/NadekoBot.Core/Services/Database/Models/FollowedStream.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/FollowedStream.cs rename to NadekoBot.Core/Services/Database/Models/FollowedStream.cs diff --git a/src/NadekoBot/Services/Database/Models/GuildConfig.cs b/NadekoBot.Core/Services/Database/Models/GuildConfig.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/GuildConfig.cs rename to NadekoBot.Core/Services/Database/Models/GuildConfig.cs diff --git a/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs b/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs rename to NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs diff --git a/src/NadekoBot/Services/Database/Models/LogSetting.cs b/NadekoBot.Core/Services/Database/Models/LogSetting.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/LogSetting.cs rename to NadekoBot.Core/Services/Database/Models/LogSetting.cs diff --git a/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs b/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/MusicPlaylist.cs rename to NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs diff --git a/src/NadekoBot/Services/Database/Models/Permission.cs b/NadekoBot.Core/Services/Database/Models/Permission.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Permission.cs rename to NadekoBot.Core/Services/Database/Models/Permission.cs diff --git a/src/NadekoBot/Services/Database/Models/PlaylistSong.cs b/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/PlaylistSong.cs rename to NadekoBot.Core/Services/Database/Models/PlaylistSong.cs diff --git a/src/NadekoBot/Services/Database/Models/PokeType.cs b/NadekoBot.Core/Services/Database/Models/PokeType.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/PokeType.cs rename to NadekoBot.Core/Services/Database/Models/PokeType.cs diff --git a/src/NadekoBot/Services/Database/Models/Quote.cs b/NadekoBot.Core/Services/Database/Models/Quote.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Quote.cs rename to NadekoBot.Core/Services/Database/Models/Quote.cs diff --git a/src/NadekoBot/Services/Database/Models/Reminder.cs b/NadekoBot.Core/Services/Database/Models/Reminder.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Reminder.cs rename to NadekoBot.Core/Services/Database/Models/Reminder.cs diff --git a/src/NadekoBot/Services/Database/Models/Repeater.cs b/NadekoBot.Core/Services/Database/Models/Repeater.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Repeater.cs rename to NadekoBot.Core/Services/Database/Models/Repeater.cs diff --git a/src/NadekoBot/Services/Database/Models/RewardedUser.cs b/NadekoBot.Core/Services/Database/Models/RewardedUser.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/RewardedUser.cs rename to NadekoBot.Core/Services/Database/Models/RewardedUser.cs diff --git a/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs b/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs rename to NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs diff --git a/src/NadekoBot/Services/Database/Models/ShopEntry.cs b/NadekoBot.Core/Services/Database/Models/ShopEntry.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/ShopEntry.cs rename to NadekoBot.Core/Services/Database/Models/ShopEntry.cs diff --git a/src/NadekoBot/Services/Database/Models/StreamRoleSettings.cs b/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/StreamRoleSettings.cs rename to NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs diff --git a/src/NadekoBot/Services/Database/Models/UserXpStats.cs b/NadekoBot.Core/Services/Database/Models/UserXpStats.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/UserXpStats.cs rename to NadekoBot.Core/Services/Database/Models/UserXpStats.cs diff --git a/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs b/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs rename to NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs diff --git a/src/NadekoBot/Services/Database/Models/Waifu.cs b/NadekoBot.Core/Services/Database/Models/Waifu.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Waifu.cs rename to NadekoBot.Core/Services/Database/Models/Waifu.cs diff --git a/src/NadekoBot/Services/Database/Models/WaifuItem.cs b/NadekoBot.Core/Services/Database/Models/WaifuItem.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/WaifuItem.cs rename to NadekoBot.Core/Services/Database/Models/WaifuItem.cs diff --git a/src/NadekoBot/Services/Database/Models/WaifuUpdate.cs b/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/WaifuUpdate.cs rename to NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs diff --git a/src/NadekoBot/Services/Database/Models/Warning.cs b/NadekoBot.Core/Services/Database/Models/Warning.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/Warning.cs rename to NadekoBot.Core/Services/Database/Models/Warning.cs diff --git a/src/NadekoBot/Services/Database/Models/XpSettings.cs b/NadekoBot.Core/Services/Database/Models/XpSettings.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/XpSettings.cs rename to NadekoBot.Core/Services/Database/Models/XpSettings.cs diff --git a/src/NadekoBot/Services/Database/NadekoContext.cs b/NadekoBot.Core/Services/Database/NadekoContext.cs similarity index 100% rename from src/NadekoBot/Services/Database/NadekoContext.cs rename to NadekoBot.Core/Services/Database/NadekoContext.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IClubRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IClubRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IDiscordUserRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IDiscordUserRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IPokeGameRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IPokeGameRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IUnitConverterRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IUnitConverterRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IWaifuRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IWaifuRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IWarningsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IWarningsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/IXpRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/IXpRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/PokeGameRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/PokeGameRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/WaifuRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/WaifuRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/WarningsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/WarningsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/XpRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs similarity index 100% rename from src/NadekoBot/Services/Database/Repositories/Impl/XpRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs diff --git a/src/NadekoBot/Services/Database/UnitOfWork.cs b/NadekoBot.Core/Services/Database/UnitOfWork.cs similarity index 100% rename from src/NadekoBot/Services/Database/UnitOfWork.cs rename to NadekoBot.Core/Services/Database/UnitOfWork.cs diff --git a/src/NadekoBot/Services/DbService.cs b/NadekoBot.Core/Services/DbService.cs similarity index 100% rename from src/NadekoBot/Services/DbService.cs rename to NadekoBot.Core/Services/DbService.cs diff --git a/src/NadekoBot/Services/GreetSettingsService.cs b/NadekoBot.Core/Services/GreetSettingsService.cs similarity index 100% rename from src/NadekoBot/Services/GreetSettingsService.cs rename to NadekoBot.Core/Services/GreetSettingsService.cs diff --git a/src/NadekoBot/Services/IBotConfigProvider.cs b/NadekoBot.Core/Services/IBotConfigProvider.cs similarity index 100% rename from src/NadekoBot/Services/IBotConfigProvider.cs rename to NadekoBot.Core/Services/IBotConfigProvider.cs diff --git a/src/NadekoBot/Services/IBotCredentials.cs b/NadekoBot.Core/Services/IBotCredentials.cs similarity index 100% rename from src/NadekoBot/Services/IBotCredentials.cs rename to NadekoBot.Core/Services/IBotCredentials.cs diff --git a/src/NadekoBot/Services/IDataCache.cs b/NadekoBot.Core/Services/IDataCache.cs similarity index 100% rename from src/NadekoBot/Services/IDataCache.cs rename to NadekoBot.Core/Services/IDataCache.cs diff --git a/src/NadekoBot/Services/IGoogleApiService.cs b/NadekoBot.Core/Services/IGoogleApiService.cs similarity index 100% rename from src/NadekoBot/Services/IGoogleApiService.cs rename to NadekoBot.Core/Services/IGoogleApiService.cs diff --git a/src/NadekoBot/Services/IImagesService.cs b/NadekoBot.Core/Services/IImagesService.cs similarity index 100% rename from src/NadekoBot/Services/IImagesService.cs rename to NadekoBot.Core/Services/IImagesService.cs diff --git a/src/NadekoBot/Services/ILocalization.cs b/NadekoBot.Core/Services/ILocalization.cs similarity index 100% rename from src/NadekoBot/Services/ILocalization.cs rename to NadekoBot.Core/Services/ILocalization.cs diff --git a/src/NadekoBot/Services/INService.cs b/NadekoBot.Core/Services/INService.cs similarity index 100% rename from src/NadekoBot/Services/INService.cs rename to NadekoBot.Core/Services/INService.cs diff --git a/src/NadekoBot/Services/IStatsService.cs b/NadekoBot.Core/Services/IStatsService.cs similarity index 100% rename from src/NadekoBot/Services/IStatsService.cs rename to NadekoBot.Core/Services/IStatsService.cs diff --git a/src/NadekoBot/Services/Impl/BotConfigProvider.cs b/NadekoBot.Core/Services/Impl/BotConfigProvider.cs similarity index 100% rename from src/NadekoBot/Services/Impl/BotConfigProvider.cs rename to NadekoBot.Core/Services/Impl/BotConfigProvider.cs diff --git a/src/NadekoBot/Services/Impl/BotCredentials.cs b/NadekoBot.Core/Services/Impl/BotCredentials.cs similarity index 100% rename from src/NadekoBot/Services/Impl/BotCredentials.cs rename to NadekoBot.Core/Services/Impl/BotCredentials.cs diff --git a/src/NadekoBot/Services/Impl/GoogleApiService.cs b/NadekoBot.Core/Services/Impl/GoogleApiService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/GoogleApiService.cs rename to NadekoBot.Core/Services/Impl/GoogleApiService.cs diff --git a/src/NadekoBot/Services/Impl/ImagesService.cs b/NadekoBot.Core/Services/Impl/ImagesService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/ImagesService.cs rename to NadekoBot.Core/Services/Impl/ImagesService.cs diff --git a/src/NadekoBot/Services/Impl/Localization.cs b/NadekoBot.Core/Services/Impl/Localization.cs similarity index 100% rename from src/NadekoBot/Services/Impl/Localization.cs rename to NadekoBot.Core/Services/Impl/Localization.cs diff --git a/src/NadekoBot/Services/Impl/NadekoStrings.cs b/NadekoBot.Core/Services/Impl/NadekoStrings.cs similarity index 100% rename from src/NadekoBot/Services/Impl/NadekoStrings.cs rename to NadekoBot.Core/Services/Impl/NadekoStrings.cs diff --git a/src/NadekoBot/Services/Impl/RedisCache.cs b/NadekoBot.Core/Services/Impl/RedisCache.cs similarity index 100% rename from src/NadekoBot/Services/Impl/RedisCache.cs rename to NadekoBot.Core/Services/Impl/RedisCache.cs diff --git a/src/NadekoBot/Services/Impl/SoundCloudApiService.cs b/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/SoundCloudApiService.cs rename to NadekoBot.Core/Services/Impl/SoundCloudApiService.cs diff --git a/src/NadekoBot/Services/Impl/StartingGuildsListService.cs b/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/StartingGuildsListService.cs rename to NadekoBot.Core/Services/Impl/StartingGuildsListService.cs diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/StatsService.cs rename to NadekoBot.Core/Services/Impl/StatsService.cs diff --git a/src/NadekoBot/Services/Impl/SyncPreconditionService.cs b/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs similarity index 100% rename from src/NadekoBot/Services/Impl/SyncPreconditionService.cs rename to NadekoBot.Core/Services/Impl/SyncPreconditionService.cs diff --git a/src/NadekoBot/Services/Impl/Ytdl.cs b/NadekoBot.Core/Services/Impl/Ytdl.cs similarity index 100% rename from src/NadekoBot/Services/Impl/Ytdl.cs rename to NadekoBot.Core/Services/Impl/Ytdl.cs diff --git a/src/NadekoBot/Services/LogSetup.cs b/NadekoBot.Core/Services/LogSetup.cs similarity index 100% rename from src/NadekoBot/Services/LogSetup.cs rename to NadekoBot.Core/Services/LogSetup.cs diff --git a/src/NadekoBot/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs similarity index 98% rename from src/NadekoBot/NadekoBot.cs rename to NadekoBot.Core/Services/NadekoBot.cs index 946ba5c3..b8f62ac9 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -162,11 +162,12 @@ namespace NadekoBot //setup typereaders CommandService.AddTypeReader(new PermissionActionTypeReader()); CommandService.AddTypeReader(new CommandTypeReader()); - CommandService.AddTypeReader(new CommandOrCrTypeReader()); + //todo module dependency + //CommandService.AddTypeReader(new CommandOrCrTypeReader()); CommandService.AddTypeReader(new ModuleTypeReader(CommandService)); CommandService.AddTypeReader(new ModuleOrCrTypeReader(CommandService)); CommandService.AddTypeReader(new GuildTypeReader(Client)); - CommandService.AddTypeReader(new GuildDateTimeTypeReader()); + //CommandService.AddTypeReader(new GuildDateTimeTypeReader()); } } diff --git a/src/NadekoBot/Services/ServiceProvider.cs b/NadekoBot.Core/Services/ServiceProvider.cs similarity index 100% rename from src/NadekoBot/Services/ServiceProvider.cs rename to NadekoBot.Core/Services/ServiceProvider.cs diff --git a/src/NadekoBot/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs similarity index 96% rename from src/NadekoBot/ShardsCoordinator.cs rename to NadekoBot.Core/Services/ShardsCoordinator.cs index 72ed349c..eaaac180 100644 --- a/src/NadekoBot/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -1,5 +1,4 @@ -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Services.Impl; using NLog; using System; using System.Diagnostics; @@ -7,7 +6,7 @@ using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.ShardCom; -namespace NadekoBot +namespace NadekoBot.Services { public class ShardsCoordinator { @@ -43,7 +42,6 @@ namespace NadekoBot private Task _comServer_OnDataReceived(ShardComMessage msg) { Statuses[msg.ShardId] = msg; - if (msg.ConnectionState == Discord.ConnectionState.Disconnected || msg.ConnectionState == Discord.ConnectionState.Disconnecting) _log.Error("!!! SHARD {0} IS IN {1} STATE", msg.ShardId, msg.ConnectionState.ToString()); return Task.CompletedTask; diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/NadekoBot.Core/_Extensions/Extensions.cs similarity index 99% rename from src/NadekoBot/_Extensions/Extensions.cs rename to NadekoBot.Core/_Extensions/Extensions.cs index d1bd796b..1852253d 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/NadekoBot.Core/_Extensions/Extensions.cs @@ -2,7 +2,6 @@ using Discord.Commands; using Discord.WebSocket; using ImageSharp; -using NadekoBot.Services.Discord; using Newtonsoft.Json; using System; using System.Collections.Concurrent; @@ -16,6 +15,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using NadekoBot.Common.Collections; using SixLabors.Primitives; +using NadekoBot.Common; namespace NadekoBot.Extensions { diff --git a/src/NadekoBot/_Extensions/IEnumerableExtensions.cs b/NadekoBot.Core/_Extensions/IEnumerableExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/IEnumerableExtensions.cs rename to NadekoBot.Core/_Extensions/IEnumerableExtensions.cs diff --git a/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs b/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/IMessageChannelExtensions.cs rename to NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs diff --git a/src/NadekoBot/_Extensions/IUserExtensions.cs b/NadekoBot.Core/_Extensions/IUserExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/IUserExtensions.cs rename to NadekoBot.Core/_Extensions/IUserExtensions.cs diff --git a/src/NadekoBot/_Extensions/MusicExtensions.cs b/NadekoBot.Core/_Extensions/MusicExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/MusicExtensions.cs rename to NadekoBot.Core/_Extensions/MusicExtensions.cs diff --git a/src/NadekoBot/_Extensions/NumberExtensions.cs b/NadekoBot.Core/_Extensions/NumberExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/NumberExtensions.cs rename to NadekoBot.Core/_Extensions/NumberExtensions.cs diff --git a/src/NadekoBot/_Extensions/StringExtensions.cs b/NadekoBot.Core/_Extensions/StringExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/StringExtensions.cs rename to NadekoBot.Core/_Extensions/StringExtensions.cs diff --git a/src/NadekoBot/_libs/32/libsodium.dll b/NadekoBot.Core/_libs/32/libsodium.dll similarity index 100% rename from src/NadekoBot/_libs/32/libsodium.dll rename to NadekoBot.Core/_libs/32/libsodium.dll diff --git a/src/NadekoBot/_libs/32/opus.dll b/NadekoBot.Core/_libs/32/opus.dll similarity index 100% rename from src/NadekoBot/_libs/32/opus.dll rename to NadekoBot.Core/_libs/32/opus.dll diff --git a/src/NadekoBot/_libs/64/libsodium.dll b/NadekoBot.Core/_libs/64/libsodium.dll similarity index 100% rename from src/NadekoBot/_libs/64/libsodium.dll rename to NadekoBot.Core/_libs/64/libsodium.dll diff --git a/src/NadekoBot/_libs/64/opus.dll b/NadekoBot.Core/_libs/64/opus.dll similarity index 100% rename from src/NadekoBot/_libs/64/opus.dll rename to NadekoBot.Core/_libs/64/opus.dll diff --git a/src/NadekoBot/_strings/ResponseStrings.ar.json b/NadekoBot.Core/_strings/ResponseStrings.ar.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.ar.json rename to NadekoBot.Core/_strings/ResponseStrings.ar.json diff --git a/src/NadekoBot/_strings/ResponseStrings.cs-CZ.json b/NadekoBot.Core/_strings/ResponseStrings.cs-CZ.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.cs-CZ.json rename to NadekoBot.Core/_strings/ResponseStrings.cs-CZ.json diff --git a/src/NadekoBot/_strings/ResponseStrings.da-DK.json b/NadekoBot.Core/_strings/ResponseStrings.da-DK.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.da-DK.json rename to NadekoBot.Core/_strings/ResponseStrings.da-DK.json diff --git a/src/NadekoBot/_strings/ResponseStrings.de-DE.json b/NadekoBot.Core/_strings/ResponseStrings.de-DE.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.de-DE.json rename to NadekoBot.Core/_strings/ResponseStrings.de-DE.json diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/NadekoBot.Core/_strings/ResponseStrings.en-US.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.en-US.json rename to NadekoBot.Core/_strings/ResponseStrings.en-US.json diff --git a/src/NadekoBot/_strings/ResponseStrings.es-ES.json b/NadekoBot.Core/_strings/ResponseStrings.es-ES.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.es-ES.json rename to NadekoBot.Core/_strings/ResponseStrings.es-ES.json diff --git a/src/NadekoBot/_strings/ResponseStrings.fr-FR.json b/NadekoBot.Core/_strings/ResponseStrings.fr-FR.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.fr-FR.json rename to NadekoBot.Core/_strings/ResponseStrings.fr-FR.json diff --git a/src/NadekoBot/_strings/ResponseStrings.he-IL.json b/NadekoBot.Core/_strings/ResponseStrings.he-IL.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.he-IL.json rename to NadekoBot.Core/_strings/ResponseStrings.he-IL.json diff --git a/src/NadekoBot/_strings/ResponseStrings.id-ID.json b/NadekoBot.Core/_strings/ResponseStrings.id-ID.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.id-ID.json rename to NadekoBot.Core/_strings/ResponseStrings.id-ID.json diff --git a/src/NadekoBot/_strings/ResponseStrings.it-IT.json b/NadekoBot.Core/_strings/ResponseStrings.it-IT.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.it-IT.json rename to NadekoBot.Core/_strings/ResponseStrings.it-IT.json diff --git a/src/NadekoBot/_strings/ResponseStrings.ja-JP.json b/NadekoBot.Core/_strings/ResponseStrings.ja-JP.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.ja-JP.json rename to NadekoBot.Core/_strings/ResponseStrings.ja-JP.json diff --git a/src/NadekoBot/_strings/ResponseStrings.ko-KR.json b/NadekoBot.Core/_strings/ResponseStrings.ko-KR.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.ko-KR.json rename to NadekoBot.Core/_strings/ResponseStrings.ko-KR.json diff --git a/src/NadekoBot/_strings/ResponseStrings.nb-NO.json b/NadekoBot.Core/_strings/ResponseStrings.nb-NO.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.nb-NO.json rename to NadekoBot.Core/_strings/ResponseStrings.nb-NO.json diff --git a/src/NadekoBot/_strings/ResponseStrings.nl-NL.json b/NadekoBot.Core/_strings/ResponseStrings.nl-NL.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.nl-NL.json rename to NadekoBot.Core/_strings/ResponseStrings.nl-NL.json diff --git a/src/NadekoBot/_strings/ResponseStrings.pl-PL.json b/NadekoBot.Core/_strings/ResponseStrings.pl-PL.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.pl-PL.json rename to NadekoBot.Core/_strings/ResponseStrings.pl-PL.json diff --git a/src/NadekoBot/_strings/ResponseStrings.pt-BR.json b/NadekoBot.Core/_strings/ResponseStrings.pt-BR.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.pt-BR.json rename to NadekoBot.Core/_strings/ResponseStrings.pt-BR.json diff --git a/src/NadekoBot/_strings/ResponseStrings.ro-RO.json b/NadekoBot.Core/_strings/ResponseStrings.ro-RO.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.ro-RO.json rename to NadekoBot.Core/_strings/ResponseStrings.ro-RO.json diff --git a/src/NadekoBot/_strings/ResponseStrings.ru-RU.json b/NadekoBot.Core/_strings/ResponseStrings.ru-RU.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.ru-RU.json rename to NadekoBot.Core/_strings/ResponseStrings.ru-RU.json diff --git a/src/NadekoBot/_strings/ResponseStrings.sr-cyrl-rs.json b/NadekoBot.Core/_strings/ResponseStrings.sr-cyrl-rs.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.sr-cyrl-rs.json rename to NadekoBot.Core/_strings/ResponseStrings.sr-cyrl-rs.json diff --git a/src/NadekoBot/_strings/ResponseStrings.sv-SE.json b/NadekoBot.Core/_strings/ResponseStrings.sv-SE.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.sv-SE.json rename to NadekoBot.Core/_strings/ResponseStrings.sv-SE.json diff --git a/src/NadekoBot/_strings/ResponseStrings.tr-TR.json b/NadekoBot.Core/_strings/ResponseStrings.tr-TR.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.tr-TR.json rename to NadekoBot.Core/_strings/ResponseStrings.tr-TR.json diff --git a/src/NadekoBot/_strings/ResponseStrings.zh-CN.json b/NadekoBot.Core/_strings/ResponseStrings.zh-CN.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.zh-CN.json rename to NadekoBot.Core/_strings/ResponseStrings.zh-CN.json diff --git a/src/NadekoBot/_strings/ResponseStrings.zh-TW.json b/NadekoBot.Core/_strings/ResponseStrings.zh-TW.json similarity index 100% rename from src/NadekoBot/_strings/ResponseStrings.zh-TW.json rename to NadekoBot.Core/_strings/ResponseStrings.zh-TW.json diff --git a/src/NadekoBot/Modules/Searches/AnimeSearchCommands.cs b/NadekoBot.Module.Searches/AnimeSearchCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/AnimeSearchCommands.cs rename to NadekoBot.Module.Searches/AnimeSearchCommands.cs diff --git a/src/NadekoBot/Modules/Searches/Common/AnimeResult.cs b/NadekoBot.Module.Searches/Common/AnimeResult.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/AnimeResult.cs rename to NadekoBot.Module.Searches/Common/AnimeResult.cs diff --git a/src/NadekoBot/Modules/Searches/Common/DefineModel.cs b/NadekoBot.Module.Searches/Common/DefineModel.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/DefineModel.cs rename to NadekoBot.Module.Searches/Common/DefineModel.cs diff --git a/src/NadekoBot/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs b/NadekoBot.Module.Searches/Common/Exceptions/StreamNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs rename to NadekoBot.Module.Searches/Common/Exceptions/StreamNotFoundException.cs diff --git a/src/NadekoBot/Modules/Searches/Common/GoogleSearchResult.cs b/NadekoBot.Module.Searches/Common/GoogleSearchResult.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/GoogleSearchResult.cs rename to NadekoBot.Module.Searches/Common/GoogleSearchResult.cs diff --git a/src/NadekoBot/Modules/Searches/Common/MagicItem.cs b/NadekoBot.Module.Searches/Common/MagicItem.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/MagicItem.cs rename to NadekoBot.Module.Searches/Common/MagicItem.cs diff --git a/src/NadekoBot/Modules/Searches/Common/MangaResult.cs b/NadekoBot.Module.Searches/Common/MangaResult.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/MangaResult.cs rename to NadekoBot.Module.Searches/Common/MangaResult.cs diff --git a/src/NadekoBot/Modules/Searches/Common/OmdbProvider.cs b/NadekoBot.Module.Searches/Common/OmdbProvider.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/OmdbProvider.cs rename to NadekoBot.Module.Searches/Common/OmdbProvider.cs diff --git a/src/NadekoBot/Modules/Searches/Common/OverwatchApiModel.cs b/NadekoBot.Module.Searches/Common/OverwatchApiModel.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/OverwatchApiModel.cs rename to NadekoBot.Module.Searches/Common/OverwatchApiModel.cs diff --git a/src/NadekoBot/Modules/Searches/Common/SearchImageCacher.cs b/NadekoBot.Module.Searches/Common/SearchImageCacher.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/SearchImageCacher.cs rename to NadekoBot.Module.Searches/Common/SearchImageCacher.cs diff --git a/src/NadekoBot/Modules/Searches/Common/SearchPokemon.cs b/NadekoBot.Module.Searches/Common/SearchPokemon.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/SearchPokemon.cs rename to NadekoBot.Module.Searches/Common/SearchPokemon.cs diff --git a/src/NadekoBot/Modules/Searches/Common/StreamResponses.cs b/NadekoBot.Module.Searches/Common/StreamResponses.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/StreamResponses.cs rename to NadekoBot.Module.Searches/Common/StreamResponses.cs diff --git a/src/NadekoBot/Modules/Searches/Common/TimeModels.cs b/NadekoBot.Module.Searches/Common/TimeModels.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/TimeModels.cs rename to NadekoBot.Module.Searches/Common/TimeModels.cs diff --git a/src/NadekoBot/Modules/Searches/Common/WeatherModels.cs b/NadekoBot.Module.Searches/Common/WeatherModels.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/WeatherModels.cs rename to NadekoBot.Module.Searches/Common/WeatherModels.cs diff --git a/src/NadekoBot/Modules/Searches/Common/WikipediaApiModel.cs b/NadekoBot.Module.Searches/Common/WikipediaApiModel.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/WikipediaApiModel.cs rename to NadekoBot.Module.Searches/Common/WikipediaApiModel.cs diff --git a/src/NadekoBot/Modules/Searches/Common/WoWJoke.cs b/NadekoBot.Module.Searches/Common/WoWJoke.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/WoWJoke.cs rename to NadekoBot.Module.Searches/Common/WoWJoke.cs diff --git a/src/NadekoBot/Modules/Searches/FeedCommands.cs b/NadekoBot.Module.Searches/FeedCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/FeedCommands.cs rename to NadekoBot.Module.Searches/FeedCommands.cs diff --git a/src/NadekoBot/Modules/Searches/JokeCommands.cs b/NadekoBot.Module.Searches/JokeCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/JokeCommands.cs rename to NadekoBot.Module.Searches/JokeCommands.cs diff --git a/src/NadekoBot/Modules/Searches/LoLCommands.cs b/NadekoBot.Module.Searches/LoLCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/LoLCommands.cs rename to NadekoBot.Module.Searches/LoLCommands.cs diff --git a/src/NadekoBot/Modules/Searches/MemegenCommands.cs b/NadekoBot.Module.Searches/MemegenCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/MemegenCommands.cs rename to NadekoBot.Module.Searches/MemegenCommands.cs diff --git a/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj b/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj new file mode 100644 index 00000000..f7a76051 --- /dev/null +++ b/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.0 + + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/Searches/OsuCommands.cs b/NadekoBot.Module.Searches/OsuCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/OsuCommands.cs rename to NadekoBot.Module.Searches/OsuCommands.cs diff --git a/src/NadekoBot/Modules/Searches/OverwatchCommands.cs b/NadekoBot.Module.Searches/OverwatchCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/OverwatchCommands.cs rename to NadekoBot.Module.Searches/OverwatchCommands.cs diff --git a/src/NadekoBot/Modules/Searches/PlaceCommands.cs b/NadekoBot.Module.Searches/PlaceCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/PlaceCommands.cs rename to NadekoBot.Module.Searches/PlaceCommands.cs diff --git a/src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs b/NadekoBot.Module.Searches/PokemonSearchCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs rename to NadekoBot.Module.Searches/PokemonSearchCommands.cs diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/NadekoBot.Module.Searches/Searches.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Searches.cs rename to NadekoBot.Module.Searches/Searches.cs diff --git a/src/NadekoBot/Modules/Searches/Services/AnimeSearchService.cs b/NadekoBot.Module.Searches/Services/AnimeSearchService.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Services/AnimeSearchService.cs rename to NadekoBot.Module.Searches/Services/AnimeSearchService.cs diff --git a/src/NadekoBot/Modules/Searches/Services/FeedsService.cs b/NadekoBot.Module.Searches/Services/FeedsService.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Services/FeedsService.cs rename to NadekoBot.Module.Searches/Services/FeedsService.cs diff --git a/src/NadekoBot/Modules/Searches/Services/SearchesService.cs b/NadekoBot.Module.Searches/Services/SearchesService.cs similarity index 98% rename from src/NadekoBot/Modules/Searches/Services/SearchesService.cs rename to NadekoBot.Module.Searches/Services/SearchesService.cs index 25be38d4..0ae3253a 100644 --- a/src/NadekoBot/Modules/Searches/Services/SearchesService.cs +++ b/NadekoBot.Module.Searches/Services/SearchesService.cs @@ -13,7 +13,6 @@ using NadekoBot.Modules.Searches.Common; using NadekoBot.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; -using NadekoBot.Modules.NSFW.Exceptions; using System.Net.Http; using Newtonsoft.Json.Linq; using AngleSharp; @@ -142,7 +141,8 @@ namespace NadekoBot.Modules.Searches.Services if (blacklistedTags .Any(x => tag.ToLowerInvariant().Contains(x))) { - throw new TagBlacklistedException(); + //todo tag blacklisted + throw new Exception(); } var cacher = _imageCacher.GetOrAdd(guild.Value, (key) => new SearchImageCacher()); diff --git a/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs b/NadekoBot.Module.Searches/Services/StreamNotificationService.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs rename to NadekoBot.Module.Searches/Services/StreamNotificationService.cs diff --git a/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs b/NadekoBot.Module.Searches/StreamNotificationCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs rename to NadekoBot.Module.Searches/StreamNotificationCommands.cs diff --git a/src/NadekoBot/Modules/Searches/TranslatorCommands.cs b/NadekoBot.Module.Searches/TranslatorCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/TranslatorCommands.cs rename to NadekoBot.Module.Searches/TranslatorCommands.cs diff --git a/src/NadekoBot/Modules/Searches/XkcdCommands.cs b/NadekoBot.Module.Searches/XkcdCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/XkcdCommands.cs rename to NadekoBot.Module.Searches/XkcdCommands.cs diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/NadekoBot.Modules.CustomReactions/CustomReactions.cs similarity index 100% rename from src/NadekoBot/Modules/CustomReactions/CustomReactions.cs rename to NadekoBot.Modules.CustomReactions/CustomReactions.cs diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions/Extensions.cs b/NadekoBot.Modules.CustomReactions/Extensions/Extensions.cs similarity index 100% rename from src/NadekoBot/Modules/CustomReactions/Extensions/Extensions.cs rename to NadekoBot.Modules.CustomReactions/Extensions/Extensions.cs diff --git a/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj b/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj new file mode 100644 index 00000000..bea9affd --- /dev/null +++ b/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.0 + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs b/NadekoBot.Modules.CustomReactions/Services/CustomReactionsService.cs similarity index 100% rename from src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs rename to NadekoBot.Modules.CustomReactions/Services/CustomReactionsService.cs diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs b/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs rename to NadekoBot.Modules.Gambling/AnimalRacingCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRace.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs rename to NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRace.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRacingUser.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs rename to NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRacingUser.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs rename to NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs rename to NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs rename to NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs rename to NadekoBot.Modules.Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Cards.cs b/NadekoBot.Modules.Gambling/Common/Cards.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Cards.cs rename to NadekoBot.Modules.Gambling/Common/Cards.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs b/NadekoBot.Modules.Gambling/Common/WheelOfFortune/WheelOfFortune.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs rename to NadekoBot.Modules.Gambling/Common/WheelOfFortune/WheelOfFortune.cs diff --git a/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs rename to NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs b/NadekoBot.Modules.Gambling/DiceRollCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/DiceRollCommands.cs rename to NadekoBot.Modules.Gambling/DiceRollCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/DrawCommands.cs b/NadekoBot.Modules.Gambling/DrawCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/DrawCommands.cs rename to NadekoBot.Modules.Gambling/DrawCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs b/NadekoBot.Modules.Gambling/FlipCoinCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs rename to NadekoBot.Modules.Gambling/FlipCoinCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/FlowerShopCommands.cs b/NadekoBot.Modules.Gambling/FlowerShopCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/FlowerShopCommands.cs rename to NadekoBot.Modules.Gambling/FlowerShopCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/NadekoBot.Modules.Gambling/Gambling.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Gambling.cs rename to NadekoBot.Modules.Gambling/Gambling.cs diff --git a/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj b/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj new file mode 100644 index 00000000..9ee6f9f6 --- /dev/null +++ b/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp2.0 + + + + + + + diff --git a/src/NadekoBot/Modules/Gambling/SlotCommands.cs b/NadekoBot.Modules.Gambling/SlotCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/SlotCommands.cs rename to NadekoBot.Modules.Gambling/SlotCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs rename to NadekoBot.Modules.Gambling/WaifuClaimCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs b/NadekoBot.Modules.Gambling/WheelOfFortuneCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs rename to NadekoBot.Modules.Gambling/WheelOfFortuneCommands.cs diff --git a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs b/NadekoBot.Modules.Games/AcropobiaCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/AcropobiaCommands.cs rename to NadekoBot.Modules.Games/AcropobiaCommands.cs diff --git a/src/NadekoBot/Modules/Games/CleverBotCommands.cs b/NadekoBot.Modules.Games/CleverBotCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/CleverBotCommands.cs rename to NadekoBot.Modules.Games/CleverBotCommands.cs diff --git a/src/NadekoBot/Modules/Games/Common/Acrophobia/Acrophobia.cs b/NadekoBot.Modules.Games/Common/Acrophobia/Acrophobia.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Acrophobia/Acrophobia.cs rename to NadekoBot.Modules.Games/Common/Acrophobia/Acrophobia.cs diff --git a/src/NadekoBot/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs b/NadekoBot.Modules.Games/Common/Acrophobia/AcrophobiaUser.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs rename to NadekoBot.Modules.Games/Common/Acrophobia/AcrophobiaUser.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs b/NadekoBot.Modules.Games/Common/ChatterBot/ChatterBotResponse.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs rename to NadekoBot.Modules.Games/Common/ChatterBot/ChatterBotResponse.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotSession.cs b/NadekoBot.Modules.Games/Common/ChatterBot/ChatterBotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotSession.cs rename to NadekoBot.Modules.Games/Common/ChatterBot/ChatterBotSession.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/CleverbotResponse.cs b/NadekoBot.Modules.Games/Common/ChatterBot/CleverbotResponse.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/CleverbotResponse.cs rename to NadekoBot.Modules.Games/Common/ChatterBot/CleverbotResponse.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/IChatterBotSession.cs b/NadekoBot.Modules.Games/Common/ChatterBot/IChatterBotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/IChatterBotSession.cs rename to NadekoBot.Modules.Games/Common/ChatterBot/IChatterBotSession.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs b/NadekoBot.Modules.Games/Common/ChatterBot/OfficialCleverbotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs rename to NadekoBot.Modules.Games/Common/ChatterBot/OfficialCleverbotSession.cs diff --git a/src/NadekoBot/Modules/Games/Common/Connect4/Connect4.cs b/NadekoBot.Modules.Games/Common/Connect4/Connect4.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Connect4/Connect4.cs rename to NadekoBot.Modules.Games/Common/Connect4/Connect4.cs diff --git a/src/NadekoBot/Modules/Games/Common/GirlRating.cs b/NadekoBot.Modules.Games/Common/GirlRating.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/GirlRating.cs rename to NadekoBot.Modules.Games/Common/GirlRating.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs b/NadekoBot.Modules.Games/Common/Hangman/Exceptions/TermNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs rename to NadekoBot.Modules.Games/Common/Hangman/Exceptions/TermNotFoundException.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/Hangman.cs b/NadekoBot.Modules.Games/Common/Hangman/Hangman.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/Hangman.cs rename to NadekoBot.Modules.Games/Common/Hangman/Hangman.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/HangmanObject.cs b/NadekoBot.Modules.Games/Common/Hangman/HangmanObject.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/HangmanObject.cs rename to NadekoBot.Modules.Games/Common/Hangman/HangmanObject.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/Phase.cs b/NadekoBot.Modules.Games/Common/Hangman/Phase.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/Phase.cs rename to NadekoBot.Modules.Games/Common/Hangman/Phase.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/TermPool.cs b/NadekoBot.Modules.Games/Common/Hangman/TermPool.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/TermPool.cs rename to NadekoBot.Modules.Games/Common/Hangman/TermPool.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/TermType.cs b/NadekoBot.Modules.Games/Common/Hangman/TermType.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/TermType.cs rename to NadekoBot.Modules.Games/Common/Hangman/TermType.cs diff --git a/src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs b/NadekoBot.Modules.Games/Common/Nunchi/Nunchi.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs rename to NadekoBot.Modules.Games/Common/Nunchi/Nunchi.cs diff --git a/src/NadekoBot/Modules/Games/Common/Poll.cs b/NadekoBot.Modules.Games/Common/Poll.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Poll.cs rename to NadekoBot.Modules.Games/Common/Poll.cs diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs b/NadekoBot.Modules.Games/Common/Trivia/TriviaGame.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs rename to NadekoBot.Modules.Games/Common/Trivia/TriviaGame.cs diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestion.cs b/NadekoBot.Modules.Games/Common/Trivia/TriviaQuestion.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestion.cs rename to NadekoBot.Modules.Games/Common/Trivia/TriviaQuestion.cs diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestionPool.cs b/NadekoBot.Modules.Games/Common/Trivia/TriviaQuestionPool.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestionPool.cs rename to NadekoBot.Modules.Games/Common/Trivia/TriviaQuestionPool.cs diff --git a/src/NadekoBot/Modules/Games/Common/TypingArticle.cs b/NadekoBot.Modules.Games/Common/TypingArticle.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/TypingArticle.cs rename to NadekoBot.Modules.Games/Common/TypingArticle.cs diff --git a/src/NadekoBot/Modules/Games/Common/TypingGame.cs b/NadekoBot.Modules.Games/Common/TypingGame.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/TypingGame.cs rename to NadekoBot.Modules.Games/Common/TypingGame.cs diff --git a/src/NadekoBot/Modules/Games/Connect4Commands.cs b/NadekoBot.Modules.Games/Connect4Commands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Connect4Commands.cs rename to NadekoBot.Modules.Games/Connect4Commands.cs diff --git a/src/NadekoBot/Modules/Games/Games.cs b/NadekoBot.Modules.Games/Games.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Games.cs rename to NadekoBot.Modules.Games/Games.cs diff --git a/src/NadekoBot/Modules/Games/HangmanCommands.cs b/NadekoBot.Modules.Games/HangmanCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/HangmanCommands.cs rename to NadekoBot.Modules.Games/HangmanCommands.cs diff --git a/src/NadekoBot/Modules/Games/LeetCommands.cs b/NadekoBot.Modules.Games/LeetCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/LeetCommands.cs rename to NadekoBot.Modules.Games/LeetCommands.cs diff --git a/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj b/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj new file mode 100644 index 00000000..bea9affd --- /dev/null +++ b/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.0 + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/Games/NunchiCommands.cs b/NadekoBot.Modules.Games/NunchiCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/NunchiCommands.cs rename to NadekoBot.Modules.Games/NunchiCommands.cs diff --git a/src/NadekoBot/Modules/Games/PlantAndPickCommands.cs b/NadekoBot.Modules.Games/PlantAndPickCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/PlantAndPickCommands.cs rename to NadekoBot.Modules.Games/PlantAndPickCommands.cs diff --git a/src/NadekoBot/Modules/Games/PollCommands.cs b/NadekoBot.Modules.Games/PollCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/PollCommands.cs rename to NadekoBot.Modules.Games/PollCommands.cs diff --git a/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs b/NadekoBot.Modules.Games/Services/ChatterbotService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Services/ChatterbotService.cs rename to NadekoBot.Modules.Games/Services/ChatterbotService.cs diff --git a/src/NadekoBot/Modules/Games/Services/GamesService.cs b/NadekoBot.Modules.Games/Services/GamesService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Services/GamesService.cs rename to NadekoBot.Modules.Games/Services/GamesService.cs diff --git a/src/NadekoBot/Modules/Games/Services/PollService.cs b/NadekoBot.Modules.Games/Services/PollService.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Services/PollService.cs rename to NadekoBot.Modules.Games/Services/PollService.cs diff --git a/src/NadekoBot/Modules/Games/SpeedTypingCommands.cs b/NadekoBot.Modules.Games/SpeedTypingCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/SpeedTypingCommands.cs rename to NadekoBot.Modules.Games/SpeedTypingCommands.cs diff --git a/src/NadekoBot/Modules/Games/TicTacToeCommands.cs b/NadekoBot.Modules.Games/TicTacToeCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/TicTacToeCommands.cs rename to NadekoBot.Modules.Games/TicTacToeCommands.cs diff --git a/src/NadekoBot/Modules/Games/TriviaCommands.cs b/NadekoBot.Modules.Games/TriviaCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/TriviaCommands.cs rename to NadekoBot.Modules.Games/TriviaCommands.cs diff --git a/src/NadekoBot/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs b/NadekoBot.Modules.Music/Common/Exceptions/NotInVoiceChannelException.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs rename to NadekoBot.Modules.Music/Common/Exceptions/NotInVoiceChannelException.cs diff --git a/src/NadekoBot/Modules/Music/Common/Exceptions/QueueFullException.cs b/NadekoBot.Modules.Music/Common/Exceptions/QueueFullException.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/Exceptions/QueueFullException.cs rename to NadekoBot.Modules.Music/Common/Exceptions/QueueFullException.cs diff --git a/src/NadekoBot/Modules/Music/Common/Exceptions/SongNotFoundException.cs b/NadekoBot.Modules.Music/Common/Exceptions/SongNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/Exceptions/SongNotFoundException.cs rename to NadekoBot.Modules.Music/Common/Exceptions/SongNotFoundException.cs diff --git a/src/NadekoBot/Modules/Music/Common/MusicPlayer.cs b/NadekoBot.Modules.Music/Common/MusicPlayer.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/MusicPlayer.cs rename to NadekoBot.Modules.Music/Common/MusicPlayer.cs diff --git a/src/NadekoBot/Modules/Music/Common/MusicQueue.cs b/NadekoBot.Modules.Music/Common/MusicQueue.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/MusicQueue.cs rename to NadekoBot.Modules.Music/Common/MusicQueue.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongBuffer.cs b/NadekoBot.Modules.Music/Common/SongBuffer.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongBuffer.cs rename to NadekoBot.Modules.Music/Common/SongBuffer.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongHandler.cs b/NadekoBot.Modules.Music/Common/SongHandler.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongHandler.cs rename to NadekoBot.Modules.Music/Common/SongHandler.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongInfo.cs b/NadekoBot.Modules.Music/Common/SongInfo.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongInfo.cs rename to NadekoBot.Modules.Music/Common/SongInfo.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/ISongResolverFactory.cs b/NadekoBot.Modules.Music/Common/SongResolver/ISongResolverFactory.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/ISongResolverFactory.cs rename to NadekoBot.Modules.Music/Common/SongResolver/ISongResolverFactory.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/SongResolverFactory.cs b/NadekoBot.Modules.Music/Common/SongResolver/SongResolverFactory.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/SongResolverFactory.cs rename to NadekoBot.Modules.Music/Common/SongResolver/SongResolverFactory.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/IResolverStrategy.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs rename to NadekoBot.Modules.Music/Common/SongResolver/Strategies/IResolverStrategy.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs rename to NadekoBot.Modules.Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs rename to NadekoBot.Modules.Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs rename to NadekoBot.Modules.Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs rename to NadekoBot.Modules.Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs diff --git a/src/NadekoBot/Modules/Music/Extensions/Extensions.cs b/NadekoBot.Modules.Music/Extensions/Extensions.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Extensions/Extensions.cs rename to NadekoBot.Modules.Music/Extensions/Extensions.cs diff --git a/src/NadekoBot/Modules/Music/Music.cs b/NadekoBot.Modules.Music/Music.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Music.cs rename to NadekoBot.Modules.Music/Music.cs diff --git a/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj b/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj new file mode 100644 index 00000000..df675329 --- /dev/null +++ b/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.0 + + + + true + + + + + + + diff --git a/src/NadekoBot/Modules/Music/Services/MusicService.cs b/NadekoBot.Modules.Music/Services/MusicService.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Services/MusicService.cs rename to NadekoBot.Modules.Music/Services/MusicService.cs diff --git a/src/NadekoBot/Modules/NSFW/Exceptions/TagBlacklistedException.cs b/NadekoBot.Modules.Nsfw/Exceptions/TagBlacklistedException.cs similarity index 100% rename from src/NadekoBot/Modules/NSFW/Exceptions/TagBlacklistedException.cs rename to NadekoBot.Modules.Nsfw/Exceptions/TagBlacklistedException.cs diff --git a/src/NadekoBot/Modules/NSFW/NSFW.cs b/NadekoBot.Modules.Nsfw/NSFW.cs similarity index 100% rename from src/NadekoBot/Modules/NSFW/NSFW.cs rename to NadekoBot.Modules.Nsfw/NSFW.cs diff --git a/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj b/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj new file mode 100644 index 00000000..708ba46b --- /dev/null +++ b/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.0 + + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/Pokemon/Common/PokeStats.cs b/NadekoBot.Modules.Pokemon/Common/PokeStats.cs similarity index 100% rename from src/NadekoBot/Modules/Pokemon/Common/PokeStats.cs rename to NadekoBot.Modules.Pokemon/Common/PokeStats.cs diff --git a/src/NadekoBot/Modules/Pokemon/Common/PokemonType.cs b/NadekoBot.Modules.Pokemon/Common/PokemonType.cs similarity index 100% rename from src/NadekoBot/Modules/Pokemon/Common/PokemonType.cs rename to NadekoBot.Modules.Pokemon/Common/PokemonType.cs diff --git a/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj b/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj new file mode 100644 index 00000000..9ee6f9f6 --- /dev/null +++ b/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp2.0 + + + + + + + diff --git a/src/NadekoBot/Modules/Pokemon/Pokemon.cs b/NadekoBot.Modules.Pokemon/Pokemon.cs similarity index 100% rename from src/NadekoBot/Modules/Pokemon/Pokemon.cs rename to NadekoBot.Modules.Pokemon/Pokemon.cs diff --git a/src/NadekoBot/Modules/Pokemon/Services/PokemonService.cs b/NadekoBot.Modules.Pokemon/Services/PokemonService.cs similarity index 100% rename from src/NadekoBot/Modules/Pokemon/Services/PokemonService.cs rename to NadekoBot.Modules.Pokemon/Services/PokemonService.cs diff --git a/src/NadekoBot/Modules/Utility/BotConfigCommands.cs b/NadekoBot.Modules.Utility/BotConfigCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/BotConfigCommands.cs rename to NadekoBot.Modules.Utility/BotConfigCommands.cs diff --git a/src/NadekoBot/Modules/Utility/CalcCommands.cs b/NadekoBot.Modules.Utility/CalcCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/CalcCommands.cs rename to NadekoBot.Modules.Utility/CalcCommands.cs diff --git a/src/NadekoBot/Modules/Utility/CommandMapCommands.cs b/NadekoBot.Modules.Utility/CommandMapCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/CommandMapCommands.cs rename to NadekoBot.Modules.Utility/CommandMapCommands.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs b/NadekoBot.Modules.Utility/Common/Exceptions/StreamRoleNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs rename to NadekoBot.Modules.Utility/Common/Exceptions/StreamRoleNotFoundException.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs b/NadekoBot.Modules.Utility/Common/Exceptions/StreamRolePermissionException.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs rename to NadekoBot.Modules.Utility/Common/Exceptions/StreamRolePermissionException.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Patreon/PatreonData.cs b/NadekoBot.Modules.Utility/Common/Patreon/PatreonData.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Patreon/PatreonData.cs rename to NadekoBot.Modules.Utility/Common/Patreon/PatreonData.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Patreon/PatreonPledge.cs b/NadekoBot.Modules.Utility/Common/Patreon/PatreonPledge.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Patreon/PatreonPledge.cs rename to NadekoBot.Modules.Utility/Common/Patreon/PatreonPledge.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Patreon/PatreonUser.cs b/NadekoBot.Modules.Utility/Common/Patreon/PatreonUser.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Patreon/PatreonUser.cs rename to NadekoBot.Modules.Utility/Common/Patreon/PatreonUser.cs diff --git a/src/NadekoBot/Modules/Utility/Common/RepeatRunner.cs b/NadekoBot.Modules.Utility/Common/RepeatRunner.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/RepeatRunner.cs rename to NadekoBot.Modules.Utility/Common/RepeatRunner.cs diff --git a/src/NadekoBot/Modules/Utility/Common/StreamRoleListType.cs b/NadekoBot.Modules.Utility/Common/StreamRoleListType.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/StreamRoleListType.cs rename to NadekoBot.Modules.Utility/Common/StreamRoleListType.cs diff --git a/src/NadekoBot/Modules/Utility/Extensions/StreamRoleExtensions.cs b/NadekoBot.Modules.Utility/Extensions/StreamRoleExtensions.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Extensions/StreamRoleExtensions.cs rename to NadekoBot.Modules.Utility/Extensions/StreamRoleExtensions.cs diff --git a/src/NadekoBot/Modules/Utility/InfoCommands.cs b/NadekoBot.Modules.Utility/InfoCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/InfoCommands.cs rename to NadekoBot.Modules.Utility/InfoCommands.cs diff --git a/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj b/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj new file mode 100644 index 00000000..e271723d --- /dev/null +++ b/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.0 + + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/Utility/PatreonCommands.cs b/NadekoBot.Modules.Utility/PatreonCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/PatreonCommands.cs rename to NadekoBot.Modules.Utility/PatreonCommands.cs diff --git a/src/NadekoBot/Modules/Utility/QuoteCommands.cs b/NadekoBot.Modules.Utility/QuoteCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/QuoteCommands.cs rename to NadekoBot.Modules.Utility/QuoteCommands.cs diff --git a/src/NadekoBot/Modules/Utility/RemindCommands.cs b/NadekoBot.Modules.Utility/RemindCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/RemindCommands.cs rename to NadekoBot.Modules.Utility/RemindCommands.cs diff --git a/src/NadekoBot/Modules/Utility/RepeatCommands.cs b/NadekoBot.Modules.Utility/RepeatCommands.cs similarity index 74% rename from src/NadekoBot/Modules/Utility/RepeatCommands.cs rename to NadekoBot.Modules.Utility/RepeatCommands.cs index 921c0746..2d60b9dd 100644 --- a/src/NadekoBot/Modules/Utility/RepeatCommands.cs +++ b/NadekoBot.Modules.Utility/RepeatCommands.cs @@ -147,57 +147,59 @@ namespace NadekoBot.Modules.Utility Format.Bold(rep.Repeater.Interval.Minutes.ToString()))).ConfigureAwait(false); } - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - [RequireUserPermission(GuildPermission.ManageMessages)] - [Priority(1)] - public async Task Repeat(GuildDateTime gt, [Remainder] string message) - { - if (!_service.RepeaterReady) - return; + //todo guild date time - if (string.IsNullOrWhiteSpace(message)) - return; + //[NadekoCommand, Usage, Description, Aliases] + //[RequireContext(ContextType.Guild)] + //[RequireUserPermission(GuildPermission.ManageMessages)] + //[Priority(1)] + //public async Task Repeat(GuildDateTime gt, [Remainder] string message) + //{ + // if (!_service.RepeaterReady) + // return; - var toAdd = new GuildRepeater() - { - ChannelId = Context.Channel.Id, - GuildId = Context.Guild.Id, - Interval = TimeSpan.FromHours(24), - StartTimeOfDay = gt.InputTimeUtc.TimeOfDay, - Message = message - }; + // if (string.IsNullOrWhiteSpace(message)) + // return; - using (var uow = _db.UnitOfWork) - { - var gc = uow.GuildConfigs.For(Context.Guild.Id, set => set.Include(x => x.GuildRepeaters)); + // var toAdd = new GuildRepeater() + // { + // ChannelId = Context.Channel.Id, + // GuildId = Context.Guild.Id, + // Interval = TimeSpan.FromHours(24), + // StartTimeOfDay = gt.InputTimeUtc.TimeOfDay, + // Message = message + // }; - if (gc.GuildRepeaters.Count >= 5) - return; - gc.GuildRepeaters.Add(toAdd); + // using (var uow = _db.UnitOfWork) + // { + // var gc = uow.GuildConfigs.For(Context.Guild.Id, set => set.Include(x => x.GuildRepeaters)); - await uow.CompleteAsync().ConfigureAwait(false); - } + // if (gc.GuildRepeaters.Count >= 5) + // return; + // gc.GuildRepeaters.Add(toAdd); - var rep = new RepeatRunner(_client, (SocketGuild)Context.Guild, toAdd); + // await uow.CompleteAsync().ConfigureAwait(false); + // } - _service.Repeaters.AddOrUpdate(Context.Guild.Id, new ConcurrentQueue(new[] { rep }), (key, old) => - { - old.Enqueue(rep); - return old; - }); + // var rep = new RepeatRunner(_client, (SocketGuild)Context.Guild, toAdd); - var secondPart = GetText("repeater_initial", - Format.Bold(rep.InitialInterval.Hours.ToString()), - Format.Bold(rep.InitialInterval.Minutes.ToString())); + // _service.Repeaters.AddOrUpdate(Context.Guild.Id, new ConcurrentQueue(new[] { rep }), (key, old) => + // { + // old.Enqueue(rep); + // return old; + // }); - await Context.Channel.SendConfirmAsync( - "🔁 " + GetText("repeater", - Format.Bold(((IGuildUser)Context.User).GuildPermissions.MentionEveryone ? rep.Repeater.Message : rep.Repeater.Message.SanitizeMentions()), - Format.Bold(rep.Repeater.Interval.Days.ToString()), - Format.Bold(rep.Repeater.Interval.Hours.ToString()), - Format.Bold(rep.Repeater.Interval.Minutes.ToString())) + " " + secondPart).ConfigureAwait(false); - } + // var secondPart = GetText("repeater_initial", + // Format.Bold(rep.InitialInterval.Hours.ToString()), + // Format.Bold(rep.InitialInterval.Minutes.ToString())); + + // await Context.Channel.SendConfirmAsync( + // "🔁 " + GetText("repeater", + // Format.Bold(((IGuildUser)Context.User).GuildPermissions.MentionEveryone ? rep.Repeater.Message : rep.Repeater.Message.SanitizeMentions()), + // Format.Bold(rep.Repeater.Interval.Days.ToString()), + // Format.Bold(rep.Repeater.Interval.Hours.ToString()), + // Format.Bold(rep.Repeater.Interval.Minutes.ToString())) + " " + secondPart).ConfigureAwait(false); + //} [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] diff --git a/src/NadekoBot/Modules/Utility/Services/CommandMapService.cs b/NadekoBot.Modules.Utility/Services/CommandMapService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/CommandMapService.cs rename to NadekoBot.Modules.Utility/Services/CommandMapService.cs diff --git a/src/NadekoBot/Modules/Utility/Services/ConverterService.cs b/NadekoBot.Modules.Utility/Services/ConverterService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/ConverterService.cs rename to NadekoBot.Modules.Utility/Services/ConverterService.cs diff --git a/src/NadekoBot/Modules/Utility/Services/MessageRepeaterService.cs b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/MessageRepeaterService.cs rename to NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs diff --git a/src/NadekoBot/Modules/Utility/Services/PatreonRewardsService.cs b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/PatreonRewardsService.cs rename to NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs diff --git a/src/NadekoBot/Modules/Utility/Services/RemindService.cs b/NadekoBot.Modules.Utility/Services/RemindService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/RemindService.cs rename to NadekoBot.Modules.Utility/Services/RemindService.cs diff --git a/src/NadekoBot/Modules/Utility/Services/StreamRoleService.cs b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/StreamRoleService.cs rename to NadekoBot.Modules.Utility/Services/StreamRoleService.cs diff --git a/src/NadekoBot/Modules/Utility/Services/VerboseErrorsService.cs b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Services/VerboseErrorsService.cs rename to NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs diff --git a/src/NadekoBot/Modules/Utility/StreamRoleCommands.cs b/NadekoBot.Modules.Utility/StreamRoleCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/StreamRoleCommands.cs rename to NadekoBot.Modules.Utility/StreamRoleCommands.cs diff --git a/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs b/NadekoBot.Modules.Utility/UnitConversionCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/UnitConversionCommands.cs rename to NadekoBot.Modules.Utility/UnitConversionCommands.cs diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/NadekoBot.Modules.Utility/Utility.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Utility.cs rename to NadekoBot.Modules.Utility/Utility.cs diff --git a/src/NadekoBot/Modules/Utility/VerboseErrorCommands.cs b/NadekoBot.Modules.Utility/VerboseErrorCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/VerboseErrorCommands.cs rename to NadekoBot.Modules.Utility/VerboseErrorCommands.cs diff --git a/src/NadekoBot/Modules/Xp/Club.cs b/NadekoBot.Modules.Xp/Club.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Club.cs rename to NadekoBot.Modules.Xp/Club.cs diff --git a/src/NadekoBot/Modules/Xp/Common/FullUserStats.cs b/NadekoBot.Modules.Xp/Common/FullUserStats.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Common/FullUserStats.cs rename to NadekoBot.Modules.Xp/Common/FullUserStats.cs diff --git a/src/NadekoBot/Modules/Xp/Common/LevelStats.cs b/NadekoBot.Modules.Xp/Common/LevelStats.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Common/LevelStats.cs rename to NadekoBot.Modules.Xp/Common/LevelStats.cs diff --git a/src/NadekoBot/Modules/Xp/Extensions/Extensions.cs b/NadekoBot.Modules.Xp/Extensions/Extensions.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Extensions/Extensions.cs rename to NadekoBot.Modules.Xp/Extensions/Extensions.cs diff --git a/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj b/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj new file mode 100644 index 00000000..bea9affd --- /dev/null +++ b/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.0 + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/Xp/Services/ClubService.cs b/NadekoBot.Modules.Xp/Services/ClubService.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Services/ClubService.cs rename to NadekoBot.Modules.Xp/Services/ClubService.cs diff --git a/src/NadekoBot/Modules/Xp/Services/UserCacheItem.cs b/NadekoBot.Modules.Xp/Services/UserCacheItem.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Services/UserCacheItem.cs rename to NadekoBot.Modules.Xp/Services/UserCacheItem.cs diff --git a/src/NadekoBot/Modules/Xp/Services/XpService.cs b/NadekoBot.Modules.Xp/Services/XpService.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Services/XpService.cs rename to NadekoBot.Modules.Xp/Services/XpService.cs diff --git a/src/NadekoBot/Modules/Xp/Xp.cs b/NadekoBot.Modules.Xp/Xp.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Xp.cs rename to NadekoBot.Modules.Xp/Xp.cs diff --git a/NadekoBot.sln b/NadekoBot.sln index 42b343e5..acbf7aad 100644 --- a/NadekoBot.sln +++ b/NadekoBot.sln @@ -13,6 +13,26 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot", "src\NadekoBot\NadekoBot.csproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.CustomReactions", "NadekoBot.Modules.CustomReactions\NadekoBot.Modules.CustomReactions.csproj", "{60F1217E-5E01-42DC-9B86-0FE910EDE081}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Core", "NadekoBot.Core\NadekoBot.Core.csproj", "{A6CCEFBD-DCF2-482C-9643-47664683548F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Xp", "NadekoBot.Modules.Xp\NadekoBot.Modules.Xp.csproj", "{41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Utility", "NadekoBot.Modules.Utility\NadekoBot.Modules.Utility.csproj", "{07606931-CB55-4D20-8369-4E086B00EC52}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Searches", "NadekoBot.Module.Searches\NadekoBot.Modules.Searches.csproj", "{8BEE9984-3EB3-45BE-A5CF-0DB912626B81}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Nsfw", "NadekoBot.Modules.Nsfw\NadekoBot.Modules.Nsfw.csproj", "{75ED72EC-7AB3-4B12-A2DA-3655C740B356}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Games", "NadekoBot.Modules.Games\NadekoBot.Modules.Games.csproj", "{FF6BDE61-24B4-4DC2-99EE-409EA1650180}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Gambling", "NadekoBot.Modules.Gambling\NadekoBot.Modules.Gambling.csproj", "{6436A700-694E-412C-92AE-B793FCD44E84}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Pokemon", "NadekoBot.Modules.Pokemon\NadekoBot.Modules.Pokemon.csproj", "{30463C26-555B-4760-9459-A16DFA015DFA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Music", "NadekoBot.Modules.Music\NadekoBot.Modules.Music.csproj", "{674E28A6-30B1-413D-BBD3-E5F71614A00F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,12 +46,82 @@ Global {45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.Build.0 = Release|Any CPU {45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.ActiveCfg = Release|Any CPU {45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.Build.0 = Release|Any CPU + {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60F1217E-5E01-42DC-9B86-0FE910EDE081}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {60F1217E-5E01-42DC-9B86-0FE910EDE081}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Release|Any CPU.Build.0 = Release|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Release|Any CPU.Build.0 = Release|Any CPU + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}.Release|Any CPU.Build.0 = Release|Any CPU + {07606931-CB55-4D20-8369-4E086B00EC52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07606931-CB55-4D20-8369-4E086B00EC52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07606931-CB55-4D20-8369-4E086B00EC52}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {07606931-CB55-4D20-8369-4E086B00EC52}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {07606931-CB55-4D20-8369-4E086B00EC52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07606931-CB55-4D20-8369-4E086B00EC52}.Release|Any CPU.Build.0 = Release|Any CPU + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Release|Any CPU.Build.0 = Release|Any CPU + {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.Release|Any CPU.Build.0 = Release|Any CPU + {FF6BDE61-24B4-4DC2-99EE-409EA1650180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF6BDE61-24B4-4DC2-99EE-409EA1650180}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF6BDE61-24B4-4DC2-99EE-409EA1650180}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {FF6BDE61-24B4-4DC2-99EE-409EA1650180}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {FF6BDE61-24B4-4DC2-99EE-409EA1650180}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF6BDE61-24B4-4DC2-99EE-409EA1650180}.Release|Any CPU.Build.0 = Release|Any CPU + {6436A700-694E-412C-92AE-B793FCD44E84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6436A700-694E-412C-92AE-B793FCD44E84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6436A700-694E-412C-92AE-B793FCD44E84}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {6436A700-694E-412C-92AE-B793FCD44E84}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {6436A700-694E-412C-92AE-B793FCD44E84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6436A700-694E-412C-92AE-B793FCD44E84}.Release|Any CPU.Build.0 = Release|Any CPU + {30463C26-555B-4760-9459-A16DFA015DFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30463C26-555B-4760-9459-A16DFA015DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30463C26-555B-4760-9459-A16DFA015DFA}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {30463C26-555B-4760-9459-A16DFA015DFA}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {30463C26-555B-4760-9459-A16DFA015DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30463C26-555B-4760-9459-A16DFA015DFA}.Release|Any CPU.Build.0 = Release|Any CPU + {674E28A6-30B1-413D-BBD3-E5F71614A00F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {674E28A6-30B1-413D-BBD3-E5F71614A00F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {674E28A6-30B1-413D-BBD3-E5F71614A00F}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {674E28A6-30B1-413D-BBD3-E5F71614A00F}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {674E28A6-30B1-413D-BBD3-E5F71614A00F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {674E28A6-30B1-413D-BBD3-E5F71614A00F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {45EC1473-C678-4857-A544-07DFE0D0B478} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {60F1217E-5E01-42DC-9B86-0FE910EDE081} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {A6CCEFBD-DCF2-482C-9643-47664683548F} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {07606931-CB55-4D20-8369-4E086B00EC52} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {8BEE9984-3EB3-45BE-A5CF-0DB912626B81} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {75ED72EC-7AB3-4B12-A2DA-3655C740B356} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {FF6BDE61-24B4-4DC2-99EE-409EA1650180} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {6436A700-694E-412C-92AE-B793FCD44E84} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {30463C26-555B-4760-9459-A16DFA015DFA} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {674E28A6-30B1-413D-BBD3-E5F71614A00F} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5F3F555C-855F-4BE8-B526-D062D3E8ACA4} diff --git a/docs/Placeholders.md b/docs/Placeholders.md index a698d175..605d6093 100644 --- a/docs/Placeholders.md +++ b/docs/Placeholders.md @@ -19,6 +19,7 @@ Some features have their own specific placeholders which are noted in that featu - `%rngX-Y%` - Replace X and Y with the range (for example `%rng5-10%` - random between 5 and 10) - `%time%` - Bot time - `%server_time%` - Time on this server, set with `.timezone` command +- `%target%` - Used only in custom reactions, it shows the part of the message after the trigger **If you're using placeholders in embeds, don't use %user% and %mention% in titles, footers and field names. They will not show properly.** diff --git a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs b/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs deleted file mode 100644 index d80fbd52..00000000 --- a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Linq; -using System.Threading.Tasks; -using Discord.Commands; -using NadekoBot.Modules.CustomReactions.Services; -using NadekoBot.Services; - -namespace NadekoBot.Common.TypeReaders -{ - public class CommandTypeReader : TypeReader - { - public override Task Read(ICommandContext context, string input, IServiceProvider services) - { - var _cmds = ((INServiceProvider)services).GetService(); - var _cmdHandler = ((INServiceProvider)services).GetService(); - input = input.ToUpperInvariant(); - var prefix = _cmdHandler.GetPrefix(context.Guild); - if (!input.StartsWith(prefix.ToUpperInvariant())) - return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found.")); - - input = input.Substring(prefix.Length); - - var cmd = _cmds.Commands.FirstOrDefault(c => - c.Aliases.Select(a => a.ToUpperInvariant()).Contains(input)); - if (cmd == null) - return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found.")); - - return Task.FromResult(TypeReaderResult.FromSuccess(cmd)); - } - } - - public class CommandOrCrTypeReader : CommandTypeReader - { - public override async Task Read(ICommandContext context, string input, IServiceProvider services) - { - input = input.ToUpperInvariant(); - - var _crs = ((INServiceProvider)services).GetService(); - - if (_crs.GlobalReactions.Any(x => x.Trigger.ToUpperInvariant() == input)) - { - return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); - } - var guild = context.Guild; - if (guild != null) - { - if (_crs.GuildReactions.TryGetValue(guild.Id, out var crs)) - { - if (crs.Concat(_crs.GlobalReactions).Any(x => x.Trigger.ToUpperInvariant() == input)) - { - return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); - } - } - } - - var cmd = await base.Read(context, input, services); - if (cmd.IsSuccess) - { - return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name)); - } - return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or cr found."); - } - } - - public class CommandOrCrInfo - { - public string Name { get; set; } - - public CommandOrCrInfo(string input) - { - this.Name = input; - } - } -} diff --git a/src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs b/src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs deleted file mode 100644 index b1fa1f00..00000000 --- a/src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Threading.Tasks; -using Discord.Commands; -using NadekoBot.Modules.Administration.Services; - -namespace NadekoBot.Common.TypeReaders -{ - public class GuildDateTimeTypeReader : TypeReader - { - public override Task Read(ICommandContext context, string input, IServiceProvider services) - { - var _gts = (GuildTimezoneService)services.GetService(typeof(GuildTimezoneService)); - if (!DateTime.TryParse(input, out var dt)) - return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Input string is in an incorrect format.")); - - var tz = _gts.GetTimeZoneOrUtc(context.Guild.Id); - - return Task.FromResult(TypeReaderResult.FromSuccess(new GuildDateTime(tz, dt))); - } - } - - public class GuildDateTime - { - public TimeZoneInfo Timezone { get; } - public DateTime CurrentGuildTime { get; } - public DateTime InputTime { get; } - public DateTime InputTimeUtc { get; } - - private GuildDateTime() { } - - public GuildDateTime(TimeZoneInfo guildTimezone, DateTime inputTime) - { - var now = DateTime.UtcNow; - Timezone = guildTimezone; - CurrentGuildTime = TimeZoneInfo.ConvertTime(now, TimeZoneInfo.Utc, Timezone); - InputTime = inputTime; - InputTimeUtc = TimeZoneInfo.ConvertTime(inputTime, Timezone, TimeZoneInfo.Utc); - } - } -} diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index 816e2916..86e064a1 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -19,35 +19,20 @@ - - - - - - - + Always - - Always - PreserveNewest PreserveNewest - - PreserveNewest - - - Never - - + @@ -78,4 +63,9 @@ + + + + + From 33ac43e1b52547e7861f8fb494b794b5517c33f5 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 5 Oct 2017 00:51:12 +0200 Subject: [PATCH 002/192] Packages can be loaded/unloaded. IUnloadableService interface added whose method Unload, if service implements it, will be called when the module is unloaded. --- .../TypeReaders/BotCommandTypeReader.cs | 59 ++-- .../Modules/Administration/ModuleCommands.cs | 64 ++++ .../Modules/Administration/SelfCommands.cs | 1 + .../Services/PackagesService.cs | 31 ++ .../CustomReactions}/CustomReactions.cs | 0 .../CustomReactions}/Extensions/Extensions.cs | 0 .../Services/CustomReactionsService.cs | 0 NadekoBot.Core/NadekoBot.Core.csproj | 3 - NadekoBot.Core/Services/INService.cs | 12 +- NadekoBot.Core/Services/NadekoBot.cs | 105 +++++-- NadekoBot.Core/Services/ServiceProvider.cs | 121 ++++---- .../NadekoBot.Modules.Searches.csproj | 7 + .../NadekoBot.Modules.CustomReactions.csproj | 7 + .../AnimalRacingCommands.cs | 15 +- .../CurrencyEventsCommands.cs | 2 +- .../NadekoBot.Modules.Gambling.csproj | 7 + .../Services/AnimalRaceService.cs | 21 ++ NadekoBot.Modules.Gambling/SlotCommands.cs | 6 +- .../WaifuClaimCommands.cs | 2 +- NadekoBot.Modules.Games/AcropobiaCommands.cs | 11 +- NadekoBot.Modules.Games/Common/TicTacToe.cs | 277 +++++++++++++++++ NadekoBot.Modules.Games/Connect4Commands.cs | 17 +- NadekoBot.Modules.Games/HangmanCommands.cs | 13 +- .../NadekoBot.Modules.Games.csproj | 7 + NadekoBot.Modules.Games/NunchiCommands.cs | 12 +- .../PlantAndPickCommands.cs | 16 +- .../Services/GamesService.cs | 46 ++- .../SpeedTypingCommands.cs | 9 +- NadekoBot.Modules.Games/TicTacToeCommands.cs | 282 +----------------- NadekoBot.Modules.Games/TriviaCommands.cs | 17 +- NadekoBot.Modules.Music/Music.cs | 13 +- .../NadekoBot.Modules.Music.csproj | 8 +- .../Services/MusicService.cs | 16 +- NadekoBot.Modules.Nsfw/NSFW.cs | 1 + .../NadekoBot.Modules.Nsfw.csproj | 7 + .../NadekoBot.Modules.Pokemon.csproj | 7 + .../NadekoBot.Modules.Utility.csproj | 7 + .../Services/ConverterService.cs | 8 +- .../Services/MessageRepeaterService.cs | 2 +- .../Services/PatreonRewardsService.cs | 13 +- .../Services/RemindService.cs | 16 +- .../Services/StreamRoleService.cs | 14 +- .../Services/VerboseErrorsService.cs | 11 +- NadekoBot.Modules.Xp/Club.cs | 3 +- .../NadekoBot.Modules.Xp.csproj | 7 + NadekoBot.Modules.Xp/Services/ClubService.cs | 2 - NadekoBot.Modules.Xp/Services/XpService.cs | 31 +- NadekoBot.Modules.Xp/Xp.cs | 1 - NadekoBot.sln | 27 +- src/NadekoBot/NadekoBot.csproj | 12 +- src/NadekoBot/Program.cs | 10 +- .../_strings/ResponseStrings.ar.json | 0 .../_strings/ResponseStrings.cs-CZ.json | 0 .../_strings/ResponseStrings.da-DK.json | 0 .../_strings/ResponseStrings.de-DE.json | 0 .../_strings/ResponseStrings.en-US.json | 0 .../_strings/ResponseStrings.es-ES.json | 0 .../_strings/ResponseStrings.fr-FR.json | 0 .../_strings/ResponseStrings.he-IL.json | 0 .../_strings/ResponseStrings.id-ID.json | 0 .../_strings/ResponseStrings.it-IT.json | 0 .../_strings/ResponseStrings.ja-JP.json | 0 .../_strings/ResponseStrings.ko-KR.json | 0 .../_strings/ResponseStrings.nb-NO.json | 0 .../_strings/ResponseStrings.nl-NL.json | 0 .../_strings/ResponseStrings.pl-PL.json | 0 .../_strings/ResponseStrings.pt-BR.json | 0 .../_strings/ResponseStrings.ro-RO.json | 0 .../_strings/ResponseStrings.ru-RU.json | 0 .../_strings/ResponseStrings.sr-cyrl-rs.json | 0 .../_strings/ResponseStrings.sv-SE.json | 0 .../_strings/ResponseStrings.tr-TR.json | 0 .../_strings/ResponseStrings.zh-CN.json | 0 .../_strings/ResponseStrings.zh-TW.json | 0 74 files changed, 866 insertions(+), 520 deletions(-) create mode 100644 NadekoBot.Core/Modules/Administration/ModuleCommands.cs create mode 100644 NadekoBot.Core/Modules/Administration/Services/PackagesService.cs rename {NadekoBot.Modules.CustomReactions => NadekoBot.Core/Modules/CustomReactions}/CustomReactions.cs (100%) rename {NadekoBot.Modules.CustomReactions => NadekoBot.Core/Modules/CustomReactions}/Extensions/Extensions.cs (100%) rename {NadekoBot.Modules.CustomReactions => NadekoBot.Core/Modules/CustomReactions}/Services/CustomReactionsService.cs (100%) create mode 100644 NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs create mode 100644 NadekoBot.Modules.Games/Common/TicTacToe.cs rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.ar.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.cs-CZ.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.da-DK.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.de-DE.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.en-US.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.es-ES.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.fr-FR.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.he-IL.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.id-ID.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.it-IT.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.ja-JP.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.ko-KR.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.nb-NO.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.nl-NL.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.pl-PL.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.pt-BR.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.ro-RO.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.ru-RU.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.sr-cyrl-rs.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.sv-SE.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.tr-TR.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.zh-CN.json (100%) rename {NadekoBot.Core => src/NadekoBot}/_strings/ResponseStrings.zh-TW.json (100%) diff --git a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs index 32ba2151..a0da4a2c 100644 --- a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; using NadekoBot.Services; +using NadekoBot.Modules.CustomReactions.Services; namespace NadekoBot.Common.TypeReaders { @@ -28,38 +29,38 @@ namespace NadekoBot.Common.TypeReaders } } //todo dependency on the module - //public class CommandOrCrTypeReader : CommandTypeReader - //{ - // public override async Task Read(ICommandContext context, string input, IServiceProvider services) - // { - // input = input.ToUpperInvariant(); + public class CommandOrCrTypeReader : CommandTypeReader + { + public override async Task Read(ICommandContext context, string input, IServiceProvider services) + { + input = input.ToUpperInvariant(); - // var _crs = ((INServiceProvider)services).GetService(); + var _crs = ((INServiceProvider)services).GetService(); - // if (_crs.GlobalReactions.Any(x => x.Trigger.ToUpperInvariant() == input)) - // { - // return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); - // } - // var guild = context.Guild; - // if (guild != null) - // { - // if (_crs.GuildReactions.TryGetValue(guild.Id, out var crs)) - // { - // if (crs.Concat(_crs.GlobalReactions).Any(x => x.Trigger.ToUpperInvariant() == input)) - // { - // return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); - // } - // } - // } + if (_crs.GlobalReactions.Any(x => x.Trigger.ToUpperInvariant() == input)) + { + return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); + } + var guild = context.Guild; + if (guild != null) + { + if (_crs.GuildReactions.TryGetValue(guild.Id, out var crs)) + { + if (crs.Concat(_crs.GlobalReactions).Any(x => x.Trigger.ToUpperInvariant() == input)) + { + return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input)); + } + } + } - // var cmd = await base.Read(context, input, services); - // if (cmd.IsSuccess) - // { - // return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name)); - // } - // return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or cr found."); - // } - //} + var cmd = await base.Read(context, input, services); + if (cmd.IsSuccess) + { + return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name)); + } + return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or cr found."); + } + } public class CommandOrCrInfo { diff --git a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs new file mode 100644 index 00000000..75f78aa7 --- /dev/null +++ b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs @@ -0,0 +1,64 @@ +using Discord.Commands; +using NadekoBot.Common.Attributes; +using NadekoBot.Core.Modules.Administration.Services; +using NadekoBot.Extensions; +using System; +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Administration +{ + public partial class Administration + { + [Group] + public class PackagesCommands : NadekoSubmodule + { + private readonly NadekoBot _bot; + + public PackagesCommands(NadekoBot bot) + { + _bot = bot; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task PackageList() + { + _service.ReloadAvailablePackages(); + await Context.Channel.SendConfirmAsync(string.Join("\n", _service.Packages)); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task PackageUnload(string name) + { + if (name.Contains(":") || name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) + return; + name = name.ToTitleCase(); + var package = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, + "modules", + $"NadekoBot.Modules.{name}", + $"NadekoBot.Modules.{name}.dll")); + + await _bot.UnloadPackage(name).ConfigureAwait(false); + await ReplyAsync(":ok:"); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task PackageLoad(string name) + { + if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) + return; + name = name.ToTitleCase(); + + await _bot.LoadPackage(name); + await ReplyAsync(":ok:"); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs index 65729695..0250ede9 100644 --- a/NadekoBot.Core/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -48,6 +48,7 @@ namespace NadekoBot.Modules.Administration [OwnerOnly] public async Task StartupCommandAdd([Remainder] string cmdText) { + //todo don't let .die be a startup command var guser = ((IGuildUser)Context.User); var cmd = new StartupCommand() { diff --git a/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs b/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs new file mode 100644 index 00000000..a28af228 --- /dev/null +++ b/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs @@ -0,0 +1,31 @@ +using NadekoBot.Services; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; + +namespace NadekoBot.Core.Modules.Administration.Services +{ + public class PackagesService : INService + { + public IEnumerable Packages { get; private set; } + + public PackagesService() + { + ReloadAvailablePackages(); + } + + public void ReloadAvailablePackages() + { + Packages = Directory.GetDirectories(Path.Combine(AppContext.BaseDirectory, "modules\\"), "NadekoBot.Modules.*", SearchOption.AllDirectories) + .SelectMany(x => Directory.GetFiles(x, "NadekoBot.Modules.*.dll")) + .Select(x => Path.GetFileNameWithoutExtension(x)) + .Select(x => + { + var m = Regex.Match(x, @"NadekoBot\.Modules\.(?.*)"); + return m.Groups["name"].Value; + }); + } + } +} diff --git a/NadekoBot.Modules.CustomReactions/CustomReactions.cs b/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs similarity index 100% rename from NadekoBot.Modules.CustomReactions/CustomReactions.cs rename to NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs diff --git a/NadekoBot.Modules.CustomReactions/Extensions/Extensions.cs b/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs similarity index 100% rename from NadekoBot.Modules.CustomReactions/Extensions/Extensions.cs rename to NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs diff --git a/NadekoBot.Modules.CustomReactions/Services/CustomReactionsService.cs b/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs similarity index 100% rename from NadekoBot.Modules.CustomReactions/Services/CustomReactionsService.cs rename to NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs diff --git a/NadekoBot.Core/NadekoBot.Core.csproj b/NadekoBot.Core/NadekoBot.Core.csproj index 209c92c0..e7844d34 100644 --- a/NadekoBot.Core/NadekoBot.Core.csproj +++ b/NadekoBot.Core/NadekoBot.Core.csproj @@ -2,9 +2,6 @@ netcoreapp2.0 - - - latest diff --git a/NadekoBot.Core/Services/INService.cs b/NadekoBot.Core/Services/INService.cs index 13bbbeea..ba4d29c4 100644 --- a/NadekoBot.Core/Services/INService.cs +++ b/NadekoBot.Core/Services/INService.cs @@ -1,4 +1,6 @@ -namespace NadekoBot.Services +using System.Threading.Tasks; + +namespace NadekoBot.Services { /// /// All services must implement this interface in order to be auto-discovered by the DI system @@ -7,4 +9,12 @@ { } + + /// + /// All services which require cleanup after they are unloaded must implement this interface + /// + public interface IUnloadableService + { + Task Unload(); + } } diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index b8f62ac9..52fc2926 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -61,17 +61,6 @@ namespace NadekoBot if (shardId < 0) throw new ArgumentOutOfRangeException(nameof(shardId)); - //var obj = JsonConvert.DeserializeObject>(File.ReadAllText("./data/command_strings.json")) - // .ToDictionary(x => x.Key, x => new CommandData2 - // { - // Cmd = x.Value.Cmd, - // Desc = x.Value.Desc, - // Usage = x.Value.Usage.Select(y => y.Substring(1, y.Length - 2)).ToArray(), - // }); - - //File.WriteAllText("./data/command_strings.json", JsonConvert.SerializeObject(obj, Formatting.Indented)); - - LogSetup.SetupLogger(); _log = LogManager.GetCurrentClassLogger(); TerribleElevatedPermissionCheck(); @@ -142,19 +131,17 @@ namespace NadekoBot //var localization = new Localization(_botConfig.Locale, AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.Locale), Db); //initialize Services - Services = new NServiceProvider.ServiceProviderBuilder() + Services = new NServiceProvider() .AddManual(Credentials) .AddManual(_db) .AddManual(Client) .AddManual(CommandService) .AddManual(botConfigProvider) - //.AddManual(localization) .AddManual>(AllGuildConfigs) //todo wrap this .AddManual(this) .AddManual(uow) - .AddManual(new RedisCache(Client.CurrentUser.Id)) - .LoadFrom(Assembly.GetEntryAssembly()) - .Build(); + .AddManual(new RedisCache(Client.CurrentUser.Id)); + Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler))); var commandHandler = Services.GetService(); commandHandler.AddServices(Services); @@ -163,12 +150,13 @@ namespace NadekoBot CommandService.AddTypeReader(new PermissionActionTypeReader()); CommandService.AddTypeReader(new CommandTypeReader()); //todo module dependency - //CommandService.AddTypeReader(new CommandOrCrTypeReader()); + CommandService.AddTypeReader(new CommandOrCrTypeReader()); CommandService.AddTypeReader(new ModuleTypeReader(CommandService)); CommandService.AddTypeReader(new ModuleOrCrTypeReader(CommandService)); CommandService.AddTypeReader(new GuildTypeReader(Client)); //CommandService.AddTypeReader(new GuildDateTimeTypeReader()); } + Services.Unload(typeof(IUnitOfWork)); // unload it after the startup } private async Task LoginAsync(string token) @@ -193,7 +181,7 @@ namespace NadekoBot } finally { - + } }); return Task.CompletedTask; @@ -225,8 +213,8 @@ namespace NadekoBot public async Task RunAsync(params string[] args) { - if(Client.ShardId == 0) - _log.Info("Starting NadekoBot v" + StatsService.BotVersion); + if (Client.ShardId == 0) + _log.Info("Starting NadekoBot v" + StatsService.BotVersion); var sw = Stopwatch.StartNew(); @@ -255,7 +243,7 @@ namespace NadekoBot #endif //unload modules which are not available on the public bot - if(isPublicNadeko) + if (isPublicNadeko) CommandService .Modules .ToArray() @@ -372,5 +360,80 @@ namespace NadekoBot var sub = Services.GetService().Redis.GetSubscriber(); return sub.PublishAsync(Client.CurrentUser.Id + "_status.game_set", JsonConvert.SerializeObject(obj)); } + + private readonly Dictionary> _packageModules = new Dictionary>(); + private readonly Dictionary> _packageTypes = new Dictionary>(); + private readonly SemaphoreSlim _packageLocker = new SemaphoreSlim(1, 1); + + /// + /// Unloads a package + /// + /// Package name. Case sensitive. + /// Whether the unload is successful. + public async Task UnloadPackage(string name) + { + await _packageLocker.WaitAsync().ConfigureAwait(false); + try + { + if (!_packageModules.TryGetValue(name, out var modules)) + return false; + + var i = 0; + foreach (var m in modules) + { + await CommandService.RemoveModuleAsync(m).ConfigureAwait(false); + i++; + } + _log.Info("Unloaded {0} modules.", i); + + if (_packageTypes.TryGetValue(name, out var types)) + { + i = 0; + foreach (var t in types) + { + var obj = Services.Unload(t); + if (obj is IUnloadableService s) + await s.Unload().ConfigureAwait(false); + i++; + } + + _log.Info("Unloaded {0} types.", i); + } + return true; + } + finally + { + _packageLocker.Release(); + } + } + /// + /// Loads a package + /// + /// Name of the package to load. Case sensitive. + /// Whether the load is successful. + public async Task LoadPackage(string name) + { + await _packageLocker.WaitAsync().ConfigureAwait(false); + try + { + if (_packageModules.ContainsKey(name)) + return false; + + var package = Assembly.LoadFile(Path.Combine(AppContext.BaseDirectory, + "modules", + $"NadekoBot.Modules.{name}", + $"NadekoBot.Modules.{name}.dll")); + var types = Services.LoadFrom(package); + var added = await CommandService.AddModulesAsync(package).ConfigureAwait(false); + _log.Info("Loaded {0} modules and {1} types.", added.Count(), types.Count()); + _packageModules.Add(name, added); + _packageTypes.Add(name, types); + return true; + } + finally + { + _packageLocker.Release(); + } + } } } diff --git a/NadekoBot.Core/Services/ServiceProvider.cs b/NadekoBot.Core/Services/ServiceProvider.cs index 6efe0a2b..c0c8df7c 100644 --- a/NadekoBot.Core/Services/ServiceProvider.cs +++ b/NadekoBot.Core/Services/ServiceProvider.cs @@ -1,6 +1,5 @@ using System; using System.Collections; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; using System.Reflection; @@ -17,57 +16,83 @@ namespace NadekoBot.Services public interface INServiceProvider : IServiceProvider, IEnumerable { T GetService(); + IEnumerable LoadFrom(Assembly assembly); + INServiceProvider AddManual(T obj); + object Unload(Type t); } public class NServiceProvider : INServiceProvider { - public class ServiceProviderBuilder + private readonly object _locker = new object(); + private readonly Logger _log; + + public readonly Dictionary _services = new Dictionary(); + public IReadOnlyDictionary Services => _services; + + public NServiceProvider() { - private ConcurrentDictionary _dict = new ConcurrentDictionary(); - private readonly Logger _log; + _log = LogManager.GetCurrentClassLogger(); + } - public ServiceProviderBuilder() + public T GetService() + { + return (T)((IServiceProvider)(this)).GetService(typeof(T)); + } + + object IServiceProvider.GetService(Type serviceType) + { + _services.TryGetValue(serviceType, out var toReturn); + return toReturn; + } + + public INServiceProvider AddManual(T obj) + { + lock (_locker) { - _log = LogManager.GetCurrentClassLogger(); + _services.TryAdd(typeof(T), obj); } + return this; + } - public ServiceProviderBuilder AddManual(T obj) + public IEnumerable LoadFrom(Assembly assembly) + { + List addedTypes = new List(); + + Type[] allTypes; + try { - _dict.TryAdd(typeof(T), obj); - return this; + allTypes = assembly.GetTypes(); } - - public NServiceProvider Build() + catch (ReflectionTypeLoadException ex) { - return new NServiceProvider(_dict); + Console.WriteLine(ex.LoaderExceptions[0]); + return Enumerable.Empty(); } - - public ServiceProviderBuilder LoadFrom(Assembly assembly) - { - var allTypes = assembly.GetTypes(); - var services = new Queue(allTypes - .Where(x => x.GetInterfaces().Contains(typeof(INService)) - && !x.GetTypeInfo().IsInterface && !x.GetTypeInfo().IsAbstract - + var services = new Queue(allTypes + .Where(x => x.GetInterfaces().Contains(typeof(INService)) + && !x.GetTypeInfo().IsInterface && !x.GetTypeInfo().IsAbstract #if GLOBAL_NADEKO - && x.GetTypeInfo().GetCustomAttribute() == null + && x.GetTypeInfo().GetCustomAttribute() == null #endif ) - .ToArray()); + .ToArray()); - var interfaces = new HashSet(allTypes - .Where(x => x.GetInterfaces().Contains(typeof(INService)) - && x.GetTypeInfo().IsInterface)); + addedTypes.AddRange(services); - var alreadyFailed = new Dictionary(); + var interfaces = new HashSet(allTypes + .Where(x => x.GetInterfaces().Contains(typeof(INService)) + && x.GetTypeInfo().IsInterface)); + var alreadyFailed = new Dictionary(); + lock (_locker) + { var sw = Stopwatch.StartNew(); var swInstance = new Stopwatch(); while (services.Count > 0) { var type = services.Dequeue(); //get a type i need to make an instance of - if (_dict.TryGetValue(type, out _)) // if that type is already instantiated, skip + if (_services.TryGetValue(type, out _)) // if that type is already instantiated, skip continue; var ctor = type.GetConstructors()[0]; @@ -79,7 +104,7 @@ namespace NadekoBot.Services var args = new List(argTypes.Length); foreach (var arg in argTypes) //get constructor arguments from the dictionary of already instantiated types { - if (_dict.TryGetValue(arg, out var argObj)) //if i got current one, add it to the list of instances and move on + if (_services.TryGetValue(arg, out var argObj)) //if i got current one, add it to the list of instances and move on args.Add(argObj); else //if i failed getting it, add it to the end, and break { @@ -97,7 +122,7 @@ namespace NadekoBot.Services } if (args.Count != argTypes.Length) continue; - // _log.Info("Loading " + type.Name); + swInstance.Restart(); var instance = ctor.Invoke(args.ToArray()); swInstance.Stop(); @@ -105,38 +130,34 @@ namespace NadekoBot.Services _log.Info($"{type.Name} took {swInstance.Elapsed.TotalSeconds:F2}s to load."); var interfaceType = interfaces.FirstOrDefault(x => instance.GetType().GetInterfaces().Contains(x)); if (interfaceType != null) - _dict.TryAdd(interfaceType, instance); + { + addedTypes.Add(interfaceType); + _services.TryAdd(interfaceType, instance); + } - _dict.TryAdd(type, instance); + _services.TryAdd(type, instance); } sw.Stop(); _log.Info($"All services loaded in {sw.Elapsed.TotalSeconds:F2}s"); - - return this; } + return addedTypes; } - private readonly ImmutableDictionary _services; - - private NServiceProvider() { } - public NServiceProvider(IDictionary services) + public object Unload(Type t) { - this._services = services.ToImmutableDictionary(); - } - - public T GetService() - { - return (T)((IServiceProvider)(this)).GetService(typeof(T)); - } - - object IServiceProvider.GetService(Type serviceType) - { - _services.TryGetValue(serviceType, out var toReturn); - return toReturn; + lock (_locker) + { + if (_services.TryGetValue(t, out var obj)) + { + _services.Remove(t); + return obj; + } + } + return null; } IEnumerator IEnumerable.GetEnumerator() => _services.Values.GetEnumerator(); public IEnumerator GetEnumerator() => _services.Values.GetEnumerator(); } -} +} \ No newline at end of file diff --git a/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj b/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj index f7a76051..0ec5a3a3 100644 --- a/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj +++ b/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj @@ -2,6 +2,13 @@ netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj b/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj index bea9affd..11eae295 100644 --- a/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj +++ b/NadekoBot.Modules.CustomReactions/NadekoBot.Modules.CustomReactions.csproj @@ -2,6 +2,13 @@ netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs b/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs index 2802e6e1..20590658 100644 --- a/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs +++ b/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs @@ -4,27 +4,24 @@ using Discord.WebSocket; using NadekoBot.Extensions; using NadekoBot.Services; using System; -using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; using NadekoBot.Modules.Gambling.Common.AnimalRacing; +using NadekoBot.Modules.Gambling.Services; namespace NadekoBot.Modules.Gambling { public partial class Gambling { [Group] - public class AnimalRacingCommands : NadekoSubmodule + public class AnimalRacingCommands : NadekoSubmodule { private readonly IBotConfigProvider _bc; private readonly CurrencyService _cs; private readonly DiscordSocketClient _client; - - public static ConcurrentDictionary AnimalRaces { get; } = new ConcurrentDictionary(); - public AnimalRacingCommands(IBotConfigProvider bc, CurrencyService cs, DiscordSocketClient client) { _bc = bc; @@ -39,7 +36,7 @@ namespace NadekoBot.Modules.Gambling public Task Race() { var ar = new AnimalRace(_cs, _bc.BotConfig.RaceAnimals.Shuffle().ToArray()); - if (!AnimalRaces.TryAdd(Context.Guild.Id, ar)) + if (!_service.AnimalRaces.TryAdd(Context.Guild.Id, ar)) return Context.Channel.SendErrorAsync(GetText("animal_race"), GetText("animal_race_already_started")); ar.Initialize(); @@ -66,7 +63,7 @@ namespace NadekoBot.Modules.Gambling Task Ar_OnEnded(AnimalRace race) { _client.MessageReceived -= _client_MessageReceived; - AnimalRaces.TryRemove(Context.Guild.Id, out _); + _service.AnimalRaces.TryRemove(Context.Guild.Id, out _); var winner = race.FinishedUsers[0]; if (race.FinishedUsers[0].Bet > 0) { @@ -126,7 +123,7 @@ namespace NadekoBot.Modules.Gambling private Task Ar_OnStartingFailed(AnimalRace race) { - AnimalRaces.TryRemove(Context.Guild.Id, out _); + _service.AnimalRaces.TryRemove(Context.Guild.Id, out _); return ReplyErrorLocalized("animal_race_failed"); } @@ -134,7 +131,7 @@ namespace NadekoBot.Modules.Gambling [RequireContext(ContextType.Guild)] public async Task JoinRace(int amount = 0) { - if (!AnimalRaces.TryGetValue(Context.Guild.Id, out var ar)) + if (!_service.AnimalRaces.TryGetValue(Context.Guild.Id, out var ar)) { await ReplyErrorLocalized("race_not_exist").ConfigureAwait(false); return; diff --git a/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs index 2ebaba46..7ea62330 100644 --- a/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs +++ b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs @@ -17,6 +17,7 @@ using NadekoBot.Services.Database.Models; namespace NadekoBot.Modules.Gambling { + //todo mess, needs unload thing too - refactor public partial class Gambling { [Group] @@ -274,7 +275,6 @@ namespace NadekoBot.Modules.Gambling _log.Warn("Stopping flower reaction event because it expired."); await End(); - } } } diff --git a/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj b/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj index 9ee6f9f6..b97a40e1 100644 --- a/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj +++ b/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj @@ -2,6 +2,13 @@ netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs b/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs new file mode 100644 index 00000000..53776b78 --- /dev/null +++ b/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs @@ -0,0 +1,21 @@ +using System.Threading.Tasks; +using NadekoBot.Services; +using System.Collections.Concurrent; +using NadekoBot.Modules.Gambling.Common.AnimalRacing; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class AnimalRaceService : INService, IUnloadableService + { + public ConcurrentDictionary AnimalRaces { get; } = new ConcurrentDictionary(); + + public Task Unload() + { + foreach (var kvp in AnimalRaces) + { + try { kvp.Value.Dispose(); } catch { } + } + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Modules.Gambling/SlotCommands.cs b/NadekoBot.Modules.Gambling/SlotCommands.cs index 43cfb8d4..d77268c8 100644 --- a/NadekoBot.Modules.Gambling/SlotCommands.cs +++ b/NadekoBot.Modules.Gambling/SlotCommands.cs @@ -176,7 +176,7 @@ namespace NadekoBot.Modules.Gambling using (var file = _images.SlotEmojis[numbers[i]].ToStream()) using (var randomImage = ImageSharp.Image.Load(file)) { - bgImage.DrawImage(randomImage, 100, default(Size), new Point(95 + 142 * i, 330)); + bgImage.DrawImage(randomImage, 100, default, new Point(95 + 142 * i, 330)); } } @@ -189,7 +189,7 @@ namespace NadekoBot.Modules.Gambling using (var fs = _images.SlotNumbers[digit].ToStream()) using (var img = ImageSharp.Image.Load(fs)) { - bgImage.DrawImage(img, 100, default(Size), new Point(230 - n * 16, 462)); + bgImage.DrawImage(img, 100, default, new Point(230 - n * 16, 462)); } n++; } while ((printWon /= 10) != 0); @@ -202,7 +202,7 @@ namespace NadekoBot.Modules.Gambling using (var fs = _images.SlotNumbers[digit].ToStream()) using (var img = ImageSharp.Image.Load(fs)) { - bgImage.DrawImage(img, 100, default(Size), new Point(395 - n * 16, 462)); + bgImage.DrawImage(img, 100, default, new Point(395 - n * 16, 462)); } n++; } while ((printAmount /= 10) != 0); diff --git a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs index 5d46f976..0709a5ee 100644 --- a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs +++ b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Gambling Depraved, Harlot } - + //todo unclaimed waifus should lose 5% of their value a day [Group] public class WaifuClaimCommands : NadekoSubmodule { diff --git a/NadekoBot.Modules.Games/AcropobiaCommands.cs b/NadekoBot.Modules.Games/AcropobiaCommands.cs index f933d3bf..7b98c638 100644 --- a/NadekoBot.Modules.Games/AcropobiaCommands.cs +++ b/NadekoBot.Modules.Games/AcropobiaCommands.cs @@ -2,26 +2,23 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Acrophobia; +using NadekoBot.Modules.Games.Services; namespace NadekoBot.Modules.Games { public partial class Games { [Group] - public class AcropobiaCommands : NadekoSubmodule + public class AcropobiaCommands : NadekoSubmodule { private readonly DiscordSocketClient _client; - //channelId, game - public static ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); - public AcropobiaCommands(DiscordSocketClient client) { _client = client; @@ -36,7 +33,7 @@ namespace NadekoBot.Modules.Games var channel = (ITextChannel)Context.Channel; var game = new Acrophobia(submissionTime); - if (AcrophobiaGames.TryAdd(channel.Id, game)) + if (_service.AcrophobiaGames.TryAdd(channel.Id, game)) { try { @@ -50,7 +47,7 @@ namespace NadekoBot.Modules.Games finally { _client.MessageReceived -= _client_MessageReceived; - AcrophobiaGames.TryRemove(channel.Id, out game); + _service.AcrophobiaGames.TryRemove(channel.Id, out game); game.Dispose(); } } diff --git a/NadekoBot.Modules.Games/Common/TicTacToe.cs b/NadekoBot.Modules.Games/Common/TicTacToe.cs new file mode 100644 index 00000000..97e07217 --- /dev/null +++ b/NadekoBot.Modules.Games/Common/TicTacToe.cs @@ -0,0 +1,277 @@ +using Discord; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Services.Impl; +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common +{ + public class TicTacToe + { + enum Phase + { + Starting, + Started, + Ended + } + + private readonly ITextChannel _channel; + private readonly IGuildUser[] _users; + private readonly int?[,] _state; + private Phase _phase; + private int _curUserIndex; + private readonly SemaphoreSlim _moveLock; + + private IGuildUser _winner; + + private readonly string[] _numbers = { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:", ":nine:" }; + + public Action OnEnded; + + private IUserMessage _previousMessage; + private Timer _timeoutTimer; + private readonly NadekoStrings _strings; + private readonly DiscordSocketClient _client; + + public TicTacToe(NadekoStrings strings, DiscordSocketClient client, ITextChannel channel, IGuildUser firstUser) + { + _channel = channel; + _strings = strings; + _client = client; + + _users = new[] { firstUser, null }; + _state = new int?[,] { + { null, null, null }, + { null, null, null }, + { null, null, null }, + }; + + _phase = Phase.Starting; + _moveLock = new SemaphoreSlim(1, 1); + } + + private string GetText(string key, params object[] replacements) => + _strings.GetText(key, + _channel.GuildId, + typeof(Games).Name.ToLowerInvariant(), + replacements); + + public string GetState() + { + var sb = new StringBuilder(); + for (var i = 0; i < _state.GetLength(0); i++) + { + for (var j = 0; j < _state.GetLength(1); j++) + { + sb.Append(_state[i, j] == null ? _numbers[i * 3 + j] : GetIcon(_state[i, j])); + if (j < _state.GetLength(1) - 1) + sb.Append("┃"); + } + if (i < _state.GetLength(0) - 1) + sb.AppendLine("\n──────────"); + } + + return sb.ToString(); + } + + public EmbedBuilder GetEmbed(string title = null) + { + var embed = new EmbedBuilder() + .WithOkColor() + .WithDescription(Environment.NewLine + GetState()) + .WithAuthor(eab => eab.WithName(GetText("vs", _users[0], _users[1]))); + + if (!string.IsNullOrWhiteSpace(title)) + embed.WithTitle(title); + + if (_winner == null) + { + if (_phase == Phase.Ended) + embed.WithFooter(efb => efb.WithText(GetText("ttt_no_moves"))); + else + embed.WithFooter(efb => efb.WithText(GetText("ttt_users_move", _users[_curUserIndex]))); + } + else + embed.WithFooter(efb => efb.WithText(GetText("ttt_has_won", _winner))); + + return embed; + } + + private static string GetIcon(int? val) + { + switch (val) + { + case 0: + return "❌"; + case 1: + return "⭕"; + case 2: + return "❎"; + case 3: + return "🅾"; + default: + return "⬛"; + } + } + + public async Task Start(IGuildUser user) + { + if (_phase == Phase.Started || _phase == Phase.Ended) + { + await _channel.SendErrorAsync(user.Mention + GetText("ttt_already_running")).ConfigureAwait(false); + return; + } + else if (_users[0] == user) + { + await _channel.SendErrorAsync(user.Mention + GetText("ttt_against_yourself")).ConfigureAwait(false); + return; + } + + _users[1] = user; + + _phase = Phase.Started; + + _timeoutTimer = new Timer(async (_) => + { + await _moveLock.WaitAsync(); + try + { + if (_phase == Phase.Ended) + return; + + _phase = Phase.Ended; + if (_users[1] != null) + { + _winner = _users[_curUserIndex ^= 1]; + var del = _previousMessage?.DeleteAsync(); + try + { + await _channel.EmbedAsync(GetEmbed(GetText("ttt_time_expired"))).ConfigureAwait(false); + if (del != null) + await del.ConfigureAwait(false); + } + catch { } + } + + OnEnded?.Invoke(this); + } + catch { } + finally + { + _moveLock.Release(); + } + }, null, 15000, Timeout.Infinite); + + _client.MessageReceived += Client_MessageReceived; + + + _previousMessage = await _channel.EmbedAsync(GetEmbed(GetText("game_started"))).ConfigureAwait(false); + } + + private bool IsDraw() + { + for (var i = 0; i < 3; i++) + { + for (var j = 0; j < 3; j++) + { + if (_state[i, j] == null) + return false; + } + } + return true; + } + + private Task Client_MessageReceived(SocketMessage msg) + { + var _ = Task.Run(async () => + { + await _moveLock.WaitAsync().ConfigureAwait(false); + try + { + var curUser = _users[_curUserIndex]; + if (_phase == Phase.Ended || msg.Author?.Id != curUser.Id) + return; + + if (int.TryParse(msg.Content, out var index) && + --index >= 0 && + index <= 9 && + _state[index / 3, index % 3] == null) + { + _state[index / 3, index % 3] = _curUserIndex; + + // i'm lazy + if (_state[index / 3, 0] == _state[index / 3, 1] && _state[index / 3, 1] == _state[index / 3, 2]) + { + _state[index / 3, 0] = _curUserIndex + 2; + _state[index / 3, 1] = _curUserIndex + 2; + _state[index / 3, 2] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_state[0, index % 3] == _state[1, index % 3] && _state[1, index % 3] == _state[2, index % 3]) + { + _state[0, index % 3] = _curUserIndex + 2; + _state[1, index % 3] = _curUserIndex + 2; + _state[2, index % 3] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_curUserIndex == _state[0, 0] && _state[0, 0] == _state[1, 1] && _state[1, 1] == _state[2, 2]) + { + _state[0, 0] = _curUserIndex + 2; + _state[1, 1] = _curUserIndex + 2; + _state[2, 2] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_curUserIndex == _state[0, 2] && _state[0, 2] == _state[1, 1] && _state[1, 1] == _state[2, 0]) + { + _state[0, 2] = _curUserIndex + 2; + _state[1, 1] = _curUserIndex + 2; + _state[2, 0] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + var reason = ""; + + if (_phase == Phase.Ended) // if user won, stop receiving moves + { + reason = GetText("ttt_matched_three"); + _winner = _users[_curUserIndex]; + _client.MessageReceived -= Client_MessageReceived; + OnEnded?.Invoke(this); + } + else if (IsDraw()) + { + reason = GetText("ttt_a_draw"); + _phase = Phase.Ended; + _client.MessageReceived -= Client_MessageReceived; + OnEnded?.Invoke(this); + } + + var sendstate = Task.Run(async () => + { + var del1 = msg.DeleteAsync(); + var del2 = _previousMessage?.DeleteAsync(); + try { _previousMessage = await _channel.EmbedAsync(GetEmbed(reason)); } catch { } + try { await del1; } catch { } + try { if (del2 != null) await del2; } catch { } + }); + _curUserIndex ^= 1; + + _timeoutTimer.Change(15000, Timeout.Infinite); + } + } + finally + { + _moveLock.Release(); + } + }); + + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Modules.Games/Connect4Commands.cs b/NadekoBot.Modules.Games/Connect4Commands.cs index 5a1183c2..e6413178 100644 --- a/NadekoBot.Modules.Games/Connect4Commands.cs +++ b/NadekoBot.Modules.Games/Connect4Commands.cs @@ -1,10 +1,10 @@ -using Discord; +using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Games.Common.Connect4; -using System.Collections.Concurrent; +using NadekoBot.Modules.Games.Services; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -13,12 +13,11 @@ namespace NadekoBot.Modules.Games { public partial class Games { - public class Connect4Commands : NadekoSubmodule + [Group] + public class Connect4Commands : NadekoSubmodule { - public static ConcurrentDictionary Games = new ConcurrentDictionary(); private readonly DiscordSocketClient _client; - - //private readonly string[] numbers = new string[] { "⓪", " ①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨" }; + private readonly string[] numbers = new string[] { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:"}; public Connect4Commands(DiscordSocketClient client) @@ -32,7 +31,7 @@ namespace NadekoBot.Modules.Games { var newGame = new Connect4Game(Context.User.Id, Context.User.ToString()); Connect4Game game; - if ((game = Games.GetOrAdd(Context.Channel.Id, newGame)) != newGame) + if ((game = _service.Connect4Games.GetOrAdd(Context.Channel.Id, newGame)) != newGame) { if (game.CurrentPhase != Connect4Game.Phase.Joining) return; @@ -84,7 +83,7 @@ namespace NadekoBot.Modules.Games Task Game_OnGameFailedToStart(Connect4Game arg) { - if (Games.TryRemove(Context.Channel.Id, out var toDispose)) + if (_service.Connect4Games.TryRemove(Context.Channel.Id, out var toDispose)) { _client.MessageReceived -= _client_MessageReceived; toDispose.Dispose(); @@ -94,7 +93,7 @@ namespace NadekoBot.Modules.Games Task Game_OnGameEnded(Connect4Game arg, Connect4Game.Result result) { - if (Games.TryRemove(Context.Channel.Id, out var toDispose)) + if (_service.Connect4Games.TryRemove(Context.Channel.Id, out var toDispose)) { _client.MessageReceived -= _client_MessageReceived; toDispose.Dispose(); diff --git a/NadekoBot.Modules.Games/HangmanCommands.cs b/NadekoBot.Modules.Games/HangmanCommands.cs index f95f1a99..32986d62 100644 --- a/NadekoBot.Modules.Games/HangmanCommands.cs +++ b/NadekoBot.Modules.Games/HangmanCommands.cs @@ -1,19 +1,19 @@ using Discord.Commands; using NadekoBot.Extensions; using System; -using System.Collections.Concurrent; using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Hangman; +using NadekoBot.Modules.Games.Services; namespace NadekoBot.Modules.Games { public partial class Games { [Group] - public class HangmanCommands : NadekoSubmodule + public class HangmanCommands : NadekoSubmodule { private readonly DiscordSocketClient _client; @@ -22,9 +22,6 @@ namespace NadekoBot.Modules.Games _client = client; } - //channelId, game - public static ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); - [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task Hangmanlist() @@ -38,7 +35,7 @@ namespace NadekoBot.Modules.Games { var hm = new Hangman(type); - if (!HangmanGames.TryAdd(Context.Channel.Id, hm)) + if (!_service.HangmanGames.TryAdd(Context.Channel.Id, hm)) { hm.Dispose(); await ReplyErrorLocalized("hangman_running").ConfigureAwait(false); @@ -61,7 +58,7 @@ namespace NadekoBot.Modules.Games await hm.EndedTask.ConfigureAwait(false); _client.MessageReceived -= _client_MessageReceived; - HangmanGames.TryRemove(Context.Channel.Id, out _); + _service.HangmanGames.TryRemove(Context.Channel.Id, out _); hm.Dispose(); Task _client_MessageReceived(SocketMessage msg) @@ -127,7 +124,7 @@ namespace NadekoBot.Modules.Games [RequireContext(ContextType.Guild)] public async Task HangmanStop() { - if (HangmanGames.TryRemove(Context.Channel.Id, out var removed)) + if (_service.HangmanGames.TryRemove(Context.Channel.Id, out var removed)) { await removed.Stop().ConfigureAwait(false); await ReplyConfirmLocalized("hangman_stopped").ConfigureAwait(false); diff --git a/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj b/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj index bea9affd..3cbf2e8b 100644 --- a/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj +++ b/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj @@ -2,8 +2,15 @@ netcoreapp2.0 + latest + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false + + diff --git a/NadekoBot.Modules.Games/NunchiCommands.cs b/NadekoBot.Modules.Games/NunchiCommands.cs index 834e2c02..9b709261 100644 --- a/NadekoBot.Modules.Games/NunchiCommands.cs +++ b/NadekoBot.Modules.Games/NunchiCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Nunchi; +using NadekoBot.Modules.Games.Services; using System; -using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; @@ -12,9 +12,9 @@ namespace NadekoBot.Modules.Games { public partial class Games { - public class NunchiCommands : NadekoSubmodule + [Group] + public class NunchiCommands : NadekoSubmodule { - public static readonly ConcurrentDictionary Games = new ConcurrentDictionary(); private readonly DiscordSocketClient _client; public NunchiCommands(DiscordSocketClient client) @@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Games Nunchi nunchi; //if a game was already active - if ((nunchi = Games.GetOrAdd(Context.Guild.Id, newNunchi)) != newNunchi) + if ((nunchi = _service.NunchiGames.GetOrAdd(Context.Guild.Id, newNunchi)) != newNunchi) { // join it if (!await nunchi.Join(Context.User.Id, Context.User.ToString())) @@ -57,7 +57,7 @@ namespace NadekoBot.Modules.Games var success = await nunchi.Initialize().ConfigureAwait(false); if (!success) { - if (Games.TryRemove(Context.Guild.Id, out var game)) + if (_service.NunchiGames.TryRemove(Context.Guild.Id, out var game)) game.Dispose(); await ConfirmLocalized("nunchi_failed_to_start").ConfigureAwait(false); } @@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Games Task Nunchi_OnGameEnded(Nunchi arg1, string arg2) { - if (Games.TryRemove(Context.Guild.Id, out var game)) + if (_service.NunchiGames.TryRemove(Context.Guild.Id, out var game)) { _client.MessageReceived -= _client_MessageReceived; game.Dispose(); diff --git a/NadekoBot.Modules.Games/PlantAndPickCommands.cs b/NadekoBot.Modules.Games/PlantAndPickCommands.cs index 3bbe2c79..a5da947b 100644 --- a/NadekoBot.Modules.Games/PlantAndPickCommands.cs +++ b/NadekoBot.Modules.Games/PlantAndPickCommands.cs @@ -22,19 +22,17 @@ namespace NadekoBot.Modules.Games /// https://discord.gg/0TYNJfCU4De7YIk8 /// [Group] - public class PlantPickCommands : NadekoSubmodule + public class PlantPickCommands : NadekoSubmodule { private readonly CurrencyService _cs; private readonly IBotConfigProvider _bc; - private readonly GamesService _games; private readonly DbService _db; - public PlantPickCommands(IBotConfigProvider bc, CurrencyService cs, GamesService games, + public PlantPickCommands(IBotConfigProvider bc, CurrencyService cs, DbService db) { _bc = bc; _cs = cs; - _games = games; _db = db; } @@ -49,7 +47,7 @@ namespace NadekoBot.Modules.Games try { await Context.Message.DeleteAsync().ConfigureAwait(false); } catch { } - if (!_games.PlantedFlowers.TryRemove(channel.Id, out List msgs)) + if (!_service.PlantedFlowers.TryRemove(channel.Id, out List msgs)) return; await Task.WhenAll(msgs.Where(m => m != null).Select(toDelete => toDelete.DeleteAsync())).ConfigureAwait(false); @@ -74,7 +72,7 @@ namespace NadekoBot.Modules.Games return; } - var imgData = _games.GetRandomCurrencyImage(); + var imgData = _service.GetRandomCurrencyImage(); var msgToSend = GetText("planted", Format.Bold(Context.User.ToString()), @@ -95,7 +93,7 @@ namespace NadekoBot.Modules.Games var msgs = new IUserMessage[amount]; msgs[0] = msg; - _games.PlantedFlowers.AddOrUpdate(Context.Channel.Id, msgs.ToList(), (id, old) => + _service.PlantedFlowers.AddOrUpdate(Context.Channel.Id, msgs.ToList(), (id, old) => { old.AddRange(msgs); return old; @@ -121,13 +119,13 @@ namespace NadekoBot.Modules.Games if (!guildConfig.GenerateCurrencyChannelIds.Contains(toAdd)) { guildConfig.GenerateCurrencyChannelIds.Add(toAdd); - _games.GenerationChannels.Add(channel.Id); + _service.GenerationChannels.Add(channel.Id); enabled = true; } else { guildConfig.GenerateCurrencyChannelIds.Remove(toAdd); - _games.GenerationChannels.TryRemove(channel.Id); + _service.GenerationChannels.TryRemove(channel.Id); enabled = false; } await uow.CompleteAsync(); diff --git a/NadekoBot.Modules.Games/Services/GamesService.cs b/NadekoBot.Modules.Games/Services/GamesService.cs index 39164486..61a4415c 100644 --- a/NadekoBot.Modules.Games/Services/GamesService.cs +++ b/NadekoBot.Modules.Games/Services/GamesService.cs @@ -17,10 +17,15 @@ using NadekoBot.Services.Database.Models; using NadekoBot.Services.Impl; using Newtonsoft.Json; using NLog; +using NadekoBot.Modules.Games.Common.Acrophobia; +using NadekoBot.Modules.Games.Common.Connect4; +using NadekoBot.Modules.Games.Common.Hangman; +using NadekoBot.Modules.Games.Common.Trivia; +using NadekoBot.Modules.Games.Common.Nunchi; namespace NadekoBot.Modules.Games.Services { - public class GamesService : INService + public class GamesService : INService, IUnloadableService { private readonly IBotConfigProvider _bc; @@ -38,7 +43,16 @@ namespace NadekoBot.Modules.Games.Services public List TypingArticles { get; } = new List(); - public GamesService(CommandHandler cmd, IBotConfigProvider bc, IEnumerable gcs, + //channelId, game + public ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary Connect4Games { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary RunningTrivias { get; } = new ConcurrentDictionary(); + public Dictionary TicTacToeGames { get; } = new Dictionary(); + public ConcurrentDictionary RunningContests { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary NunchiGames { get; } = new ConcurrentDictionary(); + + public GamesService(CommandHandler cmd, IBotConfigProvider bc, IEnumerable gcs, NadekoStrings strings, IImagesService images, CommandHandler cmdHandler) { _bc = bc; @@ -74,6 +88,34 @@ namespace NadekoBot.Modules.Games.Services } } + public async Task Unload() + { + _t.Change(Timeout.Infinite, Timeout.Infinite); + _cmd.OnMessageNoTrigger -= PotentialFlowerGeneration; + + AcrophobiaGames.ForEach(x => x.Value.Dispose()); + AcrophobiaGames.Clear(); + Connect4Games.ForEach(x => x.Value.Dispose()); + Connect4Games.Clear(); + HangmanGames.ForEach(x => x.Value.Dispose()); + HangmanGames.Clear(); + await Task.WhenAll(RunningTrivias.Select(x => x.Value.StopGame())); + RunningTrivias.Clear(); + + TicTacToeGames.Clear(); + + await Task.WhenAll(RunningContests.Select(x => x.Value.Stop())) + .ConfigureAwait(false); + RunningContests.Clear(); + NunchiGames.ForEach(x => x.Value.Dispose()); + NunchiGames.Clear(); + } + + private void DisposeElems(IEnumerable xs) + { + xs.ForEach(x => x.Dispose()); + } + public void AddTypingArticle(IUser user, string text) { TypingArticles.Add(new TypingArticle diff --git a/NadekoBot.Modules.Games/SpeedTypingCommands.cs b/NadekoBot.Modules.Games/SpeedTypingCommands.cs index 315080ed..1e049d21 100644 --- a/NadekoBot.Modules.Games/SpeedTypingCommands.cs +++ b/NadekoBot.Modules.Games/SpeedTypingCommands.cs @@ -3,7 +3,6 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; using Newtonsoft.Json; -using System.Collections.Concurrent; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -16,9 +15,8 @@ namespace NadekoBot.Modules.Games public partial class Games { [Group] - public class SpeedTypingCommands : NadekoSubmodule + public class SpeedTypingCommands : NadekoSubmodule { - public static ConcurrentDictionary RunningContests = new ConcurrentDictionary(); private readonly GamesService _games; private readonly DiscordSocketClient _client; @@ -34,7 +32,7 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - var game = RunningContests.GetOrAdd(channel.Guild.Id, id => new TypingGame(_games, _client, channel, Prefix)); + var game = _service.RunningContests.GetOrAdd(channel.Guild.Id, id => new TypingGame(_games, _client, channel, Prefix)); if (game.IsActive) { @@ -54,8 +52,7 @@ namespace NadekoBot.Modules.Games public async Task TypeStop() { var channel = (ITextChannel)Context.Channel; - TypingGame game; - if (RunningContests.TryRemove(channel.Guild.Id, out game)) + if (_service.RunningContests.TryRemove(channel.Guild.Id, out TypingGame game)) { await game.Stop().ConfigureAwait(false); return; diff --git a/NadekoBot.Modules.Games/TicTacToeCommands.cs b/NadekoBot.Modules.Games/TicTacToeCommands.cs index 539d9cdd..34e5b2f0 100644 --- a/NadekoBot.Modules.Games/TicTacToeCommands.cs +++ b/NadekoBot.Modules.Games/TicTacToeCommands.cs @@ -3,23 +3,21 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; using System; -using System.Collections.Generic; using System.Text; using System.Threading; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Services.Impl; +using NadekoBot.Modules.Games.Services; +using NadekoBot.Modules.Games.Common; namespace NadekoBot.Modules.Games { public partial class Games { [Group] - public class TicTacToeCommands : NadekoSubmodule + public class TicTacToeCommands : NadekoSubmodule { - //channelId/game - private static readonly Dictionary _games = new Dictionary(); - private readonly SemaphoreSlim _sem = new SemaphoreSlim(1, 1); private readonly DiscordSocketClient _client; @@ -37,7 +35,7 @@ namespace NadekoBot.Modules.Games await _sem.WaitAsync(1000); try { - if (_games.TryGetValue(channel.Id, out TicTacToe game)) + if (_service.TicTacToeGames.TryGetValue(channel.Id, out TicTacToe game)) { var _ = Task.Run(async () => { @@ -45,13 +43,13 @@ namespace NadekoBot.Modules.Games }); return; } - game = new TicTacToe(base._strings, (DiscordSocketClient)this._client, channel, (IGuildUser)Context.User); - _games.Add(channel.Id, game); + game = new TicTacToe(base._strings, this._client, channel, (IGuildUser)Context.User); + _service.TicTacToeGames.Add(channel.Id, game); await ReplyConfirmLocalized("ttt_created").ConfigureAwait(false); game.OnEnded += (g) => { - _games.Remove(channel.Id); + _service.TicTacToeGames.Remove(channel.Id); }; } finally @@ -60,271 +58,5 @@ namespace NadekoBot.Modules.Games } } } - - public class TicTacToe - { - enum Phase - { - Starting, - Started, - Ended - } - - private readonly ITextChannel _channel; - private readonly IGuildUser[] _users; - private readonly int?[,] _state; - private Phase _phase; - private int _curUserIndex; - private readonly SemaphoreSlim _moveLock; - - private IGuildUser _winner; - - private readonly string[] _numbers = { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:", ":nine:" }; - - public Action OnEnded; - - private IUserMessage _previousMessage; - private Timer _timeoutTimer; - private readonly NadekoStrings _strings; - private readonly DiscordSocketClient _client; - - public TicTacToe(NadekoStrings strings, DiscordSocketClient client, ITextChannel channel, IGuildUser firstUser) - { - _channel = channel; - _strings = strings; - _client = client; - - _users = new[] { firstUser, null }; - _state = new int?[,] { - { null, null, null }, - { null, null, null }, - { null, null, null }, - }; - - _phase = Phase.Starting; - _moveLock = new SemaphoreSlim(1, 1); - } - - private string GetText(string key, params object[] replacements) => - _strings.GetText(key, - _channel.GuildId, - typeof(Games).Name.ToLowerInvariant(), - replacements); - - public string GetState() - { - var sb = new StringBuilder(); - for (var i = 0; i < _state.GetLength(0); i++) - { - for (var j = 0; j < _state.GetLength(1); j++) - { - sb.Append(_state[i, j] == null ? _numbers[i * 3 + j] : GetIcon(_state[i, j])); - if (j < _state.GetLength(1) - 1) - sb.Append("┃"); - } - if (i < _state.GetLength(0) - 1) - sb.AppendLine("\n──────────"); - } - - return sb.ToString(); - } - - public EmbedBuilder GetEmbed(string title = null) - { - var embed = new EmbedBuilder() - .WithOkColor() - .WithDescription(Environment.NewLine + GetState()) - .WithAuthor(eab => eab.WithName(GetText("vs", _users[0], _users[1]))); - - if (!string.IsNullOrWhiteSpace(title)) - embed.WithTitle(title); - - if (_winner == null) - { - if (_phase == Phase.Ended) - embed.WithFooter(efb => efb.WithText(GetText("ttt_no_moves"))); - else - embed.WithFooter(efb => efb.WithText(GetText("ttt_users_move", _users[_curUserIndex]))); - } - else - embed.WithFooter(efb => efb.WithText(GetText("ttt_has_won", _winner))); - - return embed; - } - - private static string GetIcon(int? val) - { - switch (val) - { - case 0: - return "❌"; - case 1: - return "⭕"; - case 2: - return "❎"; - case 3: - return "🅾"; - default: - return "⬛"; - } - } - - public async Task Start(IGuildUser user) - { - if (_phase == Phase.Started || _phase == Phase.Ended) - { - await _channel.SendErrorAsync(user.Mention + GetText("ttt_already_running")).ConfigureAwait(false); - return; - } - else if (_users[0] == user) - { - await _channel.SendErrorAsync(user.Mention + GetText("ttt_against_yourself")).ConfigureAwait(false); - return; - } - - _users[1] = user; - - _phase = Phase.Started; - - _timeoutTimer = new Timer(async (_) => - { - await _moveLock.WaitAsync(); - try - { - if (_phase == Phase.Ended) - return; - - _phase = Phase.Ended; - if (_users[1] != null) - { - _winner = _users[_curUserIndex ^= 1]; - var del = _previousMessage?.DeleteAsync(); - try - { - await _channel.EmbedAsync(GetEmbed(GetText("ttt_time_expired"))).ConfigureAwait(false); - if (del != null) - await del.ConfigureAwait(false); - } - catch { } - } - - OnEnded?.Invoke(this); - } - catch { } - finally - { - _moveLock.Release(); - } - }, null, 15000, Timeout.Infinite); - - _client.MessageReceived += Client_MessageReceived; - - - _previousMessage = await _channel.EmbedAsync(GetEmbed(GetText("game_started"))).ConfigureAwait(false); - } - - private bool IsDraw() - { - for (var i = 0; i < 3; i++) - { - for (var j = 0; j < 3; j++) - { - if (_state[i, j] == null) - return false; - } - } - return true; - } - - private Task Client_MessageReceived(SocketMessage msg) - { - var _ = Task.Run(async () => - { - await _moveLock.WaitAsync().ConfigureAwait(false); - try - { - var curUser = _users[_curUserIndex]; - if (_phase == Phase.Ended || msg.Author?.Id != curUser.Id) - return; - - if (int.TryParse(msg.Content, out var index) && - --index >= 0 && - index <= 9 && - _state[index / 3, index % 3] == null) - { - _state[index / 3, index % 3] = _curUserIndex; - - // i'm lazy - if (_state[index / 3, 0] == _state[index / 3, 1] && _state[index / 3, 1] == _state[index / 3, 2]) - { - _state[index / 3, 0] = _curUserIndex + 2; - _state[index / 3, 1] = _curUserIndex + 2; - _state[index / 3, 2] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - else if (_state[0, index % 3] == _state[1, index % 3] && _state[1, index % 3] == _state[2, index % 3]) - { - _state[0, index % 3] = _curUserIndex + 2; - _state[1, index % 3] = _curUserIndex + 2; - _state[2, index % 3] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - else if (_curUserIndex == _state[0, 0] && _state[0, 0] == _state[1, 1] && _state[1, 1] == _state[2, 2]) - { - _state[0, 0] = _curUserIndex + 2; - _state[1, 1] = _curUserIndex + 2; - _state[2, 2] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - else if (_curUserIndex == _state[0, 2] && _state[0, 2] == _state[1, 1] && _state[1, 1] == _state[2, 0]) - { - _state[0, 2] = _curUserIndex + 2; - _state[1, 1] = _curUserIndex + 2; - _state[2, 0] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - var reason = ""; - - if (_phase == Phase.Ended) // if user won, stop receiving moves - { - reason = GetText("ttt_matched_three"); - _winner = _users[_curUserIndex]; - _client.MessageReceived -= Client_MessageReceived; - OnEnded?.Invoke(this); - } - else if (IsDraw()) - { - reason = GetText("ttt_a_draw"); - _phase = Phase.Ended; - _client.MessageReceived -= Client_MessageReceived; - OnEnded?.Invoke(this); - } - - var sendstate = Task.Run(async () => - { - var del1 = msg.DeleteAsync(); - var del2 = _previousMessage?.DeleteAsync(); - try { _previousMessage = await _channel.EmbedAsync(GetEmbed(reason)); } catch { } - try { await del1; } catch { } - try { if (del2 != null) await del2; } catch { } - }); - _curUserIndex ^= 1; - - _timeoutTimer.Change(15000, Timeout.Infinite); - } - } - finally - { - _moveLock.Release(); - } - }); - - return Task.CompletedTask; - } - } } } \ No newline at end of file diff --git a/NadekoBot.Modules.Games/TriviaCommands.cs b/NadekoBot.Modules.Games/TriviaCommands.cs index 3360c87f..75810ba9 100644 --- a/NadekoBot.Modules.Games/TriviaCommands.cs +++ b/NadekoBot.Modules.Games/TriviaCommands.cs @@ -3,24 +3,23 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; using NadekoBot.Services; -using System.Collections.Concurrent; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Trivia; +using NadekoBot.Modules.Games.Services; namespace NadekoBot.Modules.Games { public partial class Games { + //todo move games to service, unload [Group] - public class TriviaCommands : NadekoSubmodule + public class TriviaCommands : NadekoSubmodule { private readonly CurrencyService _cs; private readonly DiscordSocketClient _client; private readonly IBotConfigProvider _bc; - public static ConcurrentDictionary RunningTrivias { get; } = new ConcurrentDictionary(); - public TriviaCommands(DiscordSocketClient client, IBotConfigProvider bc, CurrencyService cs) { _cs = cs; @@ -48,7 +47,7 @@ namespace NadekoBot.Modules.Games var isPokemon = additionalArgs.Contains("pokemon"); var trivia = new TriviaGame(_strings, _client, _bc, _cs, channel.Guild, channel, showHints, winReq, isPokemon); - if (RunningTrivias.TryAdd(channel.Guild.Id, trivia)) + if (_service.RunningTrivias.TryAdd(channel.Guild.Id, trivia)) { try { @@ -56,7 +55,7 @@ namespace NadekoBot.Modules.Games } finally { - RunningTrivias.TryRemove(channel.Guild.Id, out trivia); + _service.RunningTrivias.TryRemove(channel.Guild.Id, out trivia); await trivia.EnsureStopped().ConfigureAwait(false); } return; @@ -72,8 +71,7 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - TriviaGame trivia; - if (RunningTrivias.TryGetValue(channel.Guild.Id, out trivia)) + if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out TriviaGame trivia)) { await channel.SendConfirmAsync(GetText("leaderboard"), trivia.GetLeaderboard()).ConfigureAwait(false); return; @@ -88,8 +86,7 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - TriviaGame trivia; - if (RunningTrivias.TryGetValue(channel.Guild.Id, out trivia)) + if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out TriviaGame trivia)) { await trivia.StopGame().ConfigureAwait(false); return; diff --git a/NadekoBot.Modules.Music/Music.cs b/NadekoBot.Modules.Music/Music.cs index a5b0295e..3aac503c 100644 --- a/NadekoBot.Modules.Music/Music.cs +++ b/NadekoBot.Modules.Music/Music.cs @@ -30,22 +30,15 @@ namespace NadekoBot.Modules.Music private readonly IGoogleApiService _google; private readonly DbService _db; - public Music(DiscordSocketClient client, IBotCredentials creds, IGoogleApiService google, + public Music(DiscordSocketClient client, + IBotCredentials creds, + IGoogleApiService google, DbService db) { _client = client; _creds = creds; _google = google; _db = db; - - //_client.UserVoiceStateUpdated += Client_UserVoiceStateUpdated; - _client.LeftGuild += _client_LeftGuild; - } - - private Task _client_LeftGuild(SocketGuild arg) - { - var t = _service.DestroyPlayer(arg.Id); - return Task.CompletedTask; } //todo changing server region is bugged again diff --git a/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj b/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj index df675329..eb9bb4e0 100644 --- a/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj +++ b/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj @@ -2,10 +2,14 @@ netcoreapp2.0 + latest + true - - true + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.Music/Services/MusicService.cs b/NadekoBot.Modules.Music/Services/MusicService.cs index d0b00657..78ca31a9 100644 --- a/NadekoBot.Modules.Music/Services/MusicService.cs +++ b/NadekoBot.Modules.Music/Services/MusicService.cs @@ -18,7 +18,7 @@ using NadekoBot.Modules.Music.Common.SongResolver; namespace NadekoBot.Modules.Music.Services { - public class MusicService : INService + public class MusicService : INService, IUnloadableService { public const string MusicDataPath = "data/musicdata"; @@ -47,13 +47,25 @@ namespace NadekoBot.Modules.Music.Services _creds = creds; _log = LogManager.GetCurrentClassLogger(); + _client.LeftGuild += _client_LeftGuild; + try { Directory.Delete(MusicDataPath, true); } catch { } _defaultVolumes = new ConcurrentDictionary(gcs.ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); Directory.CreateDirectory(MusicDataPath); + } - //_t = new Timer(_ => _log.Info(MusicPlayers.Count(x => x.Value.Current.Current != null)), null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)); + public Task Unload() + { + _client.LeftGuild -= _client_LeftGuild; + return Task.CompletedTask; + } + + private Task _client_LeftGuild(SocketGuild arg) + { + var t = DestroyPlayer(arg.Id); + return Task.CompletedTask; } public float GetDefaultVolume(ulong guildId) diff --git a/NadekoBot.Modules.Nsfw/NSFW.cs b/NadekoBot.Modules.Nsfw/NSFW.cs index 1ca27691..e9ad919b 100644 --- a/NadekoBot.Modules.Nsfw/NSFW.cs +++ b/NadekoBot.Modules.Nsfw/NSFW.cs @@ -19,6 +19,7 @@ namespace NadekoBot.Modules.NSFW // thanks to halitalf for adding autoboob and autobutt features :D public class NSFW : NadekoTopLevelModule { + //todo clear when module unloaded private static readonly ConcurrentDictionary _autoHentaiTimers = new ConcurrentDictionary(); private static readonly ConcurrentDictionary _autoBoobTimers = new ConcurrentDictionary(); private static readonly ConcurrentDictionary _autoButtTimers = new ConcurrentDictionary(); diff --git a/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj b/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj index 708ba46b..d8b31304 100644 --- a/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj +++ b/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj @@ -2,6 +2,13 @@ netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj b/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj index 9ee6f9f6..b97a40e1 100644 --- a/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj +++ b/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj @@ -2,6 +2,13 @@ netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj b/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj index e271723d..af75a27c 100644 --- a/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj +++ b/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj @@ -2,6 +2,13 @@ netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false diff --git a/NadekoBot.Modules.Utility/Services/ConverterService.cs b/NadekoBot.Modules.Utility/Services/ConverterService.cs index 49bfd43e..62eab125 100644 --- a/NadekoBot.Modules.Utility/Services/ConverterService.cs +++ b/NadekoBot.Modules.Utility/Services/ConverterService.cs @@ -13,7 +13,7 @@ using NLog; namespace NadekoBot.Modules.Utility.Services { - public class ConverterService : INService + public class ConverterService : INService, IUnloadableService { public List Units { get; } = new List(); private readonly Logger _log; @@ -122,6 +122,12 @@ namespace NadekoBot.Modules.Utility.Services _log.Warn("Failed updating currency. Ignore this."); } } + + public Task Unload() + { + _currencyUpdater.Change(Timeout.Infinite, Timeout.Infinite); + return Task.CompletedTask; + } } public class MeasurementUnit diff --git a/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs index 4e937eb4..2b19e520 100644 --- a/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs +++ b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs @@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Utility.Services .Where(x => x.Guild != null))); }) .Where(x => x.Item2 != null) - .ToDictionary(x => x.Item1, x => x.Item2)); + .ToDictionary(x => x.GuildId, x => x.Item2)); RepeaterReady = true; }); } diff --git a/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs index c0dbc96e..703d0c11 100644 --- a/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs +++ b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs @@ -15,7 +15,7 @@ using NLog; namespace NadekoBot.Modules.Utility.Services { - public class PatreonRewardsService : INService + public class PatreonRewardsService : INService, IUnloadableService { private readonly SemaphoreSlim getPledgesLocker = new SemaphoreSlim(1, 1); @@ -33,15 +33,16 @@ namespace NadekoBot.Modules.Utility.Services private readonly string cacheFileName = "./patreon-rewards.json"; - public PatreonRewardsService(IBotCredentials creds, DbService db, CurrencyService currency, + public PatreonRewardsService(IBotCredentials creds, DbService db, + CurrencyService currency, DiscordSocketClient client) { + _log = LogManager.GetCurrentClassLogger(); _creds = creds; _db = db; _currency = currency; if (string.IsNullOrWhiteSpace(creds.PatreonAccessToken)) return; - _log = LogManager.GetCurrentClassLogger(); Updater = new Timer(async (load) => await RefreshPledges((bool)load), client.ShardId == 0, client.ShardId == 0 ? TimeSpan.Zero : TimeSpan.FromMinutes(2), Interval); } @@ -171,5 +172,11 @@ namespace NadekoBot.Modules.Utility.Services claimLockJustInCase.Release(); } } + + public Task Unload() + { + Updater.Change(Timeout.Infinite, Timeout.Infinite); + return Task.CompletedTask; + } } } diff --git a/NadekoBot.Modules.Utility/Services/RemindService.cs b/NadekoBot.Modules.Utility/Services/RemindService.cs index 0e3b2206..8999e9ae 100644 --- a/NadekoBot.Modules.Utility/Services/RemindService.cs +++ b/NadekoBot.Modules.Utility/Services/RemindService.cs @@ -8,10 +8,10 @@ using Discord.WebSocket; using NadekoBot.Common.Replacements; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NadekoBot.Services.Impl; using NLog; +using System.Collections.Generic; namespace NadekoBot.Modules.Utility.Services { @@ -29,8 +29,10 @@ namespace NadekoBot.Modules.Utility.Services private readonly DiscordSocketClient _client; private readonly DbService _db; - public RemindService(DiscordSocketClient client, IBotConfigProvider config, DbService db, - StartingGuildsService guilds, IUnitOfWork uow) + public RemindService(DiscordSocketClient client, + IBotConfigProvider config, + DbService db, + StartingGuildsService guilds) { _config = config; _client = client; @@ -39,8 +41,12 @@ namespace NadekoBot.Modules.Utility.Services cancelSource = new CancellationTokenSource(); cancelAllToken = cancelSource.Token; - - var reminders = uow.Reminders.GetIncludedReminders(guilds).ToList(); + + List reminders; + using (var uow = _db.UnitOfWork) + { + reminders = uow.Reminders.GetIncludedReminders(guilds).ToList(); + } RemindMessageFormat = _config.BotConfig.RemindMessageFormat; foreach (var r in reminders) diff --git a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs index 98f34eaf..df0d5cbb 100644 --- a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs +++ b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs @@ -17,22 +17,24 @@ using Discord.Net; namespace NadekoBot.Modules.Utility.Services { - public class StreamRoleService : INService + public class StreamRoleService : INService, IUnloadableService { private readonly DbService _db; + private readonly DiscordSocketClient _client; private readonly ConcurrentDictionary guildSettings; private readonly Logger _log; public StreamRoleService(DiscordSocketClient client, DbService db, IEnumerable gcs) { - this._db = db; this._log = LogManager.GetCurrentClassLogger(); + this._db = db; + this._client = client; guildSettings = gcs.ToDictionary(x => x.GuildId, x => x.StreamRole) .Where(x => x.Value != null && x.Value.Enabled) .ToConcurrent(); - client.GuildMemberUpdated += Client_GuildMemberUpdated; + _client.GuildMemberUpdated += Client_GuildMemberUpdated; var _ = Task.Run(async () => { @@ -47,6 +49,12 @@ namespace NadekoBot.Modules.Utility.Services }); } + public Task Unload() + { + _client.GuildMemberUpdated -= Client_GuildMemberUpdated; + return Task.CompletedTask; + } + private Task Client_GuildMemberUpdated(SocketGuildUser before, SocketGuildUser after) { var _ = Task.Run(async () => diff --git a/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs index 9f438128..a5e01566 100644 --- a/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs +++ b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs @@ -11,7 +11,7 @@ using NadekoBot.Services.Database.Models; namespace NadekoBot.Modules.Utility.Services { - public class VerboseErrorsService : INService + public class VerboseErrorsService : INService, IUnloadableService { private readonly ConcurrentHashSet guildsEnabled; private readonly DbService _db; @@ -24,11 +24,17 @@ namespace NadekoBot.Modules.Utility.Services _ch = ch; _hs = hs; - ch.CommandErrored += LogVerboseError; + _ch.CommandErrored += LogVerboseError; guildsEnabled = new ConcurrentHashSet(gcs.Where(x => x.VerboseErrors).Select(x => x.GuildId)); } + public Task Unload() + { + _ch.CommandErrored -= LogVerboseError; + return Task.CompletedTask; + } + private async Task LogVerboseError(CommandInfo cmd, ITextChannel channel, string reason) { if (channel == null || !guildsEnabled.Contains(channel.GuildId)) @@ -73,6 +79,5 @@ namespace NadekoBot.Modules.Utility.Services return enabled; } - } } diff --git a/NadekoBot.Modules.Xp/Club.cs b/NadekoBot.Modules.Xp/Club.cs index 20a6e97a..b82e9e93 100644 --- a/NadekoBot.Modules.Xp/Club.cs +++ b/NadekoBot.Modules.Xp/Club.cs @@ -99,8 +99,7 @@ namespace NadekoBot.Modules.Xp return; } - ClubInfo club; - if (!_service.GetClubByName(clubName, out club)) + if (!_service.GetClubByName(clubName, out ClubInfo club)) { await ReplyErrorLocalized("club_not_exists").ConfigureAwait(false); return; diff --git a/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj b/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj index bea9affd..f00a0053 100644 --- a/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj +++ b/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj @@ -2,12 +2,19 @@ netcoreapp2.0 + latest + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false + + diff --git a/NadekoBot.Modules.Xp/Services/ClubService.cs b/NadekoBot.Modules.Xp/Services/ClubService.cs index 4c61d7ab..72997d3f 100644 --- a/NadekoBot.Modules.Xp/Services/ClubService.cs +++ b/NadekoBot.Modules.Xp/Services/ClubService.cs @@ -4,8 +4,6 @@ using NadekoBot.Services.Database.Models; using Discord; using NadekoBot.Modules.Xp.Common; using System.Linq; -using Microsoft.EntityFrameworkCore; -using System.Collections.Generic; namespace NadekoBot.Modules.Xp.Services { diff --git a/NadekoBot.Modules.Xp/Services/XpService.cs b/NadekoBot.Modules.Xp/Services/XpService.cs index 09fa7ec9..a5f90768 100644 --- a/NadekoBot.Modules.Xp/Services/XpService.cs +++ b/NadekoBot.Modules.Xp/Services/XpService.cs @@ -26,7 +26,7 @@ using ImageSharp.Drawing.Brushes; namespace NadekoBot.Modules.Xp.Services { - public class XpService : INService + public class XpService : INService, IUnloadableService { private enum NotifOf { Server, Global } // is it a server level-up or global level-up notification @@ -55,7 +55,9 @@ namespace NadekoBot.Modules.Xp.Services private readonly ConcurrentQueue _addMessageXp = new ConcurrentQueue(); - private readonly Timer updateXpTimer; + private readonly Timer _updateXpTimer; + private readonly CancellationTokenSource _clearRewardTimerTokenSource; + private readonly Task _clearRewardTimer; private readonly HttpClient http = new HttpClient(); private FontFamily _usernameFontFamily; private FontFamily _clubFontFamily; @@ -115,7 +117,7 @@ namespace NadekoBot.Modules.Xp.Services _cmd.OnMessageNoTrigger += _cmd_OnMessageNoTrigger; - updateXpTimer = new Timer(async _ => + _updateXpTimer = new Timer(async _ => { try { @@ -241,19 +243,20 @@ namespace NadekoBot.Modules.Xp.Services _log.Warn(ex); } }, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)); - - + + _clearRewardTimerTokenSource = new CancellationTokenSource(); + var token = _clearRewardTimerTokenSource.Token; //just a first line, in order to prevent queries. But since other shards can try to do this too, //i'll check in the db too. - var clearRewardTimer = Task.Run(async () => + _clearRewardTimer = Task.Run(async () => { - while (true) + while (!token.IsCancellationRequested) { _rewardedUsers.Clear(); await Task.Delay(TimeSpan.FromMinutes(_bc.BotConfig.XpMinutesTimeout)); } - }); + }, token); } public IEnumerable GetRoleRewards(ulong id) @@ -751,5 +754,17 @@ namespace NadekoBot.Modules.Xp.Services return new PathCollection(cornerToptLeft, cornerBottomLeft, cornerTopRight, cornerBottomRight); } + + public Task Unload() + { + _cmd.OnMessageNoTrigger -= _cmd_OnMessageNoTrigger; + + if (!_clearRewardTimerTokenSource.IsCancellationRequested) + _clearRewardTimerTokenSource.Cancel(); + + _updateXpTimer.Change(Timeout.Infinite, Timeout.Infinite); + _clearRewardTimerTokenSource.Dispose(); + return Task.CompletedTask; + } } } diff --git a/NadekoBot.Modules.Xp/Xp.cs b/NadekoBot.Modules.Xp/Xp.cs index a3356372..8685f381 100644 --- a/NadekoBot.Modules.Xp/Xp.cs +++ b/NadekoBot.Modules.Xp/Xp.cs @@ -1,7 +1,6 @@ using Discord; using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; diff --git a/NadekoBot.sln b/NadekoBot.sln index acbf7aad..dbdacba9 100644 --- a/NadekoBot.sln +++ b/NadekoBot.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.3 +VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}" EndProject @@ -13,25 +13,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot", "src\NadekoBot\NadekoBot.csproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.CustomReactions", "NadekoBot.Modules.CustomReactions\NadekoBot.Modules.CustomReactions.csproj", "{60F1217E-5E01-42DC-9B86-0FE910EDE081}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Core", "NadekoBot.Core\NadekoBot.Core.csproj", "{A6CCEFBD-DCF2-482C-9643-47664683548F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Xp", "NadekoBot.Modules.Xp\NadekoBot.Modules.Xp.csproj", "{41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Xp", "NadekoBot.Modules.Xp\NadekoBot.Modules.Xp.csproj", "{41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Utility", "NadekoBot.Modules.Utility\NadekoBot.Modules.Utility.csproj", "{07606931-CB55-4D20-8369-4E086B00EC52}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Utility", "NadekoBot.Modules.Utility\NadekoBot.Modules.Utility.csproj", "{07606931-CB55-4D20-8369-4E086B00EC52}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Searches", "NadekoBot.Module.Searches\NadekoBot.Modules.Searches.csproj", "{8BEE9984-3EB3-45BE-A5CF-0DB912626B81}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Searches", "NadekoBot.Module.Searches\NadekoBot.Modules.Searches.csproj", "{8BEE9984-3EB3-45BE-A5CF-0DB912626B81}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Nsfw", "NadekoBot.Modules.Nsfw\NadekoBot.Modules.Nsfw.csproj", "{75ED72EC-7AB3-4B12-A2DA-3655C740B356}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Nsfw", "NadekoBot.Modules.Nsfw\NadekoBot.Modules.Nsfw.csproj", "{75ED72EC-7AB3-4B12-A2DA-3655C740B356}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Games", "NadekoBot.Modules.Games\NadekoBot.Modules.Games.csproj", "{FF6BDE61-24B4-4DC2-99EE-409EA1650180}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Games", "NadekoBot.Modules.Games\NadekoBot.Modules.Games.csproj", "{FF6BDE61-24B4-4DC2-99EE-409EA1650180}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Gambling", "NadekoBot.Modules.Gambling\NadekoBot.Modules.Gambling.csproj", "{6436A700-694E-412C-92AE-B793FCD44E84}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Gambling", "NadekoBot.Modules.Gambling\NadekoBot.Modules.Gambling.csproj", "{6436A700-694E-412C-92AE-B793FCD44E84}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Pokemon", "NadekoBot.Modules.Pokemon\NadekoBot.Modules.Pokemon.csproj", "{30463C26-555B-4760-9459-A16DFA015DFA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Pokemon", "NadekoBot.Modules.Pokemon\NadekoBot.Modules.Pokemon.csproj", "{30463C26-555B-4760-9459-A16DFA015DFA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Music", "NadekoBot.Modules.Music\NadekoBot.Modules.Music.csproj", "{674E28A6-30B1-413D-BBD3-E5F71614A00F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Music", "NadekoBot.Modules.Music\NadekoBot.Modules.Music.csproj", "{674E28A6-30B1-413D-BBD3-E5F71614A00F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -46,12 +44,6 @@ Global {45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.Build.0 = Release|Any CPU {45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.ActiveCfg = Release|Any CPU {45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.Build.0 = Release|Any CPU - {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Debug|Any CPU.Build.0 = Debug|Any CPU - {60F1217E-5E01-42DC-9B86-0FE910EDE081}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU - {60F1217E-5E01-42DC-9B86-0FE910EDE081}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU - {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Release|Any CPU.ActiveCfg = Release|Any CPU - {60F1217E-5E01-42DC-9B86-0FE910EDE081}.Release|Any CPU.Build.0 = Release|Any CPU {A6CCEFBD-DCF2-482C-9643-47664683548F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6CCEFBD-DCF2-482C-9643-47664683548F}.Debug|Any CPU.Build.0 = Debug|Any CPU {A6CCEFBD-DCF2-482C-9643-47664683548F}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU @@ -112,7 +104,6 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {45EC1473-C678-4857-A544-07DFE0D0B478} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} - {60F1217E-5E01-42DC-9B86-0FE910EDE081} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {A6CCEFBD-DCF2-482C-9643-47664683548F} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {07606931-CB55-4D20-8369-4E086B00EC52} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index 86e064a1..c69eed1c 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -4,16 +4,13 @@ netcoreapp2.0 2.0.0 exe - $(AssetTargetFallback);dnxcore50;portable-net45+win8+wpa81 nadeko_icon.ico - win7-x64 - Debug;Release;global_nadeko latest true - 1.9.1 + 2.0.0 $(VersionPrefix).$(VersionSuffix) $(VersionPrefix) @@ -23,6 +20,12 @@ Always + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -66,6 +69,5 @@ - diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index 09e53142..f4845275 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -1,18 +1,20 @@ -namespace NadekoBot +using System.Threading.Tasks; + +namespace NadekoBot { public class Program { - public static void Main(string[] args) + public static Task Main(string[] args) { if (args.Length == 3 && int.TryParse(args[0], out int shardId) && int.TryParse(args[1], out int parentProcessId)) { int? port = null; if (int.TryParse(args[2], out var outPort)) port = outPort; - new NadekoBot(shardId, parentProcessId, outPort).RunAndBlockAsync(args).GetAwaiter().GetResult(); + return new NadekoBot(shardId, parentProcessId, outPort).RunAndBlockAsync(args); } else - new NadekoBot(0, 0).RunAndBlockAsync(args).GetAwaiter().GetResult(); + return new NadekoBot(0, 0).RunAndBlockAsync(args); } } } diff --git a/NadekoBot.Core/_strings/ResponseStrings.ar.json b/src/NadekoBot/_strings/ResponseStrings.ar.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.ar.json rename to src/NadekoBot/_strings/ResponseStrings.ar.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.cs-CZ.json b/src/NadekoBot/_strings/ResponseStrings.cs-CZ.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.cs-CZ.json rename to src/NadekoBot/_strings/ResponseStrings.cs-CZ.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.da-DK.json b/src/NadekoBot/_strings/ResponseStrings.da-DK.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.da-DK.json rename to src/NadekoBot/_strings/ResponseStrings.da-DK.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.de-DE.json b/src/NadekoBot/_strings/ResponseStrings.de-DE.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.de-DE.json rename to src/NadekoBot/_strings/ResponseStrings.de-DE.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.en-US.json rename to src/NadekoBot/_strings/ResponseStrings.en-US.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.es-ES.json b/src/NadekoBot/_strings/ResponseStrings.es-ES.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.es-ES.json rename to src/NadekoBot/_strings/ResponseStrings.es-ES.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.fr-FR.json b/src/NadekoBot/_strings/ResponseStrings.fr-FR.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.fr-FR.json rename to src/NadekoBot/_strings/ResponseStrings.fr-FR.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.he-IL.json b/src/NadekoBot/_strings/ResponseStrings.he-IL.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.he-IL.json rename to src/NadekoBot/_strings/ResponseStrings.he-IL.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.id-ID.json b/src/NadekoBot/_strings/ResponseStrings.id-ID.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.id-ID.json rename to src/NadekoBot/_strings/ResponseStrings.id-ID.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.it-IT.json b/src/NadekoBot/_strings/ResponseStrings.it-IT.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.it-IT.json rename to src/NadekoBot/_strings/ResponseStrings.it-IT.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.ja-JP.json b/src/NadekoBot/_strings/ResponseStrings.ja-JP.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.ja-JP.json rename to src/NadekoBot/_strings/ResponseStrings.ja-JP.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.ko-KR.json b/src/NadekoBot/_strings/ResponseStrings.ko-KR.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.ko-KR.json rename to src/NadekoBot/_strings/ResponseStrings.ko-KR.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.nb-NO.json b/src/NadekoBot/_strings/ResponseStrings.nb-NO.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.nb-NO.json rename to src/NadekoBot/_strings/ResponseStrings.nb-NO.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.nl-NL.json b/src/NadekoBot/_strings/ResponseStrings.nl-NL.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.nl-NL.json rename to src/NadekoBot/_strings/ResponseStrings.nl-NL.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.pl-PL.json b/src/NadekoBot/_strings/ResponseStrings.pl-PL.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.pl-PL.json rename to src/NadekoBot/_strings/ResponseStrings.pl-PL.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.pt-BR.json b/src/NadekoBot/_strings/ResponseStrings.pt-BR.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.pt-BR.json rename to src/NadekoBot/_strings/ResponseStrings.pt-BR.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.ro-RO.json b/src/NadekoBot/_strings/ResponseStrings.ro-RO.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.ro-RO.json rename to src/NadekoBot/_strings/ResponseStrings.ro-RO.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.ru-RU.json b/src/NadekoBot/_strings/ResponseStrings.ru-RU.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.ru-RU.json rename to src/NadekoBot/_strings/ResponseStrings.ru-RU.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.sr-cyrl-rs.json b/src/NadekoBot/_strings/ResponseStrings.sr-cyrl-rs.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.sr-cyrl-rs.json rename to src/NadekoBot/_strings/ResponseStrings.sr-cyrl-rs.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.sv-SE.json b/src/NadekoBot/_strings/ResponseStrings.sv-SE.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.sv-SE.json rename to src/NadekoBot/_strings/ResponseStrings.sv-SE.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.tr-TR.json b/src/NadekoBot/_strings/ResponseStrings.tr-TR.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.tr-TR.json rename to src/NadekoBot/_strings/ResponseStrings.tr-TR.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.zh-CN.json b/src/NadekoBot/_strings/ResponseStrings.zh-CN.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.zh-CN.json rename to src/NadekoBot/_strings/ResponseStrings.zh-CN.json diff --git a/NadekoBot.Core/_strings/ResponseStrings.zh-TW.json b/src/NadekoBot/_strings/ResponseStrings.zh-TW.json similarity index 100% rename from NadekoBot.Core/_strings/ResponseStrings.zh-TW.json rename to src/NadekoBot/_strings/ResponseStrings.zh-TW.json From 72f36270dcbcde65b2008a40902b29d2230fb410 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Mon, 9 Oct 2017 00:54:10 +0200 Subject: [PATCH 003/192] Added some more unloads, upped version to 2.0 --- NadekoBot.Core/Services/Impl/StatsService.cs | 2 +- NadekoBot.Core/Services/NadekoBot.cs | 3 ++- .../Services/SearchesService.cs | 21 ++++++++++++++++++- NadekoBot.Modules.Games/TriviaCommands.cs | 1 - NadekoBot.Modules.Music/Music.cs | 2 +- NadekoBot.Modules.Nsfw/NSFW.cs | 6 ------ 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/NadekoBot.Core/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs index 6c8611e0..36d26e1c 100644 --- a/NadekoBot.Core/Services/Impl/StatsService.cs +++ b/NadekoBot.Core/Services/Impl/StatsService.cs @@ -20,7 +20,7 @@ namespace NadekoBot.Services.Impl private readonly IBotCredentials _creds; private readonly DateTime _started; - public const string BotVersion = "1.10.2"; + public const string BotVersion = "2.0.0-alpha"; public string Author => "Kwoth#2560"; public string Library => "Discord.Net"; diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index 52fc2926..171a654b 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -22,6 +22,7 @@ using NadekoBot.Common.TypeReaders.Models; using NadekoBot.Services.Database; using StackExchange.Redis; using Newtonsoft.Json; +using System.Runtime.Loader; namespace NadekoBot { @@ -418,7 +419,7 @@ namespace NadekoBot { if (_packageModules.ContainsKey(name)) return false; - + var package = Assembly.LoadFile(Path.Combine(AppContext.BaseDirectory, "modules", $"NadekoBot.Modules.{name}", diff --git a/NadekoBot.Module.Searches/Services/SearchesService.cs b/NadekoBot.Module.Searches/Services/SearchesService.cs index 0ae3253a..ba9e14cc 100644 --- a/NadekoBot.Module.Searches/Services/SearchesService.cs +++ b/NadekoBot.Module.Searches/Services/SearchesService.cs @@ -16,10 +16,11 @@ using Microsoft.EntityFrameworkCore; using System.Net.Http; using Newtonsoft.Json.Linq; using AngleSharp; +using System.Threading; namespace NadekoBot.Modules.Searches.Services { - public class SearchesService : INService + public class SearchesService : INService, IUnloadableService { public HttpClient Http { get; } @@ -41,6 +42,11 @@ namespace NadekoBot.Modules.Searches.Services private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); + //todo clear when module unloaded + public ConcurrentDictionary _autoHentaiTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary _autoBoobTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary _autoButtTimers { get; } = new ConcurrentDictionary(); + private readonly ConcurrentDictionary> _blacklistedTags = new ConcurrentDictionary>(); public SearchesService(DiscordSocketClient client, IGoogleApiService google, DbService db, IEnumerable gcs) @@ -222,6 +228,19 @@ namespace NadekoBot.Modules.Searches.Services var response = await Http.GetStringAsync("http://api.icndb.com/jokes/random/").ConfigureAwait(false); return JObject.Parse(response)["value"]["joke"].ToString() + " 😆"; } + + public Task Unload() + { + _autoBoobTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + _autoBoobTimers.Clear(); + _autoButtTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + _autoButtTimers.Clear(); + _autoHentaiTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + _autoHentaiTimers.Clear(); + + _imageCacher.Clear(); + return Task.CompletedTask; + } } public struct UserChannelPair diff --git a/NadekoBot.Modules.Games/TriviaCommands.cs b/NadekoBot.Modules.Games/TriviaCommands.cs index 75810ba9..4b8e4129 100644 --- a/NadekoBot.Modules.Games/TriviaCommands.cs +++ b/NadekoBot.Modules.Games/TriviaCommands.cs @@ -12,7 +12,6 @@ namespace NadekoBot.Modules.Games { public partial class Games { - //todo move games to service, unload [Group] public class TriviaCommands : NadekoSubmodule { diff --git a/NadekoBot.Modules.Music/Music.cs b/NadekoBot.Modules.Music/Music.cs index 3aac503c..9c15a01a 100644 --- a/NadekoBot.Modules.Music/Music.cs +++ b/NadekoBot.Modules.Music/Music.cs @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Music _db = db; } - //todo changing server region is bugged again + //todo 50 changing server region is bugged again //private Task Client_UserVoiceStateUpdated(SocketUser iusr, SocketVoiceState oldState, SocketVoiceState newState) //{ // var t = Task.Run(() => diff --git a/NadekoBot.Modules.Nsfw/NSFW.cs b/NadekoBot.Modules.Nsfw/NSFW.cs index e9ad919b..7cc4f4fc 100644 --- a/NadekoBot.Modules.Nsfw/NSFW.cs +++ b/NadekoBot.Modules.Nsfw/NSFW.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Threading.Tasks; using NadekoBot.Extensions; using System.Threading; -using System.Collections.Concurrent; using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; @@ -19,11 +18,6 @@ namespace NadekoBot.Modules.NSFW // thanks to halitalf for adding autoboob and autobutt features :D public class NSFW : NadekoTopLevelModule { - //todo clear when module unloaded - private static readonly ConcurrentDictionary _autoHentaiTimers = new ConcurrentDictionary(); - private static readonly ConcurrentDictionary _autoBoobTimers = new ConcurrentDictionary(); - private static readonly ConcurrentDictionary _autoButtTimers = new ConcurrentDictionary(); - private static readonly ConcurrentHashSet _hentaiBombBlacklist = new ConcurrentHashSet(); private async Task InternalHentai(IMessageChannel channel, string tag, bool noError) From f3513779b7155cb180754805498600f07598424b Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Mon, 9 Oct 2017 02:52:46 +0200 Subject: [PATCH 004/192] Typereaders will be autoloaded when module loads --- .../TypeReaders/BotCommandTypeReader.cs | 14 ++- .../TypeReaders/GuildDateTimeTypeReader.cs | 74 ++++++++-------- .../Common/TypeReaders/GuildTypeReader.cs | 6 +- .../Common/TypeReaders/ModuleTypeReader.cs | 10 ++- .../Common/TypeReaders/NadekoTypeReader.cs | 18 ++++ .../TypeReaders/PermissionActionTypeReader.cs | 8 +- .../Services/Database/NadekoContext.cs | 3 +- NadekoBot.Core/Services/NadekoBot.cs | 55 ++++++++++-- .../NadekoBot.Modules.Gambling.csproj | 4 + .../WaifuClaimCommands.cs | 2 +- .../Common/Hangman/Hangman.cs | 6 +- .../Common/Hangman/TermPool.cs | 18 ++-- NadekoBot.Modules.Games/HangmanCommands.cs | 4 +- .../NadekoBot.Modules.Games.csproj | 4 + .../Services/GamesService.cs | 3 + .../NadekoBot.Modules.Music.csproj | 4 + .../Exceptions/TagBlacklistedException.cs | 7 -- NadekoBot.Modules.Nsfw/NSFW.cs | 13 +-- .../NadekoBot.Modules.Nsfw.csproj | 6 +- .../NadekoBot.Modules.Pokemon.csproj | 4 + .../AnimeSearchCommands.cs | 0 .../Common/AnimeResult.cs | 0 .../Common/DefineModel.cs | 0 .../Exceptions/StreamNotFoundException.cs | 0 .../Common/GoogleSearchResult.cs | 0 .../Common/MagicItem.cs | 0 .../Common/MangaResult.cs | 0 .../Common/OmdbProvider.cs | 0 .../Common/OverwatchApiModel.cs | 0 .../Common/SearchImageCacher.cs | 0 .../Common/SearchPokemon.cs | 0 .../Common/StreamResponses.cs | 0 .../Common/TimeModels.cs | 0 .../Common/WeatherModels.cs | 0 .../Common/WikipediaApiModel.cs | 0 .../Common/WoWJoke.cs | 0 .../Exceptions/TagBlacklistedException.cs | 12 +++ .../FeedCommands.cs | 0 .../JokeCommands.cs | 0 .../LoLCommands.cs | 0 .../MemegenCommands.cs | 0 .../NadekoBot.Modules.Searches.csproj | 0 .../OsuCommands.cs | 0 .../OverwatchCommands.cs | 0 .../PlaceCommands.cs | 0 .../PokemonSearchCommands.cs | 0 .../Searches.cs | 0 .../Services/AnimeSearchService.cs | 0 .../Services/FeedsService.cs | 0 .../Services/SearchesService.cs | 22 ++--- .../Services/StreamNotificationService.cs | 0 .../StreamNotificationCommands.cs | 0 .../TranslatorCommands.cs | 0 .../XkcdCommands.cs | 0 .../NadekoBot.Modules.Searches.csproj | 23 +++++ .../NadekoBot.Modules.Utility.csproj | 8 ++ NadekoBot.Modules.Utility/RepeatCommands.cs | 86 +++++++++---------- .../NadekoBot.Modules.Xp.csproj | 4 + NadekoBot.sln | 18 ++-- watchbuildall.ps1 | 20 +++++ 60 files changed, 316 insertions(+), 140 deletions(-) create mode 100644 NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/AnimeSearchCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/AnimeResult.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/DefineModel.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/Exceptions/StreamNotFoundException.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/GoogleSearchResult.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/MagicItem.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/MangaResult.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/OmdbProvider.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/OverwatchApiModel.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/SearchImageCacher.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/SearchPokemon.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/StreamResponses.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/TimeModels.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/WeatherModels.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/WikipediaApiModel.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Common/WoWJoke.cs (100%) create mode 100644 NadekoBot.Modules.Searches/Exceptions/TagBlacklistedException.cs rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/FeedCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/JokeCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/LoLCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/MemegenCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/NadekoBot.Modules.Searches.csproj (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/OsuCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/OverwatchCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/PlaceCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/PokemonSearchCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Searches.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Services/AnimeSearchService.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Services/FeedsService.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Services/SearchesService.cs (91%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/Services/StreamNotificationService.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/StreamNotificationCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/TranslatorCommands.cs (100%) rename {NadekoBot.Module.Searches => NadekoBot.Modules.Searches}/XkcdCommands.cs (100%) create mode 100644 NadekoBot.Modules.Utility/NadekoBot.Modules.Searches.csproj create mode 100644 watchbuildall.ps1 diff --git a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs index a0da4a2c..dfe7dca2 100644 --- a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs @@ -4,11 +4,17 @@ using System.Threading.Tasks; using Discord.Commands; using NadekoBot.Services; using NadekoBot.Modules.CustomReactions.Services; +using NadekoBot.Core.Common.TypeReaders; +using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class CommandTypeReader : TypeReader + public class CommandTypeReader : NadekoTypeReader { + public CommandTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } + public override Task Read(ICommandContext context, string input, IServiceProvider services) { var _cmds = ((INServiceProvider)services).GetService(); @@ -28,9 +34,13 @@ namespace NadekoBot.Common.TypeReaders return Task.FromResult(TypeReaderResult.FromSuccess(cmd)); } } - //todo dependency on the module + public class CommandOrCrTypeReader : CommandTypeReader { + public CommandOrCrTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } + public override async Task Read(ICommandContext context, string input, IServiceProvider services) { input = input.ToUpperInvariant(); diff --git a/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs index 95a39b85..1624af2a 100644 --- a/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs @@ -1,40 +1,46 @@ -//using System; -//using System.Threading.Tasks; -//using Discord.Commands; -//using NadekoBot.Modules.Administration.Services; +using System; +using System.Threading.Tasks; +using Discord.Commands; +using NadekoBot.Modules.Administration.Services; +using NadekoBot.Core.Common.TypeReaders; +using Discord.WebSocket; -//namespace NadekoBot.Common.TypeReaders -//{ -// public class GuildDateTimeTypeReader : TypeReader -// { -// public override Task Read(ICommandContext context, string input, IServiceProvider services) -// { -// var _gts = (GuildTimezoneService)services.GetService(typeof(GuildTimezoneService)); -// if (!DateTime.TryParse(input, out var dt)) -// return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Input string is in an incorrect format.")); +namespace NadekoBot.Common.TypeReaders +{ + public class GuildDateTimeTypeReader : NadekoTypeReader + { + public GuildDateTimeTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } -// var tz = _gts.GetTimeZoneOrUtc(context.Guild.Id); + public override Task Read(ICommandContext context, string input, IServiceProvider services) + { + var _gts = (GuildTimezoneService)services.GetService(typeof(GuildTimezoneService)); + if (!DateTime.TryParse(input, out var dt)) + return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Input string is in an incorrect format.")); -// return Task.FromResult(TypeReaderResult.FromSuccess(new GuildDateTime(tz, dt))); -// } -// } + var tz = _gts.GetTimeZoneOrUtc(context.Guild.Id); -// public class GuildDateTime -// { -// public TimeZoneInfo Timezone { get; } -// public DateTime CurrentGuildTime { get; } -// public DateTime InputTime { get; } -// public DateTime InputTimeUtc { get; } + return Task.FromResult(TypeReaderResult.FromSuccess(new GuildDateTime(tz, dt))); + } + } -// private GuildDateTime() { } + public class GuildDateTime + { + public TimeZoneInfo Timezone { get; } + public DateTime CurrentGuildTime { get; } + public DateTime InputTime { get; } + public DateTime InputTimeUtc { get; } -// public GuildDateTime(TimeZoneInfo guildTimezone, DateTime inputTime) -// { -// var now = DateTime.UtcNow; -// Timezone = guildTimezone; -// CurrentGuildTime = TimeZoneInfo.ConvertTime(now, TimeZoneInfo.Utc, Timezone); -// InputTime = inputTime; -// InputTimeUtc = TimeZoneInfo.ConvertTime(inputTime, Timezone, TimeZoneInfo.Utc); -// } -// } -//} + private GuildDateTime() { } + + public GuildDateTime(TimeZoneInfo guildTimezone, DateTime inputTime) + { + var now = DateTime.UtcNow; + Timezone = guildTimezone; + CurrentGuildTime = TimeZoneInfo.ConvertTime(now, TimeZoneInfo.Utc, Timezone); + InputTime = inputTime; + InputTimeUtc = TimeZoneInfo.ConvertTime(inputTime, Timezone, TimeZoneInfo.Utc); + } + } +} diff --git a/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs index 132e1f0f..40571e97 100644 --- a/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs @@ -3,17 +3,19 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; using Discord.WebSocket; +using NadekoBot.Core.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders { - public class GuildTypeReader : TypeReader + public class GuildTypeReader : NadekoTypeReader { private readonly DiscordSocketClient _client; - public GuildTypeReader(DiscordSocketClient client) + public GuildTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { _client = client; } + public override Task Read(ICommandContext context, string input, IServiceProvider _) { input = input.Trim().ToLowerInvariant(); diff --git a/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs index 1978732d..4ef4d52d 100644 --- a/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs @@ -3,14 +3,16 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; using NadekoBot.Extensions; +using NadekoBot.Core.Common.TypeReaders; +using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class ModuleTypeReader : TypeReader + public class ModuleTypeReader : NadekoTypeReader { private readonly CommandService _cmds; - public ModuleTypeReader(CommandService cmds) + public ModuleTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { _cmds = cmds; } @@ -26,11 +28,11 @@ namespace NadekoBot.Common.TypeReaders } } - public class ModuleOrCrTypeReader : TypeReader + public class ModuleOrCrTypeReader : NadekoTypeReader { private readonly CommandService _cmds; - public ModuleOrCrTypeReader(CommandService cmds) + public ModuleOrCrTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { _cmds = cmds; } diff --git a/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs new file mode 100644 index 00000000..b952f3b6 --- /dev/null +++ b/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs @@ -0,0 +1,18 @@ +using Discord.Commands; +using Discord.WebSocket; + +namespace NadekoBot.Core.Common.TypeReaders +{ + public abstract class NadekoTypeReader : TypeReader + { + private readonly DiscordSocketClient _client; + private readonly CommandService _cmds; + + private NadekoTypeReader() { } + public NadekoTypeReader(DiscordSocketClient client, CommandService cmds) + { + _client = client; + _cmds = cmds; + } + } +} diff --git a/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs index 82e16e16..b15dbf3e 100644 --- a/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs @@ -1,15 +1,21 @@ using System; using System.Threading.Tasks; using Discord.Commands; +using Discord.WebSocket; using NadekoBot.Common.TypeReaders.Models; +using NadekoBot.Core.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders { /// /// Used instead of bool for more flexible keywords for true/false only in the permission module /// - public class PermissionActionTypeReader : TypeReader + public class PermissionActionTypeReader : NadekoTypeReader { + public PermissionActionTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } + public override Task Read(ICommandContext context, string input, IServiceProvider _) { input = input.ToUpperInvariant(); diff --git a/NadekoBot.Core/Services/Database/NadekoContext.cs b/NadekoBot.Core/Services/Database/NadekoContext.cs index 9b4c1e46..2d484582 100644 --- a/NadekoBot.Core/Services/Database/NadekoContext.cs +++ b/NadekoBot.Core/Services/Database/NadekoContext.cs @@ -307,8 +307,7 @@ namespace NadekoBot.Services.Database .HasOne(x => x.GuildConfig) .WithOne(x => x.XpSettings); #endregion - - //todo major bug + #region XpRoleReward modelBuilder.Entity() .HasIndex(x => new { x.XpSettingsId, x.Level }) diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index 171a654b..224db737 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -23,6 +23,7 @@ using NadekoBot.Services.Database; using StackExchange.Redis; using Newtonsoft.Json; using System.Runtime.Loader; +using NadekoBot.Core.Common.TypeReaders; namespace NadekoBot { @@ -138,6 +139,8 @@ namespace NadekoBot .AddManual(Client) .AddManual(CommandService) .AddManual(botConfigProvider) + //todo this needs to reload whenever a new service is supposed to be loaded + //except at startup for obvious reasons .AddManual>(AllGuildConfigs) //todo wrap this .AddManual(this) .AddManual(uow) @@ -147,19 +150,50 @@ namespace NadekoBot var commandHandler = Services.GetService(); commandHandler.AddServices(Services); + + LoadTypeReaders(typeof(NadekoBot).Assembly); //setup typereaders - CommandService.AddTypeReader(new PermissionActionTypeReader()); - CommandService.AddTypeReader(new CommandTypeReader()); + CommandService.AddTypeReader(new PermissionActionTypeReader(Client, CommandService)); + CommandService.AddTypeReader(new CommandTypeReader(Client, CommandService)); //todo module dependency - CommandService.AddTypeReader(new CommandOrCrTypeReader()); - CommandService.AddTypeReader(new ModuleTypeReader(CommandService)); - CommandService.AddTypeReader(new ModuleOrCrTypeReader(CommandService)); - CommandService.AddTypeReader(new GuildTypeReader(Client)); + CommandService.AddTypeReader(new CommandOrCrTypeReader(Client, CommandService)); + CommandService.AddTypeReader(new ModuleTypeReader(Client, CommandService)); + CommandService.AddTypeReader(new ModuleOrCrTypeReader(Client, CommandService)); + CommandService.AddTypeReader(new GuildTypeReader(Client, CommandService)); //CommandService.AddTypeReader(new GuildDateTimeTypeReader()); } Services.Unload(typeof(IUnitOfWork)); // unload it after the startup } + private IEnumerable LoadTypeReaders(Assembly assembly) + { + Type[] allTypes; + try + { + allTypes = assembly.GetTypes(); + } + catch (ReflectionTypeLoadException ex) + { + Console.WriteLine(ex.LoaderExceptions[0]); + return Enumerable.Empty(); + } + var filteredTypes = allTypes + .Where(x => x.IsSubclassOf(typeof(NadekoTypeReader)) + && !x.IsAbstract); + + var toReturn = new List(); + foreach (var ft in filteredTypes) + { + //:yayyy: + var x = (NadekoTypeReader)Activator.CreateInstance(ft, Client, CommandService); + CommandService.AddTypeReader(x.GetType(), x); + toReturn.Add(x); + _log.Info("Loaded {0} typereader.", x.GetType().Name); + } + + return toReturn; + } + private async Task LoginAsync(string token) { var clientReady = new TaskCompletionSource(); @@ -254,7 +288,6 @@ namespace NadekoBot Ready.TrySetResult(true); HandleStatusChanges(); _log.Info($"Shard {Client.ShardId} ready."); - //_log.Info(await stats.Print().ConfigureAwait(false)); } private Task Client_Log(LogMessage arg) @@ -400,6 +433,7 @@ namespace NadekoBot _log.Info("Unloaded {0} types.", i); } + return true; } finally @@ -426,6 +460,13 @@ namespace NadekoBot $"NadekoBot.Modules.{name}.dll")); var types = Services.LoadFrom(package); var added = await CommandService.AddModulesAsync(package).ConfigureAwait(false); + var trs = LoadTypeReaders(package); + /* i don't have to unload typereaders + * (and there's no api for it) + * because they get overwritten anyway, and since + * the only time I'd unload typereaders, is when unloading a module + * which means they won't have a chance to be used + * */ _log.Info("Loaded {0} modules and {1} types.", added.Count(), types.Count()); _packageModules.Add(name, added); _packageTypes.Add(name, types); diff --git a/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj b/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj index b97a40e1..e12e9894 100644 --- a/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj +++ b/NadekoBot.Modules.Gambling/NadekoBot.Modules.Gambling.csproj @@ -15,4 +15,8 @@ + + + + diff --git a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs index 0709a5ee..875fd01c 100644 --- a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs +++ b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Gambling Depraved, Harlot } - //todo unclaimed waifus should lose 5% of their value a day + //todo unclaimed waifus should lose 3% of their value a day [Group] public class WaifuClaimCommands : NadekoSubmodule { diff --git a/NadekoBot.Modules.Games/Common/Hangman/Hangman.cs b/NadekoBot.Modules.Games/Common/Hangman/Hangman.cs index c3c7f9e9..3e7be20f 100644 --- a/NadekoBot.Modules.Games/Common/Hangman/Hangman.cs +++ b/NadekoBot.Modules.Games/Common/Hangman/Hangman.cs @@ -11,6 +11,7 @@ namespace NadekoBot.Modules.Games.Common.Hangman public class Hangman : IDisposable { public string TermType { get; } + public TermPool TermPool { get; } public HangmanObject Term { get; } public string ScrambledWord => "`" + String.Concat(Term.Word.Select(c => @@ -56,10 +57,11 @@ namespace NadekoBot.Modules.Games.Common.Hangman public Task EndedTask => _endingCompletionSource.Task; - public Hangman(string type) + public Hangman(string type, TermPool tp = null) { this.TermType = type.Trim().ToLowerInvariant().ToTitleCase(); - this.Term = TermPool.GetTerm(type); + this.TermPool = tp ?? new TermPool(); + this.Term = this.TermPool.GetTerm(type); } private void AddError() diff --git a/NadekoBot.Modules.Games/Common/Hangman/TermPool.cs b/NadekoBot.Modules.Games/Common/Hangman/TermPool.cs index 58ba56c4..2cc98d15 100644 --- a/NadekoBot.Modules.Games/Common/Hangman/TermPool.cs +++ b/NadekoBot.Modules.Games/Common/Hangman/TermPool.cs @@ -5,27 +5,35 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using NLog; namespace NadekoBot.Modules.Games.Common.Hangman { public class TermPool { const string termsPath = "data/hangman3.json"; - public static IReadOnlyDictionary Data { get; } = new Dictionary(); - static TermPool() + private readonly Logger _log; + + public IReadOnlyDictionary Data { get; } = new Dictionary(); + public TermPool() { + _log = LogManager.GetCurrentClassLogger(); try { Data = JsonConvert.DeserializeObject>(File.ReadAllText(termsPath)); + Data = Data.ToDictionary( + x => x.Key.ToLowerInvariant(), + x => x.Value); } - catch (Exception) + catch (Exception ex) { - //ignored + _log.Warn(ex); } } - public static HangmanObject GetTerm(string type) + public HangmanObject GetTerm(string type) { + type = type?.Trim().ToLowerInvariant(); var rng = new NadekoRandom(); if (type == "random") diff --git a/NadekoBot.Modules.Games/HangmanCommands.cs b/NadekoBot.Modules.Games/HangmanCommands.cs index 32986d62..97340865 100644 --- a/NadekoBot.Modules.Games/HangmanCommands.cs +++ b/NadekoBot.Modules.Games/HangmanCommands.cs @@ -26,14 +26,14 @@ namespace NadekoBot.Modules.Games [RequireContext(ContextType.Guild)] public async Task Hangmanlist() { - await Context.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + string.Join("\n", TermPool.Data.Keys)); + await Context.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + string.Join("\n", _service.TermPool.Data.Keys)); } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task Hangman([Remainder]string type = "random") { - var hm = new Hangman(type); + var hm = new Hangman(type, _service.TermPool); if (!_service.HangmanGames.TryAdd(Context.Channel.Id, hm)) { diff --git a/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj b/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj index 3cbf2e8b..8f99e6d7 100644 --- a/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj +++ b/NadekoBot.Modules.Games/NadekoBot.Modules.Games.csproj @@ -19,4 +19,8 @@ + + + + diff --git a/NadekoBot.Modules.Games/Services/GamesService.cs b/NadekoBot.Modules.Games/Services/GamesService.cs index 61a4415c..dece8333 100644 --- a/NadekoBot.Modules.Games/Services/GamesService.cs +++ b/NadekoBot.Modules.Games/Services/GamesService.cs @@ -46,7 +46,10 @@ namespace NadekoBot.Modules.Games.Services //channelId, game public ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); public ConcurrentDictionary Connect4Games { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); + public TermPool TermPool { get; } = new TermPool(); + public ConcurrentDictionary RunningTrivias { get; } = new ConcurrentDictionary(); public Dictionary TicTacToeGames { get; } = new Dictionary(); public ConcurrentDictionary RunningContests { get; } = new ConcurrentDictionary(); diff --git a/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj b/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj index eb9bb4e0..92e3c1d1 100644 --- a/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj +++ b/NadekoBot.Modules.Music/NadekoBot.Modules.Music.csproj @@ -16,4 +16,8 @@ + + + + diff --git a/NadekoBot.Modules.Nsfw/Exceptions/TagBlacklistedException.cs b/NadekoBot.Modules.Nsfw/Exceptions/TagBlacklistedException.cs index c0f881f3..5d4cfc92 100644 --- a/NadekoBot.Modules.Nsfw/Exceptions/TagBlacklistedException.cs +++ b/NadekoBot.Modules.Nsfw/Exceptions/TagBlacklistedException.cs @@ -2,11 +2,4 @@ namespace NadekoBot.Modules.NSFW.Exceptions { - public class TagBlacklistedException : Exception - { - public TagBlacklistedException() : base("Tag you used is blacklisted.") - { - - } - } } diff --git a/NadekoBot.Modules.Nsfw/NSFW.cs b/NadekoBot.Modules.Nsfw/NSFW.cs index 7cc4f4fc..4b16fb6c 100644 --- a/NadekoBot.Modules.Nsfw/NSFW.cs +++ b/NadekoBot.Modules.Nsfw/NSFW.cs @@ -12,6 +12,7 @@ using NadekoBot.Common.Collections; using NadekoBot.Modules.Searches.Common; using NadekoBot.Modules.Searches.Services; using NadekoBot.Modules.NSFW.Exceptions; +using NadekoBot.Modules.Searches.Exceptions; namespace NadekoBot.Modules.NSFW { @@ -85,7 +86,7 @@ namespace NadekoBot.Modules.NSFW if (interval == 0) { - if (!_autoHentaiTimers.TryRemove(Context.Channel.Id, out t)) return; + if (!_service.AutoHentaiTimers.TryRemove(Context.Channel.Id, out t)) return; t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer await ReplyConfirmLocalized("stopped").ConfigureAwait(false); @@ -112,7 +113,7 @@ namespace NadekoBot.Modules.NSFW } }, null, interval * 1000, interval * 1000); - _autoHentaiTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + _service.AutoHentaiTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => { old.Change(Timeout.Infinite, Timeout.Infinite); return t; @@ -131,7 +132,7 @@ namespace NadekoBot.Modules.NSFW if (interval == 0) { - if (!_autoBoobTimers.TryRemove(Context.Channel.Id, out t)) return; + if (!_service.AutoBoobTimers.TryRemove(Context.Channel.Id, out t)) return; t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer await ReplyConfirmLocalized("stopped").ConfigureAwait(false); @@ -153,7 +154,7 @@ namespace NadekoBot.Modules.NSFW } }, null, interval * 1000, interval * 1000); - _autoBoobTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + _service.AutoBoobTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => { old.Change(Timeout.Infinite, Timeout.Infinite); return t; @@ -170,7 +171,7 @@ namespace NadekoBot.Modules.NSFW if (interval == 0) { - if (!_autoButtTimers.TryRemove(Context.Channel.Id, out t)) return; + if (!_service.AutoButtTimers.TryRemove(Context.Channel.Id, out t)) return; t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer await ReplyConfirmLocalized("stopped").ConfigureAwait(false); @@ -192,7 +193,7 @@ namespace NadekoBot.Modules.NSFW } }, null, interval * 1000, interval * 1000); - _autoButtTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + _service.AutoButtTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => { old.Change(Timeout.Infinite, Timeout.Infinite); return t; diff --git a/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj b/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj index d8b31304..2ba0001c 100644 --- a/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj +++ b/NadekoBot.Modules.Nsfw/NadekoBot.Modules.Nsfw.csproj @@ -17,7 +17,11 @@ - + + + + + diff --git a/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj b/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj index b97a40e1..e12e9894 100644 --- a/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj +++ b/NadekoBot.Modules.Pokemon/NadekoBot.Modules.Pokemon.csproj @@ -15,4 +15,8 @@ + + + + diff --git a/NadekoBot.Module.Searches/AnimeSearchCommands.cs b/NadekoBot.Modules.Searches/AnimeSearchCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/AnimeSearchCommands.cs rename to NadekoBot.Modules.Searches/AnimeSearchCommands.cs diff --git a/NadekoBot.Module.Searches/Common/AnimeResult.cs b/NadekoBot.Modules.Searches/Common/AnimeResult.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/AnimeResult.cs rename to NadekoBot.Modules.Searches/Common/AnimeResult.cs diff --git a/NadekoBot.Module.Searches/Common/DefineModel.cs b/NadekoBot.Modules.Searches/Common/DefineModel.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/DefineModel.cs rename to NadekoBot.Modules.Searches/Common/DefineModel.cs diff --git a/NadekoBot.Module.Searches/Common/Exceptions/StreamNotFoundException.cs b/NadekoBot.Modules.Searches/Common/Exceptions/StreamNotFoundException.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/Exceptions/StreamNotFoundException.cs rename to NadekoBot.Modules.Searches/Common/Exceptions/StreamNotFoundException.cs diff --git a/NadekoBot.Module.Searches/Common/GoogleSearchResult.cs b/NadekoBot.Modules.Searches/Common/GoogleSearchResult.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/GoogleSearchResult.cs rename to NadekoBot.Modules.Searches/Common/GoogleSearchResult.cs diff --git a/NadekoBot.Module.Searches/Common/MagicItem.cs b/NadekoBot.Modules.Searches/Common/MagicItem.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/MagicItem.cs rename to NadekoBot.Modules.Searches/Common/MagicItem.cs diff --git a/NadekoBot.Module.Searches/Common/MangaResult.cs b/NadekoBot.Modules.Searches/Common/MangaResult.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/MangaResult.cs rename to NadekoBot.Modules.Searches/Common/MangaResult.cs diff --git a/NadekoBot.Module.Searches/Common/OmdbProvider.cs b/NadekoBot.Modules.Searches/Common/OmdbProvider.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/OmdbProvider.cs rename to NadekoBot.Modules.Searches/Common/OmdbProvider.cs diff --git a/NadekoBot.Module.Searches/Common/OverwatchApiModel.cs b/NadekoBot.Modules.Searches/Common/OverwatchApiModel.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/OverwatchApiModel.cs rename to NadekoBot.Modules.Searches/Common/OverwatchApiModel.cs diff --git a/NadekoBot.Module.Searches/Common/SearchImageCacher.cs b/NadekoBot.Modules.Searches/Common/SearchImageCacher.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/SearchImageCacher.cs rename to NadekoBot.Modules.Searches/Common/SearchImageCacher.cs diff --git a/NadekoBot.Module.Searches/Common/SearchPokemon.cs b/NadekoBot.Modules.Searches/Common/SearchPokemon.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/SearchPokemon.cs rename to NadekoBot.Modules.Searches/Common/SearchPokemon.cs diff --git a/NadekoBot.Module.Searches/Common/StreamResponses.cs b/NadekoBot.Modules.Searches/Common/StreamResponses.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/StreamResponses.cs rename to NadekoBot.Modules.Searches/Common/StreamResponses.cs diff --git a/NadekoBot.Module.Searches/Common/TimeModels.cs b/NadekoBot.Modules.Searches/Common/TimeModels.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/TimeModels.cs rename to NadekoBot.Modules.Searches/Common/TimeModels.cs diff --git a/NadekoBot.Module.Searches/Common/WeatherModels.cs b/NadekoBot.Modules.Searches/Common/WeatherModels.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/WeatherModels.cs rename to NadekoBot.Modules.Searches/Common/WeatherModels.cs diff --git a/NadekoBot.Module.Searches/Common/WikipediaApiModel.cs b/NadekoBot.Modules.Searches/Common/WikipediaApiModel.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/WikipediaApiModel.cs rename to NadekoBot.Modules.Searches/Common/WikipediaApiModel.cs diff --git a/NadekoBot.Module.Searches/Common/WoWJoke.cs b/NadekoBot.Modules.Searches/Common/WoWJoke.cs similarity index 100% rename from NadekoBot.Module.Searches/Common/WoWJoke.cs rename to NadekoBot.Modules.Searches/Common/WoWJoke.cs diff --git a/NadekoBot.Modules.Searches/Exceptions/TagBlacklistedException.cs b/NadekoBot.Modules.Searches/Exceptions/TagBlacklistedException.cs new file mode 100644 index 00000000..68091853 --- /dev/null +++ b/NadekoBot.Modules.Searches/Exceptions/TagBlacklistedException.cs @@ -0,0 +1,12 @@ +using System; + +namespace NadekoBot.Modules.Searches.Exceptions +{ + public class TagBlacklistedException : Exception + { + public TagBlacklistedException() : base("Tag you used is blacklisted.") + { + + } + } +} diff --git a/NadekoBot.Module.Searches/FeedCommands.cs b/NadekoBot.Modules.Searches/FeedCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/FeedCommands.cs rename to NadekoBot.Modules.Searches/FeedCommands.cs diff --git a/NadekoBot.Module.Searches/JokeCommands.cs b/NadekoBot.Modules.Searches/JokeCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/JokeCommands.cs rename to NadekoBot.Modules.Searches/JokeCommands.cs diff --git a/NadekoBot.Module.Searches/LoLCommands.cs b/NadekoBot.Modules.Searches/LoLCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/LoLCommands.cs rename to NadekoBot.Modules.Searches/LoLCommands.cs diff --git a/NadekoBot.Module.Searches/MemegenCommands.cs b/NadekoBot.Modules.Searches/MemegenCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/MemegenCommands.cs rename to NadekoBot.Modules.Searches/MemegenCommands.cs diff --git a/NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj b/NadekoBot.Modules.Searches/NadekoBot.Modules.Searches.csproj similarity index 100% rename from NadekoBot.Module.Searches/NadekoBot.Modules.Searches.csproj rename to NadekoBot.Modules.Searches/NadekoBot.Modules.Searches.csproj diff --git a/NadekoBot.Module.Searches/OsuCommands.cs b/NadekoBot.Modules.Searches/OsuCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/OsuCommands.cs rename to NadekoBot.Modules.Searches/OsuCommands.cs diff --git a/NadekoBot.Module.Searches/OverwatchCommands.cs b/NadekoBot.Modules.Searches/OverwatchCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/OverwatchCommands.cs rename to NadekoBot.Modules.Searches/OverwatchCommands.cs diff --git a/NadekoBot.Module.Searches/PlaceCommands.cs b/NadekoBot.Modules.Searches/PlaceCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/PlaceCommands.cs rename to NadekoBot.Modules.Searches/PlaceCommands.cs diff --git a/NadekoBot.Module.Searches/PokemonSearchCommands.cs b/NadekoBot.Modules.Searches/PokemonSearchCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/PokemonSearchCommands.cs rename to NadekoBot.Modules.Searches/PokemonSearchCommands.cs diff --git a/NadekoBot.Module.Searches/Searches.cs b/NadekoBot.Modules.Searches/Searches.cs similarity index 100% rename from NadekoBot.Module.Searches/Searches.cs rename to NadekoBot.Modules.Searches/Searches.cs diff --git a/NadekoBot.Module.Searches/Services/AnimeSearchService.cs b/NadekoBot.Modules.Searches/Services/AnimeSearchService.cs similarity index 100% rename from NadekoBot.Module.Searches/Services/AnimeSearchService.cs rename to NadekoBot.Modules.Searches/Services/AnimeSearchService.cs diff --git a/NadekoBot.Module.Searches/Services/FeedsService.cs b/NadekoBot.Modules.Searches/Services/FeedsService.cs similarity index 100% rename from NadekoBot.Module.Searches/Services/FeedsService.cs rename to NadekoBot.Modules.Searches/Services/FeedsService.cs diff --git a/NadekoBot.Module.Searches/Services/SearchesService.cs b/NadekoBot.Modules.Searches/Services/SearchesService.cs similarity index 91% rename from NadekoBot.Module.Searches/Services/SearchesService.cs rename to NadekoBot.Modules.Searches/Services/SearchesService.cs index ba9e14cc..61114bd1 100644 --- a/NadekoBot.Module.Searches/Services/SearchesService.cs +++ b/NadekoBot.Modules.Searches/Services/SearchesService.cs @@ -17,6 +17,7 @@ using System.Net.Http; using Newtonsoft.Json.Linq; using AngleSharp; using System.Threading; +using NadekoBot.Modules.Searches.Exceptions; namespace NadekoBot.Modules.Searches.Services { @@ -43,9 +44,9 @@ namespace NadekoBot.Modules.Searches.Services private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); //todo clear when module unloaded - public ConcurrentDictionary _autoHentaiTimers { get; } = new ConcurrentDictionary(); - public ConcurrentDictionary _autoBoobTimers { get; } = new ConcurrentDictionary(); - public ConcurrentDictionary _autoButtTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AutoHentaiTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AutoBoobTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AutoButtTimers { get; } = new ConcurrentDictionary(); private readonly ConcurrentDictionary> _blacklistedTags = new ConcurrentDictionary>(); @@ -147,8 +148,7 @@ namespace NadekoBot.Modules.Searches.Services if (blacklistedTags .Any(x => tag.ToLowerInvariant().Contains(x))) { - //todo tag blacklisted - throw new Exception(); + throw new TagBlacklistedException(); } var cacher = _imageCacher.GetOrAdd(guild.Value, (key) => new SearchImageCacher()); @@ -231,12 +231,12 @@ namespace NadekoBot.Modules.Searches.Services public Task Unload() { - _autoBoobTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); - _autoBoobTimers.Clear(); - _autoButtTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); - _autoButtTimers.Clear(); - _autoHentaiTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); - _autoHentaiTimers.Clear(); + AutoBoobTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + AutoBoobTimers.Clear(); + AutoButtTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + AutoButtTimers.Clear(); + AutoHentaiTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + AutoHentaiTimers.Clear(); _imageCacher.Clear(); return Task.CompletedTask; diff --git a/NadekoBot.Module.Searches/Services/StreamNotificationService.cs b/NadekoBot.Modules.Searches/Services/StreamNotificationService.cs similarity index 100% rename from NadekoBot.Module.Searches/Services/StreamNotificationService.cs rename to NadekoBot.Modules.Searches/Services/StreamNotificationService.cs diff --git a/NadekoBot.Module.Searches/StreamNotificationCommands.cs b/NadekoBot.Modules.Searches/StreamNotificationCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/StreamNotificationCommands.cs rename to NadekoBot.Modules.Searches/StreamNotificationCommands.cs diff --git a/NadekoBot.Module.Searches/TranslatorCommands.cs b/NadekoBot.Modules.Searches/TranslatorCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/TranslatorCommands.cs rename to NadekoBot.Modules.Searches/TranslatorCommands.cs diff --git a/NadekoBot.Module.Searches/XkcdCommands.cs b/NadekoBot.Modules.Searches/XkcdCommands.cs similarity index 100% rename from NadekoBot.Module.Searches/XkcdCommands.cs rename to NadekoBot.Modules.Searches/XkcdCommands.cs diff --git a/NadekoBot.Modules.Utility/NadekoBot.Modules.Searches.csproj b/NadekoBot.Modules.Utility/NadekoBot.Modules.Searches.csproj new file mode 100644 index 00000000..0ec5a3a3 --- /dev/null +++ b/NadekoBot.Modules.Utility/NadekoBot.Modules.Searches.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false + + + + + + + + + + + + diff --git a/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj b/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj index af75a27c..63b44250 100644 --- a/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj +++ b/NadekoBot.Modules.Utility/NadekoBot.Modules.Utility.csproj @@ -20,4 +20,12 @@ + + + + + + + + diff --git a/NadekoBot.Modules.Utility/RepeatCommands.cs b/NadekoBot.Modules.Utility/RepeatCommands.cs index 2d60b9dd..921c0746 100644 --- a/NadekoBot.Modules.Utility/RepeatCommands.cs +++ b/NadekoBot.Modules.Utility/RepeatCommands.cs @@ -147,59 +147,57 @@ namespace NadekoBot.Modules.Utility Format.Bold(rep.Repeater.Interval.Minutes.ToString()))).ConfigureAwait(false); } - //todo guild date time + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.ManageMessages)] + [Priority(1)] + public async Task Repeat(GuildDateTime gt, [Remainder] string message) + { + if (!_service.RepeaterReady) + return; - //[NadekoCommand, Usage, Description, Aliases] - //[RequireContext(ContextType.Guild)] - //[RequireUserPermission(GuildPermission.ManageMessages)] - //[Priority(1)] - //public async Task Repeat(GuildDateTime gt, [Remainder] string message) - //{ - // if (!_service.RepeaterReady) - // return; + if (string.IsNullOrWhiteSpace(message)) + return; - // if (string.IsNullOrWhiteSpace(message)) - // return; + var toAdd = new GuildRepeater() + { + ChannelId = Context.Channel.Id, + GuildId = Context.Guild.Id, + Interval = TimeSpan.FromHours(24), + StartTimeOfDay = gt.InputTimeUtc.TimeOfDay, + Message = message + }; - // var toAdd = new GuildRepeater() - // { - // ChannelId = Context.Channel.Id, - // GuildId = Context.Guild.Id, - // Interval = TimeSpan.FromHours(24), - // StartTimeOfDay = gt.InputTimeUtc.TimeOfDay, - // Message = message - // }; + using (var uow = _db.UnitOfWork) + { + var gc = uow.GuildConfigs.For(Context.Guild.Id, set => set.Include(x => x.GuildRepeaters)); - // using (var uow = _db.UnitOfWork) - // { - // var gc = uow.GuildConfigs.For(Context.Guild.Id, set => set.Include(x => x.GuildRepeaters)); + if (gc.GuildRepeaters.Count >= 5) + return; + gc.GuildRepeaters.Add(toAdd); - // if (gc.GuildRepeaters.Count >= 5) - // return; - // gc.GuildRepeaters.Add(toAdd); + await uow.CompleteAsync().ConfigureAwait(false); + } - // await uow.CompleteAsync().ConfigureAwait(false); - // } + var rep = new RepeatRunner(_client, (SocketGuild)Context.Guild, toAdd); - // var rep = new RepeatRunner(_client, (SocketGuild)Context.Guild, toAdd); + _service.Repeaters.AddOrUpdate(Context.Guild.Id, new ConcurrentQueue(new[] { rep }), (key, old) => + { + old.Enqueue(rep); + return old; + }); - // _service.Repeaters.AddOrUpdate(Context.Guild.Id, new ConcurrentQueue(new[] { rep }), (key, old) => - // { - // old.Enqueue(rep); - // return old; - // }); + var secondPart = GetText("repeater_initial", + Format.Bold(rep.InitialInterval.Hours.ToString()), + Format.Bold(rep.InitialInterval.Minutes.ToString())); - // var secondPart = GetText("repeater_initial", - // Format.Bold(rep.InitialInterval.Hours.ToString()), - // Format.Bold(rep.InitialInterval.Minutes.ToString())); - - // await Context.Channel.SendConfirmAsync( - // "🔁 " + GetText("repeater", - // Format.Bold(((IGuildUser)Context.User).GuildPermissions.MentionEveryone ? rep.Repeater.Message : rep.Repeater.Message.SanitizeMentions()), - // Format.Bold(rep.Repeater.Interval.Days.ToString()), - // Format.Bold(rep.Repeater.Interval.Hours.ToString()), - // Format.Bold(rep.Repeater.Interval.Minutes.ToString())) + " " + secondPart).ConfigureAwait(false); - //} + await Context.Channel.SendConfirmAsync( + "🔁 " + GetText("repeater", + Format.Bold(((IGuildUser)Context.User).GuildPermissions.MentionEveryone ? rep.Repeater.Message : rep.Repeater.Message.SanitizeMentions()), + Format.Bold(rep.Repeater.Interval.Days.ToString()), + Format.Bold(rep.Repeater.Interval.Hours.ToString()), + Format.Bold(rep.Repeater.Interval.Minutes.ToString())) + " " + secondPart).ConfigureAwait(false); + } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] diff --git a/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj b/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj index f00a0053..a07d2b7c 100644 --- a/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj +++ b/NadekoBot.Modules.Xp/NadekoBot.Modules.Xp.csproj @@ -19,4 +19,8 @@ + + + + diff --git a/NadekoBot.sln b/NadekoBot.sln index dbdacba9..ccfd0ee1 100644 --- a/NadekoBot.sln +++ b/NadekoBot.sln @@ -19,8 +19,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Xp", "Nad EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Utility", "NadekoBot.Modules.Utility\NadekoBot.Modules.Utility.csproj", "{07606931-CB55-4D20-8369-4E086B00EC52}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Searches", "NadekoBot.Module.Searches\NadekoBot.Modules.Searches.csproj", "{8BEE9984-3EB3-45BE-A5CF-0DB912626B81}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Nsfw", "NadekoBot.Modules.Nsfw\NadekoBot.Modules.Nsfw.csproj", "{75ED72EC-7AB3-4B12-A2DA-3655C740B356}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Games", "NadekoBot.Modules.Games\NadekoBot.Modules.Games.csproj", "{FF6BDE61-24B4-4DC2-99EE-409EA1650180}" @@ -31,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Pokemon", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Music", "NadekoBot.Modules.Music\NadekoBot.Modules.Music.csproj", "{674E28A6-30B1-413D-BBD3-E5F71614A00F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Modules.Searches", "NadekoBot.Modules.Searches\NadekoBot.Modules.Searches.csproj", "{ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -62,12 +62,6 @@ Global {07606931-CB55-4D20-8369-4E086B00EC52}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU {07606931-CB55-4D20-8369-4E086B00EC52}.Release|Any CPU.ActiveCfg = Release|Any CPU {07606931-CB55-4D20-8369-4E086B00EC52}.Release|Any CPU.Build.0 = Release|Any CPU - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81}.Release|Any CPU.Build.0 = Release|Any CPU {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.Debug|Any CPU.Build.0 = Debug|Any CPU {75ED72EC-7AB3-4B12-A2DA-3655C740B356}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU @@ -98,6 +92,12 @@ Global {674E28A6-30B1-413D-BBD3-E5F71614A00F}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU {674E28A6-30B1-413D-BBD3-E5F71614A00F}.Release|Any CPU.ActiveCfg = Release|Any CPU {674E28A6-30B1-413D-BBD3-E5F71614A00F}.Release|Any CPU.Build.0 = Release|Any CPU + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -107,12 +107,12 @@ Global {A6CCEFBD-DCF2-482C-9643-47664683548F} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {41A2DEBA-E8AE-4EC8-A58F-01C4B6E599E5} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {07606931-CB55-4D20-8369-4E086B00EC52} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} - {8BEE9984-3EB3-45BE-A5CF-0DB912626B81} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {75ED72EC-7AB3-4B12-A2DA-3655C740B356} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {FF6BDE61-24B4-4DC2-99EE-409EA1650180} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {6436A700-694E-412C-92AE-B793FCD44E84} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {30463C26-555B-4760-9459-A16DFA015DFA} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} {674E28A6-30B1-413D-BBD3-E5F71614A00F} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {ED6DCB6E-66BE-45F4-A1D6-67FE01BCACD9} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5F3F555C-855F-4BE8-B526-D062D3E8ACA4} diff --git a/watchbuildall.ps1 b/watchbuildall.ps1 new file mode 100644 index 00000000..80ea23e5 --- /dev/null +++ b/watchbuildall.ps1 @@ -0,0 +1,20 @@ +$cur = (Get-Item -Path ".\" -Verbose).FullName + +function WatchBuild([string] $path, [string] $args) +{ + cd $cur + cd $path + cmd.exe /c "dotnet watch" + cd $cur +} + + +WatchBuild(".\NadekoBot.Modules.CustomReactions") +WatchBuild(".\NadekoBot.Modules.Gambling") +WatchBuild(".\NadekoBot.Modules.Games") +WatchBuild(".\NadekoBot.Modules.Music") +WatchBuild(".\NadekoBot.Modules.Nsfw") +WatchBuild(".\NadekoBot.Modules.Pokemon") +WatchBuild(".\NadekoBot.Modules.Searches") +WatchBuild(".\NadekoBot.Modules.Utility") +WatchBuild(".\NadekoBot.Modules.Xp") From a12702fb68522513a0e6e6dffe67891c7e9b21e9 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Mon, 9 Oct 2017 02:57:03 +0200 Subject: [PATCH 005/192] you can no longer use .die as a startup command... --- NadekoBot.Core/Modules/Administration/SelfCommands.cs | 4 +++- NadekoBot.Core/Modules/Administration/Services/SelfService.cs | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NadekoBot.Core/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs index 0250ede9..ca526f48 100644 --- a/NadekoBot.Core/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -48,7 +48,9 @@ namespace NadekoBot.Modules.Administration [OwnerOnly] public async Task StartupCommandAdd([Remainder] string cmdText) { - //todo don't let .die be a startup command + if (cmdText.StartsWith(Prefix + "die")) + return; + var guser = ((IGuildUser)Context.User); var cmd = new StartupCommand() { diff --git a/NadekoBot.Core/Modules/Administration/Services/SelfService.cs b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs index 93699858..c0a811fa 100644 --- a/NadekoBot.Core/Modules/Administration/Services/SelfService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs @@ -48,6 +48,10 @@ namespace NadekoBot.Modules.Administration.Services foreach (var cmd in bc.BotConfig.StartupCommands) { + var prefix = _cmdHandler.GetPrefix(cmd.GuildId); + //if someone already has .die as their startup command, ignore it + if (cmd.CommandText.StartsWith(prefix + "die")) + continue; await cmdHandler.ExecuteExternal(cmd.GuildId, cmd.ChannelId, cmd.CommandText); await Task.Delay(400).ConfigureAwait(false); } From 3d3871f903eec31c767f21a28e1c00ff9e878a20 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Mon, 9 Oct 2017 02:59:00 +0200 Subject: [PATCH 006/192] Cleanup --- NadekoBot.Core/Services/NadekoBot.cs | 11 +---------- .../Services/SearchesService.cs | 3 +-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index 224db737..cc23398e 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -145,22 +145,13 @@ namespace NadekoBot .AddManual(this) .AddManual(uow) .AddManual(new RedisCache(Client.CurrentUser.Id)); + Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler))); var commandHandler = Services.GetService(); commandHandler.AddServices(Services); - LoadTypeReaders(typeof(NadekoBot).Assembly); - //setup typereaders - CommandService.AddTypeReader(new PermissionActionTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new CommandTypeReader(Client, CommandService)); - //todo module dependency - CommandService.AddTypeReader(new CommandOrCrTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new ModuleTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new ModuleOrCrTypeReader(Client, CommandService)); - CommandService.AddTypeReader(new GuildTypeReader(Client, CommandService)); - //CommandService.AddTypeReader(new GuildDateTimeTypeReader()); } Services.Unload(typeof(IUnitOfWork)); // unload it after the startup } diff --git a/NadekoBot.Modules.Searches/Services/SearchesService.cs b/NadekoBot.Modules.Searches/Services/SearchesService.cs index 61114bd1..ded817e5 100644 --- a/NadekoBot.Modules.Searches/Services/SearchesService.cs +++ b/NadekoBot.Modules.Searches/Services/SearchesService.cs @@ -42,8 +42,7 @@ namespace NadekoBot.Modules.Searches.Services public List MagicItems { get; } = new List(); private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); - - //todo clear when module unloaded + public ConcurrentDictionary AutoHentaiTimers { get; } = new ConcurrentDictionary(); public ConcurrentDictionary AutoBoobTimers { get; } = new ConcurrentDictionary(); public ConcurrentDictionary AutoButtTimers { get; } = new ConcurrentDictionary(); From 0bacb1f780198c842322aac8884bce2be4fd2ad9 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 10 Oct 2017 00:04:02 +0200 Subject: [PATCH 007/192] Typereaders finished, cleanup --- .../Common/ShardCom/ShardComClient.cs | 16 +- .../Common/ShardCom/ShardComServer.cs | 27 +-- .../TypeReaders/BotCommandTypeReader.cs | 10 +- .../TypeReaders/GuildDateTimeTypeReader.cs | 2 +- .../Common/TypeReaders/GuildTypeReader.cs | 3 +- .../Common/TypeReaders/ModuleTypeReader.cs | 4 +- .../Common/TypeReaders/NadekoTypeReader.cs | 3 +- .../TypeReaders/PermissionActionTypeReader.cs | 2 +- .../Services/PlayingRotateService.cs | 2 +- NadekoBot.Core/Services/Impl/RedisCache.cs | 9 +- NadekoBot.Core/Services/NadekoBot.cs | 46 ++-- NadekoBot.Core/Services/ShardsCoordinator.cs | 23 +- NadekoBot.Core/_Extensions/Extensions.cs | 15 ++ .../Common/CurrencyEvents/CurrencyEvent.cs | 12 + .../Common/CurrencyEvents/ReactionEvent.cs | 144 ++++++++++++ .../Common/CurrencyEvents/SneakyEvent.cs | 99 ++++++++ .../CurrencyEventsCommands.cs | 220 ++---------------- .../Services/CurrencyEventsService.cs | 66 ++++++ src/NadekoBot/Program.cs | 7 +- 19 files changed, 436 insertions(+), 274 deletions(-) create mode 100644 NadekoBot.Modules.Gambling/Common/CurrencyEvents/CurrencyEvent.cs create mode 100644 NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs create mode 100644 NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs create mode 100644 NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs diff --git a/NadekoBot.Core/Common/ShardCom/ShardComClient.cs b/NadekoBot.Core/Common/ShardCom/ShardComClient.cs index 9c10a11d..595c289c 100644 --- a/NadekoBot.Core/Common/ShardCom/ShardComClient.cs +++ b/NadekoBot.Core/Common/ShardCom/ShardComClient.cs @@ -3,26 +3,26 @@ using System.Net.Sockets; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; +using NadekoBot.Services; +using StackExchange.Redis; namespace NadekoBot.Common.ShardCom { public class ShardComClient { - private int port; + private readonly IDataCache _cache; - public ShardComClient(int port) + public ShardComClient(IDataCache cache) { - this.port = port; + _cache = cache; } public async Task Send(ShardComMessage data) { + var sub = _cache.Redis.GetSubscriber(); var msg = JsonConvert.SerializeObject(data); - using (var client = new UdpClient()) - { - var bytes = Encoding.UTF8.GetBytes(msg); - await client.SendAsync(bytes, bytes.Length, IPAddress.Loopback.ToString(), port).ConfigureAwait(false); - } + + await sub.PublishAsync("shardcoord_send", msg).ConfigureAwait(false); } } } diff --git a/NadekoBot.Core/Common/ShardCom/ShardComServer.cs b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs index b6b5a0ba..1a5737d7 100644 --- a/NadekoBot.Core/Common/ShardCom/ShardComServer.cs +++ b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs @@ -4,35 +4,26 @@ using System.Net.Sockets; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; +using NadekoBot.Services; namespace NadekoBot.Common.ShardCom { - public class ShardComServer : IDisposable + public class ShardComServer { - private readonly UdpClient _client; + private readonly IDataCache _cache; - public ShardComServer(int port) + public ShardComServer(IDataCache cache) { - _client = new UdpClient(port); + _cache = cache; } public void Start() { - Task.Run(async () => + var sub = _cache.Redis.GetSubscriber(); + sub.SubscribeAsync("shardcoord_send", (ch, data) => { - var ip = new IPEndPoint(IPAddress.Any, 0); - while (true) - { - var recv = await _client.ReceiveAsync(); - var data = Encoding.UTF8.GetString(recv.Buffer); - var _ = OnDataReceived(JsonConvert.DeserializeObject(data)); - } - }); - } - - public void Dispose() - { - _client.Dispose(); + var _ = OnDataReceived(JsonConvert.DeserializeObject(data)); + }, StackExchange.Redis.CommandFlags.FireAndForget); } public event Func OnDataReceived = delegate { return Task.CompletedTask; }; diff --git a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs index dfe7dca2..2e1939bf 100644 --- a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs @@ -9,7 +9,7 @@ using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class CommandTypeReader : NadekoTypeReader + public class CommandTypeReader : NadekoTypeReader { public CommandTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { @@ -35,10 +35,14 @@ namespace NadekoBot.Common.TypeReaders } } - public class CommandOrCrTypeReader : CommandTypeReader + public class CommandOrCrTypeReader : NadekoTypeReader { + private readonly DiscordSocketClient _client; + private readonly CommandService _cmds; public CommandOrCrTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { + _client = client; + _cmds = cmds; } public override async Task Read(ICommandContext context, string input, IServiceProvider services) @@ -63,7 +67,7 @@ namespace NadekoBot.Common.TypeReaders } } - var cmd = await base.Read(context, input, services); + var cmd = await new CommandTypeReader(_client, _cmds).Read(context, input, services); if (cmd.IsSuccess) { return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name)); diff --git a/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs index 1624af2a..3103cbf3 100644 --- a/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs @@ -7,7 +7,7 @@ using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class GuildDateTimeTypeReader : NadekoTypeReader + public class GuildDateTimeTypeReader : NadekoTypeReader { public GuildDateTimeTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { diff --git a/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs index 40571e97..cad1a8e4 100644 --- a/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs @@ -4,10 +4,11 @@ using System.Threading.Tasks; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Core.Common.TypeReaders; +using Discord; namespace NadekoBot.Common.TypeReaders { - public class GuildTypeReader : NadekoTypeReader + public class GuildTypeReader : NadekoTypeReader { private readonly DiscordSocketClient _client; diff --git a/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs index 4ef4d52d..e7f49ec7 100644 --- a/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs @@ -8,7 +8,7 @@ using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class ModuleTypeReader : NadekoTypeReader + public class ModuleTypeReader : NadekoTypeReader { private readonly CommandService _cmds; @@ -28,7 +28,7 @@ namespace NadekoBot.Common.TypeReaders } } - public class ModuleOrCrTypeReader : NadekoTypeReader + public class ModuleOrCrTypeReader : NadekoTypeReader { private readonly CommandService _cmds; diff --git a/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs index b952f3b6..062b4537 100644 --- a/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs @@ -3,7 +3,8 @@ using Discord.WebSocket; namespace NadekoBot.Core.Common.TypeReaders { - public abstract class NadekoTypeReader : TypeReader + public abstract class NadekoTypeReader : TypeReader where + T : class { private readonly DiscordSocketClient _client; private readonly CommandService _cmds; diff --git a/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs index b15dbf3e..c9455b98 100644 --- a/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs @@ -10,7 +10,7 @@ namespace NadekoBot.Common.TypeReaders /// /// Used instead of bool for more flexible keywords for true/false only in the permission module /// - public class PermissionActionTypeReader : NadekoTypeReader + public class PermissionActionTypeReader : NadekoTypeReader { public PermissionActionTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { diff --git a/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs index 65956372..cdcf05e5 100644 --- a/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Administration.Services _rep = new ReplacementBuilder() .WithClient(client) .WithStats(client) - //todo type readers + //todo how to add music to replacement builder? //.WithMusic(music) .Build(); diff --git a/NadekoBot.Core/Services/Impl/RedisCache.cs b/NadekoBot.Core/Services/Impl/RedisCache.cs index e0951120..0d64e436 100644 --- a/NadekoBot.Core/Services/Impl/RedisCache.cs +++ b/NadekoBot.Core/Services/Impl/RedisCache.cs @@ -5,19 +5,20 @@ namespace NadekoBot.Services.Impl { public class RedisCache : IDataCache { - private ulong _botid; - public ConnectionMultiplexer Redis { get; } private readonly IDatabase _db; - public RedisCache(ulong botId) + public RedisCache() { - _botid = botId; Redis = ConnectionMultiplexer.Connect("127.0.0.1"); Redis.PreserveAsyncOrder = false; _db = Redis.GetDatabase(); } + // things here so far don't need the bot id + // because it's a good thing if different bots + // which are hosted on the same PC + // can re-use the same image/anime data public async Task<(bool Success, byte[] Data)> TryGetImageDataAsync(string key) { byte[] x = await _db.StringGetAsync("image_" + key); diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index cc23398e..015495fa 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -17,14 +17,11 @@ using NadekoBot.Extensions; using System.Collections.Generic; using NadekoBot.Common; using NadekoBot.Common.ShardCom; -using NadekoBot.Common.TypeReaders; -using NadekoBot.Common.TypeReaders.Models; using NadekoBot.Services.Database; using StackExchange.Redis; using Newtonsoft.Json; -using System.Runtime.Loader; -using NadekoBot.Core.Common.TypeReaders; +//todo Finish the script which autobuilds all projects if they're changed namespace NadekoBot { public class NadekoBot @@ -57,8 +54,9 @@ namespace NadekoBot private readonly ShardComClient _comClient; private readonly BotConfig _botConfig; + public IDataCache Cache { get; private set; } - public NadekoBot(int shardId, int parentProcessId, int? port = null) + public NadekoBot(int shardId, int parentProcessId) { if (shardId < 0) throw new ArgumentOutOfRangeException(nameof(shardId)); @@ -67,6 +65,7 @@ namespace NadekoBot _log = LogManager.GetCurrentClassLogger(); TerribleElevatedPermissionCheck(); + Cache = new RedisCache(); Credentials = new BotCredentials(); _db = new DbService(Credentials); Client = new DiscordSocketClient(new DiscordSocketConfig @@ -83,9 +82,8 @@ namespace NadekoBot CaseSensitiveCommands = false, DefaultRunMode = RunMode.Sync, }); - - port = port ?? Credentials.ShardRunPort; - _comClient = new ShardComClient(port.Value); + + _comClient = new ShardComClient(Cache); using (var uow = _db.UnitOfWork) { @@ -94,7 +92,7 @@ namespace NadekoBot ErrorColor = new Color(Convert.ToUInt32(_botConfig.ErrorColor, 16)); } - SetupShard(parentProcessId, port.Value); + SetupShard(parentProcessId); #if GLOBAL_NADEKO Client.Log += Client_Log; @@ -144,7 +142,7 @@ namespace NadekoBot .AddManual>(AllGuildConfigs) //todo wrap this .AddManual(this) .AddManual(uow) - .AddManual(new RedisCache(Client.CurrentUser.Id)); + .AddManual(Cache); Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler))); @@ -156,7 +154,7 @@ namespace NadekoBot Services.Unload(typeof(IUnitOfWork)); // unload it after the startup } - private IEnumerable LoadTypeReaders(Assembly assembly) + private IEnumerable LoadTypeReaders(Assembly assembly) { Type[] allTypes; try @@ -166,18 +164,30 @@ namespace NadekoBot catch (ReflectionTypeLoadException ex) { Console.WriteLine(ex.LoaderExceptions[0]); - return Enumerable.Empty(); + return Enumerable.Empty(); } var filteredTypes = allTypes - .Where(x => x.IsSubclassOf(typeof(NadekoTypeReader)) + .Where(x => x.IsSubclassOf(typeof(TypeReader)) + && x.BaseType.GetGenericArguments().Length > 0 && !x.IsAbstract); - var toReturn = new List(); + var toReturn = new List(); foreach (var ft in filteredTypes) { //:yayyy: - var x = (NadekoTypeReader)Activator.CreateInstance(ft, Client, CommandService); - CommandService.AddTypeReader(x.GetType(), x); + var x = (TypeReader)Activator.CreateInstance(ft, Client, CommandService); + //@.@ XD XDDD + var baseType = ft.BaseType; + var typeArgs = baseType.GetGenericArguments(); + try + { + CommandService.AddTypeReader(typeArgs[0], x); + } + catch (Exception ex) + { + _log.Error(ex); + throw; + } toReturn.Add(x); _log.Info("Loaded {0} typereader.", x.GetType().Name); } @@ -317,11 +327,11 @@ namespace NadekoBot } } - private void SetupShard(int parentProcessId, int port) + private void SetupShard(int parentProcessId) { if (Client.ShardId == 0) { - ShardCoord = new ShardsCoordinator(port); + ShardCoord = new ShardsCoordinator(Cache); return; } new Thread(new ThreadStart(() => diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index eaaac180..62c36863 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -19,19 +19,28 @@ namespace NadekoBot.Services private readonly Logger _log; private readonly ShardComServer _comServer; - private readonly int _port; private readonly int _curProcessId; - public ShardsCoordinator(int port) + public ShardsCoordinator(IDataCache cache) { LogSetup.SetupLogger(); _creds = new BotCredentials(); _shardProcesses = new Process[_creds.TotalShards]; Statuses = new ShardComMessage[_creds.TotalShards]; - _log = LogManager.GetCurrentClassLogger(); - _port = port; - _comServer = new ShardComServer(port); + for (int i = 0; i < Statuses.Length; i++) + { + Statuses[i] = new ShardComMessage(); + var s = Statuses[i]; + s.ConnectionState = Discord.ConnectionState.Disconnected; + s.Guilds = 0; + s.ShardId = i; + s.Time = DateTime.Now - TimeSpan.FromMinutes(1); + } + + _log = LogManager.GetCurrentClassLogger(); + + _comServer = new ShardComServer(cache); _comServer.Start(); _comServer.OnDataReceived += _comServer_OnDataReceived; @@ -54,8 +63,10 @@ namespace NadekoBot.Services var p = Process.Start(new ProcessStartInfo() { FileName = _creds.ShardRunCommand, - Arguments = string.Format(_creds.ShardRunArguments, i, _curProcessId, _port) + Arguments = string.Format(_creds.ShardRunArguments, i, _curProcessId, "") }); + // last "" in format is for backwards compatibility + // because current startup commands have {2} in them probably await Task.Delay(5000); } } diff --git a/NadekoBot.Core/_Extensions/Extensions.cs b/NadekoBot.Core/_Extensions/Extensions.cs index 1852253d..34106c3b 100644 --- a/NadekoBot.Core/_Extensions/Extensions.cs +++ b/NadekoBot.Core/_Extensions/Extensions.cs @@ -21,6 +21,21 @@ namespace NadekoBot.Extensions { public static class Extensions { + //so ftw + public static bool IsSubclassOfRawGeneric(this Type toCheck, Type generic) + { + while (toCheck != null && toCheck != typeof(object)) + { + var cur = toCheck.IsGenericType ? toCheck.GetGenericTypeDefinition() : toCheck; + if (generic == cur) + { + return true; + } + toCheck = toCheck.BaseType; + } + return false; + } + public static async Task ReplaceAsync(this Regex regex, string input, Func> replacementFn) { var sb = new StringBuilder(); diff --git a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/CurrencyEvent.cs b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/CurrencyEvent.cs new file mode 100644 index 00000000..92dc6e7a --- /dev/null +++ b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/CurrencyEvent.cs @@ -0,0 +1,12 @@ +using Discord; +using Discord.Commands; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common +{ + public abstract class CurrencyEvent + { + public abstract Task Stop(); + public abstract Task Start(IUserMessage msg, ICommandContext channel); + } +} diff --git a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs new file mode 100644 index 00000000..912b6a72 --- /dev/null +++ b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs @@ -0,0 +1,144 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common.Collections; +using NadekoBot.Extensions; +using NadekoBot.Services; +using NadekoBot.Services.Database.Models; +using NLog; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common +{ + public class ReactionEvent : CurrencyEvent + { + private readonly ConcurrentHashSet _reactionAwardedUsers = new ConcurrentHashSet(); + private readonly BotConfig _bc; + private readonly Logger _log; + private readonly DiscordSocketClient _client; + private readonly CurrencyService _cs; + private readonly SocketSelfUser _botUser; + + private IUserMessage StartingMessage { get; set; } + + private CancellationTokenSource Source { get; } + private CancellationToken CancelToken { get; } + + private readonly ConcurrentQueue _toGiveTo = new ConcurrentQueue(); + private readonly int _amount; + + public ReactionEvent(BotConfig bc, DiscordSocketClient client, CurrencyService cs, int amount) + { + _bc = bc; + _log = LogManager.GetCurrentClassLogger(); + _client = client; + _cs = cs; + _botUser = client.CurrentUser; + _amount = amount; + Source = new CancellationTokenSource(); + CancelToken = Source.Token; + + var _ = Task.Run(async () => + { + var users = new List(); + while (!CancelToken.IsCancellationRequested) + { + await Task.Delay(1000).ConfigureAwait(false); + while (_toGiveTo.TryDequeue(out var usrId)) + { + users.Add(usrId); + } + + if (users.Count > 0) + { + await _cs.AddToManyAsync("Reaction Event", _amount, users.ToArray()).ConfigureAwait(false); + } + + users.Clear(); + } + }, CancelToken); + } + + public override async Task Stop() + { + if (StartingMessage != null) + await StartingMessage.DeleteAsync().ConfigureAwait(false); + + if (!Source.IsCancellationRequested) + Source.Cancel(); + + _client.MessageDeleted -= MessageDeletedEventHandler; + } + + private Task MessageDeletedEventHandler(Cacheable msg, ISocketMessageChannel channel) + { + if (StartingMessage?.Id == msg.Id) + { + _log.Warn("Stopping flower reaction event because message is deleted."); + var __ = Task.Run(Stop); + } + + return Task.CompletedTask; + } + + public override async Task Start(IUserMessage umsg, ICommandContext context) + { + StartingMessage = umsg; + _client.MessageDeleted += MessageDeletedEventHandler; + + IEmote iemote; + if (Emote.TryParse(_bc.CurrencySign, out var emote)) + { + iemote = emote; + } + else + iemote = new Emoji(_bc.CurrencySign); + try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } + catch + { + try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } + catch + { + try { await StartingMessage.DeleteAsync().ConfigureAwait(false); } + catch { return; } + } + } + using (StartingMessage.OnReaction(_client, (r) => + { + try + { + if (r.UserId == _botUser.Id) + return; + + if (r.Emote.Name == iemote.Name && r.User.IsSpecified && ((DateTime.UtcNow - r.User.Value.CreatedAt).TotalDays > 5) && _reactionAwardedUsers.Add(r.User.Value.Id)) + { + _toGiveTo.Enqueue(r.UserId); + } + } + catch + { + // ignored + } + })) + { + try + { + await Task.Delay(TimeSpan.FromHours(24), CancelToken).ConfigureAwait(false); + } + catch (OperationCanceledException) + { + + } + if (CancelToken.IsCancellationRequested) + return; + + _log.Warn("Stopping flower reaction event because it expired."); + await Stop(); + } + } + } +} diff --git a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs new file mode 100644 index 00000000..7d571529 --- /dev/null +++ b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs @@ -0,0 +1,99 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common; +using NadekoBot.Common.Collections; +using NadekoBot.Services; +using System; +using System.Linq; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common.CurrencyEvents +{ + public class SneakyEvent : CurrencyEvent + { + public event Action OnEnded; + public string Code { get; private set; } = string.Empty; + private readonly ConcurrentHashSet _sneakyGameAwardedUsers = new ConcurrentHashSet(); + + private readonly char[] _sneakyGameStatusChars = Enumerable.Range(48, 10) + .Concat(Enumerable.Range(65, 26)) + .Concat(Enumerable.Range(97, 26)) + .Select(x => (char)x) + .ToArray(); + + private readonly CurrencyService _cs; + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + private readonly int _length; + + public SneakyEvent(CurrencyService cs, DiscordSocketClient client, + IBotConfigProvider bc, int len) + { + _cs = cs; + _client = client; + _bc = bc; + _length = len; + } + + public override async Task Start(IUserMessage msg, ICommandContext channel) + { + GenerateCode(); + + //start the event + _client.MessageReceived += SneakyGameMessageReceivedEventHandler; + await _client.SetGameAsync($"type {Code} for " + _bc.BotConfig.CurrencyPluralName) + .ConfigureAwait(false); + await Task.Delay(_length * 1000).ConfigureAwait(false); + await Stop().ConfigureAwait(false); + } + + private void GenerateCode() + { + var rng = new NadekoRandom(); + + for (var i = 0; i < 5; i++) + { + Code += _sneakyGameStatusChars[rng.Next(0, _sneakyGameStatusChars.Length)]; + } + } + + public override async Task Stop() + { + try + { + _client.MessageReceived -= SneakyGameMessageReceivedEventHandler; + Code = string.Empty; + _sneakyGameAwardedUsers.Clear(); + await _client.SetGameAsync(null).ConfigureAwait(false); + } + catch { } + finally + { + + OnEnded?.Invoke(); + } + } + + private Task SneakyGameMessageReceivedEventHandler(SocketMessage arg) + { + if (arg.Content == Code && + _sneakyGameAwardedUsers.Add(arg.Author.Id)) + { + var _ = Task.Run(async () => + { + await _cs.AddAsync(arg.Author, "Sneaky Game Event", 100, false) + .ConfigureAwait(false); + + try { await arg.DeleteAsync(new RequestOptions() { RetryMode = RetryMode.AlwaysFail }).ConfigureAwait(false); } + catch + { + // ignored + } + }); + } + + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs index 7ea62330..35ac3252 100644 --- a/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs +++ b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs @@ -2,42 +2,26 @@ using Discord.Commands; using NadekoBot.Extensions; using NadekoBot.Services; -using System; -using System.Linq; using System.Threading.Tasks; using Discord.WebSocket; -using System.Threading; -using NadekoBot.Common; using NadekoBot.Common.Attributes; -using NadekoBot.Common.Collections; -using NLog; -using System.Collections.Concurrent; -using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Modules.Gambling.Services; +using NadekoBot.Modules.Gambling.Common.CurrencyEvents; namespace NadekoBot.Modules.Gambling { - //todo mess, needs unload thing too - refactor public partial class Gambling { [Group] - public class CurrencyEventsCommands : NadekoSubmodule + public class CurrencyEventsCommands : NadekoSubmodule { public enum CurrencyEvent { Reaction, SneakyGameStatus } - //flower reaction event - private static readonly ConcurrentHashSet _sneakyGameAwardedUsers = new ConcurrentHashSet(); - - private static readonly char[] _sneakyGameStatusChars = Enumerable.Range(48, 10) - .Concat(Enumerable.Range(65, 26)) - .Concat(Enumerable.Range(97, 26)) - .Select(x => (char)x) - .ToArray(); - private string _secretCode = string.Empty; private readonly DiscordSocketClient _client; private readonly IBotConfigProvider _bc; private readonly CurrencyService _cs; @@ -65,68 +49,27 @@ namespace NadekoBot.Modules.Gambling } } - public async Task SneakyGameStatusEvent(ICommandContext context, int? arg) + private async Task SneakyGameStatusEvent(ICommandContext context, int num) { - int num; - if (arg == null || arg < 5) + if (num < 10 || num > 600) num = 60; - else - num = arg.Value; - if (_secretCode != string.Empty) + var ev = new SneakyEvent(_cs, _client, _bc, num); + if (!await _service.StartSneakyEvent(ev, context.Message, context)) return; - var rng = new NadekoRandom(); - - for (var i = 0; i < 5; i++) - { - _secretCode += _sneakyGameStatusChars[rng.Next(0, _sneakyGameStatusChars.Length)]; - } - - await _client.SetGameAsync($"type {_secretCode} for " + _bc.BotConfig.CurrencyPluralName) - .ConfigureAwait(false); try { var title = GetText("sneakygamestatus_title"); - var desc = GetText("sneakygamestatus_desc", Format.Bold(100.ToString()) + _bc.BotConfig.CurrencySign, Format.Bold(num.ToString())); - await context.Channel.SendConfirmAsync(title, desc).ConfigureAwait(false); + var desc = GetText("sneakygamestatus_desc", + Format.Bold(100.ToString()) + _bc.BotConfig.CurrencySign, + Format.Bold(num.ToString())); + await context.Channel.SendConfirmAsync(title, desc) + .ConfigureAwait(false); } catch { // ignored } - - - _client.MessageReceived += SneakyGameMessageReceivedEventHandler; - await Task.Delay(num * 1000); - _client.MessageReceived -= SneakyGameMessageReceivedEventHandler; - - var cnt = _sneakyGameAwardedUsers.Count; - _sneakyGameAwardedUsers.Clear(); - _secretCode = string.Empty; - - await _client.SetGameAsync(GetText("sneakygamestatus_end", cnt)) - .ConfigureAwait(false); - } - - private Task SneakyGameMessageReceivedEventHandler(SocketMessage arg) - { - if (arg.Content == _secretCode && - _sneakyGameAwardedUsers.Add(arg.Author.Id)) - { - var _ = Task.Run(async () => - { - await _cs.AddAsync(arg.Author, "Sneaky Game Event", 100, false) - .ConfigureAwait(false); - - try { await arg.DeleteAsync(new RequestOptions() { RetryMode = RetryMode.AlwaysFail }).ConfigureAwait(false); } - catch - { - // ignored - } - }); - } - - return Task.CompletedTask; } public async Task ReactionEvent(ICommandContext context, int amount) @@ -137,144 +80,11 @@ namespace NadekoBot.Modules.Gambling var title = GetText("reaction_title"); var desc = GetText("reaction_desc", _bc.BotConfig.CurrencySign, Format.Bold(amount.ToString()) + _bc.BotConfig.CurrencySign); var footer = GetText("reaction_footer", 24); + var re = new ReactionEvent(_bc.BotConfig, _client, _cs, amount); var msg = await context.Channel.SendConfirmAsync(title, desc, footer: footer) .ConfigureAwait(false); - - await new ReactionEvent(_bc.BotConfig, _client, _cs, amount).Start(msg, context); - } - } - } - - public abstract class CurrencyEvent - { - public abstract Task Start(IUserMessage msg, ICommandContext channel); - } - - public class ReactionEvent : CurrencyEvent - { - private readonly ConcurrentHashSet _reactionAwardedUsers = new ConcurrentHashSet(); - private readonly BotConfig _bc; - private readonly Logger _log; - private readonly DiscordSocketClient _client; - private readonly CurrencyService _cs; - private readonly SocketSelfUser _botUser; - - private IUserMessage StartingMessage { get; set; } - - private CancellationTokenSource Source { get; } - private CancellationToken CancelToken { get; } - - private readonly ConcurrentQueue _toGiveTo = new ConcurrentQueue(); - private readonly int _amount; - - public ReactionEvent(BotConfig bc, DiscordSocketClient client, CurrencyService cs, int amount) - { - _bc = bc; - _log = LogManager.GetCurrentClassLogger(); - _client = client; - _cs = cs; - _botUser = client.CurrentUser; - _amount = amount; - Source = new CancellationTokenSource(); - CancelToken = Source.Token; - - var _ = Task.Run(async () => - { - - var users = new List(); - while (!CancelToken.IsCancellationRequested) - { - await Task.Delay(1000).ConfigureAwait(false); - while (_toGiveTo.TryDequeue(out var usrId)) - { - users.Add(usrId); - } - - if (users.Count > 0) - { - await _cs.AddToManyAsync("Reaction Event", _amount, users.ToArray()).ConfigureAwait(false); - } - - users.Clear(); - } - }, CancelToken); - } - - private async Task End() - { - if(StartingMessage != null) - await StartingMessage.DeleteAsync().ConfigureAwait(false); - - if(!Source.IsCancellationRequested) - Source.Cancel(); - - _client.MessageDeleted -= MessageDeletedEventHandler; - } - - private Task MessageDeletedEventHandler(Cacheable msg, ISocketMessageChannel channel) { - if (StartingMessage?.Id == msg.Id) - { - _log.Warn("Stopping flower reaction event because message is deleted."); - var __ = Task.Run(End); - } - - return Task.CompletedTask; - } - - public override async Task Start(IUserMessage umsg, ICommandContext context) - { - StartingMessage = umsg; - _client.MessageDeleted += MessageDeletedEventHandler; - - IEmote iemote; - if (Emote.TryParse(_bc.CurrencySign, out var emote)) - { - iemote = emote; - } - else - iemote = new Emoji(_bc.CurrencySign); - try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } - catch - { - try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } - catch - { - try { await StartingMessage.DeleteAsync().ConfigureAwait(false); } - catch { return; } - } - } - using (StartingMessage.OnReaction(_client, (r) => - { - try - { - if (r.UserId == _botUser.Id) - return; - - if (r.Emote.Name == iemote.Name && r.User.IsSpecified && ((DateTime.UtcNow - r.User.Value.CreatedAt).TotalDays > 5) && _reactionAwardedUsers.Add(r.User.Value.Id)) - { - _toGiveTo.Enqueue(r.UserId); - } - } - catch - { - // ignored - } - })) - { - try - { - await Task.Delay(TimeSpan.FromHours(24), CancelToken).ConfigureAwait(false); - } - catch (OperationCanceledException) - { - - } - if (CancelToken.IsCancellationRequested) - return; - - _log.Warn("Stopping flower reaction event because it expired."); - await End(); + await re.Start(msg, context); } } } diff --git a/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs b/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs new file mode 100644 index 00000000..4d75a144 --- /dev/null +++ b/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs @@ -0,0 +1,66 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Modules.Gambling.Common.CurrencyEvents; +using NadekoBot.Services; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class CurrencyEventsService : INService, IUnloadableService + { + public ConcurrentDictionary> ReactionEvents { get; } + + public SneakyEvent SneakyEvent { get; private set; } = null; + private SemaphoreSlim _sneakyLock = new SemaphoreSlim(1, 1); + + public CurrencyEventsService() + { + ReactionEvents = new ConcurrentDictionary>(); + } + + public async Task StartSneakyEvent(SneakyEvent ev, IUserMessage msg, ICommandContext ctx) + { + await _sneakyLock.WaitAsync().ConfigureAwait(false); + try + { + if (SneakyEvent != null) + return false; + + SneakyEvent = ev; + ev.OnEnded += () => SneakyEvent = null; + var _ = SneakyEvent.Start(msg, ctx).ConfigureAwait(false); + } + finally + { + _sneakyLock.Release(); + } + return true; + } + + public async Task Unload() + { + foreach (var kvp in ReactionEvents) + { + foreach (var ev in kvp.Value) + { + try { await ev.Stop().ConfigureAwait(false); } catch { } + } + } + ReactionEvents.Clear(); + + await _sneakyLock.WaitAsync().ConfigureAwait(false); + try + { + await SneakyEvent.Stop().ConfigureAwait(false); + } + finally + { + _sneakyLock.Release(); + } + } + } +} diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index f4845275..e2b0a122 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -6,12 +6,9 @@ namespace NadekoBot { public static Task Main(string[] args) { - if (args.Length == 3 && int.TryParse(args[0], out int shardId) && int.TryParse(args[1], out int parentProcessId)) + if (args.Length == 2 && int.TryParse(args[0], out int shardId) && int.TryParse(args[1], out int parentProcessId)) { - int? port = null; - if (int.TryParse(args[2], out var outPort)) - port = outPort; - return new NadekoBot(shardId, parentProcessId, outPort).RunAndBlockAsync(args); + return new NadekoBot(shardId, parentProcessId).RunAndBlockAsync(args); } else return new NadekoBot(0, 0).RunAndBlockAsync(args); From db6fa9af1abddca7ac79d7c8de35db002f0bc27e Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 10 Oct 2017 18:24:36 +0200 Subject: [PATCH 008/192] Shard coordinator is not indepentent from the shard 0 --- NadekoBot.Core/Common/Shard0Precondition.cs | 19 --- .../Common/ShardCom/ShardComClient.cs | 28 ---- ...IShardComMessage.cs => ShardComMessage.cs} | 0 .../Modules/Administration/ModuleCommands.cs | 24 ++- .../Modules/Administration/SelfCommands.cs | 84 ++++++++--- NadekoBot.Core/Services/IStatsService.cs | 1 - .../Services/Impl/BotCredentials.cs | 3 - NadekoBot.Core/Services/Impl/StatsService.cs | 16 +- NadekoBot.Core/Services/NadekoBot.cs | 34 ++--- NadekoBot.Core/Services/ShardsCoordinator.cs | 140 ++++++++++++------ NadekoBot.Core/_Extensions/Extensions.cs | 17 +-- .../Services/StreamRoleService.cs | 3 +- NadekoBot.Modules.Utility/Utility.cs | 51 +------ src/NadekoBot/Program.cs | 15 +- 14 files changed, 225 insertions(+), 210 deletions(-) delete mode 100644 NadekoBot.Core/Common/Shard0Precondition.cs delete mode 100644 NadekoBot.Core/Common/ShardCom/ShardComClient.cs rename NadekoBot.Core/Common/ShardCom/{IShardComMessage.cs => ShardComMessage.cs} (100%) diff --git a/NadekoBot.Core/Common/Shard0Precondition.cs b/NadekoBot.Core/Common/Shard0Precondition.cs deleted file mode 100644 index 965101a3..00000000 --- a/NadekoBot.Core/Common/Shard0Precondition.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Threading.Tasks; -using Discord.Commands; -using Discord.WebSocket; - -namespace NadekoBot.Common -{ - public class Shard0Precondition : PreconditionAttribute - { - public override Task CheckPermissions(ICommandContext context, CommandInfo command, IServiceProvider services) - { - var c = (DiscordSocketClient)context.Client; - if (c.ShardId != 0) - return Task.FromResult(PreconditionResult.FromError("Must be ran from shard #0")); - - return Task.FromResult(PreconditionResult.FromSuccess()); - } - } -} diff --git a/NadekoBot.Core/Common/ShardCom/ShardComClient.cs b/NadekoBot.Core/Common/ShardCom/ShardComClient.cs deleted file mode 100644 index 595c289c..00000000 --- a/NadekoBot.Core/Common/ShardCom/ShardComClient.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Net; -using System.Net.Sockets; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json; -using NadekoBot.Services; -using StackExchange.Redis; - -namespace NadekoBot.Common.ShardCom -{ - public class ShardComClient - { - private readonly IDataCache _cache; - - public ShardComClient(IDataCache cache) - { - _cache = cache; - } - - public async Task Send(ShardComMessage data) - { - var sub = _cache.Redis.GetSubscriber(); - var msg = JsonConvert.SerializeObject(data); - - await sub.PublishAsync("shardcoord_send", msg).ConfigureAwait(false); - } - } -} diff --git a/NadekoBot.Core/Common/ShardCom/IShardComMessage.cs b/NadekoBot.Core/Common/ShardCom/ShardComMessage.cs similarity index 100% rename from NadekoBot.Core/Common/ShardCom/IShardComMessage.cs rename to NadekoBot.Core/Common/ShardCom/ShardComMessage.cs diff --git a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs index 75f78aa7..ab6ee999 100644 --- a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs @@ -56,8 +56,28 @@ namespace NadekoBot.Modules.Administration return; name = name.ToTitleCase(); - await _bot.LoadPackage(name); - await ReplyAsync(":ok:"); + if (await _bot.LoadPackage(name)) + await ReplyAsync(":ok:"); + else + await ReplyAsync(":x:"); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task PackageReload(string name) + { + if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) + return; + name = name.ToTitleCase(); + + if (await _bot.UnloadPackage(name)) + { + await _bot.LoadPackage(name); + await ReplyAsync(":ok:"); + } + else + await ReplyAsync(":x:"); } } } diff --git a/NadekoBot.Core/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs index ca526f48..411cd442 100644 --- a/NadekoBot.Core/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -14,6 +14,8 @@ using Microsoft.EntityFrameworkCore; using System.Diagnostics; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Administration.Services; +using Newtonsoft.Json; +using NadekoBot.Common.ShardCom; namespace NadekoBot.Modules.Administration { @@ -30,10 +32,11 @@ namespace NadekoBot.Modules.Administration private readonly IBotConfigProvider _bc; private readonly NadekoBot _bot; private readonly IBotCredentials _creds; + private readonly IDataCache _cache; public SelfCommands(DbService db, NadekoBot bot, DiscordSocketClient client, IImagesService images, IBotConfigProvider bc, - IBotCredentials creds) + IBotCredentials creds, IDataCache cache) { _db = db; _client = client; @@ -41,6 +44,7 @@ namespace NadekoBot.Modules.Administration _bc = bc; _bot = bot; _creds = creds; + _cache = cache; } [NadekoCommand, Usage, Description, Aliases] @@ -217,28 +221,62 @@ namespace NadekoBot.Modules.Administration } - //todo 2 shard commands - //[NadekoCommand, Usage, Description, Aliases] - //[Shard0Precondition] - //[OwnerOnly] - //public async Task RestartShard(int shardid) - //{ - // if (shardid == 0 || shardid > b) - // { - // await ReplyErrorLocalized("no_shard_id").ConfigureAwait(false); - // return; - // } - // try - // { - // await ReplyConfirmLocalized("shard_reconnecting", Format.Bold("#" + shardid)).ConfigureAwait(false); - // await shard.StartAsync().ConfigureAwait(false); - // await ReplyConfirmLocalized("shard_reconnected", Format.Bold("#" + shardid)).ConfigureAwait(false); - // } - // catch (Exception ex) - // { - // _log.Warn(ex); - // } - //} + [NadekoCommand, Usage, Description, Aliases] + public async Task ShardStats(int page = 1) + { + if (--page < 0) + return; + var db = _cache.Redis.GetDatabase(); + var statuses = db.ListRange(_creds.RedisKey() + "_shardstats") + .Select(x => JsonConvert.DeserializeObject(x)); + + var status = string.Join(", ", statuses + .GroupBy(x => x.ConnectionState) + .Select(x => $"{x.Count()} {x.Key}") + .ToArray()); + + var allShardStrings = statuses + .Select(x => + { + var timeDiff = DateTime.UtcNow - x.Time; + if (timeDiff > TimeSpan.FromSeconds(20)) + return $"Shard #{Format.Bold(x.ShardId.ToString())} **UNRESPONSIVE** for {timeDiff.ToString(@"hh\:mm\:ss")}"; + return GetText("shard_stats_txt", x.ShardId.ToString(), + Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.ToString()), timeDiff.ToString(@"hh\:mm\:ss")); + }) + .ToArray(); + + await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => + { + + var str = string.Join("\n", allShardStrings.Skip(25 * curPage).Take(25)); + + if (string.IsNullOrWhiteSpace(str)) + str = GetText("no_shards_on_page"); + + return new EmbedBuilder() + .WithAuthor(a => a.WithName(GetText("shard_stats"))) + .WithTitle(status) + .WithOkColor() + .WithDescription(str); + }, allShardStrings.Length / 25); + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task RestartShard(int shardid) + { + if (shardid < 0 || shardid >= _creds.TotalShards) + { + await ReplyErrorLocalized("no_shard_id").ConfigureAwait(false); + return; + } + var pub = _cache.Redis.GetSubscriber(); + pub.Publish(_creds.RedisKey() + "_shard_restart", + JsonConvert.SerializeObject(_client.ShardId), + StackExchange.Redis.CommandFlags.FireAndForget); + await ReplyConfirmLocalized("shard_reconnecting", Format.Bold("#" + shardid)).ConfigureAwait(false); + } [NadekoCommand, Usage, Description, Aliases] [OwnerOnly] diff --git a/NadekoBot.Core/Services/IStatsService.cs b/NadekoBot.Core/Services/IStatsService.cs index 800b8fba..12e8f911 100644 --- a/NadekoBot.Core/Services/IStatsService.cs +++ b/NadekoBot.Core/Services/IStatsService.cs @@ -13,7 +13,6 @@ namespace NadekoBot.Services double MessagesPerSecond { get; } long TextChannels { get; } long VoiceChannels { get; } - int GuildCount { get; } TimeSpan GetUptime(); string GetUptimeString(string separator = ", "); diff --git a/NadekoBot.Core/Services/Impl/BotCredentials.cs b/NadekoBot.Core/Services/Impl/BotCredentials.cs index 07624cde..bc43354a 100644 --- a/NadekoBot.Core/Services/Impl/BotCredentials.cs +++ b/NadekoBot.Core/Services/Impl/BotCredentials.cs @@ -15,11 +15,8 @@ namespace NadekoBot.Services.Impl private Logger _log; public ulong ClientId { get; } - public string GoogleApiKey { get; } - public string MashapeKey { get; } - public string Token { get; } public ImmutableArray OwnerIds { get; } diff --git a/NadekoBot.Core/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs index 36d26e1c..89b9543d 100644 --- a/NadekoBot.Core/Services/Impl/StatsService.cs +++ b/NadekoBot.Core/Services/Impl/StatsService.cs @@ -1,6 +1,8 @@ using Discord; using Discord.WebSocket; +using NadekoBot.Common.ShardCom; using NadekoBot.Extensions; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Globalization; @@ -11,6 +13,7 @@ using System.Security.Cryptography; using System.Text; using System.Threading; using System.Threading.Tasks; +using StackExchange.Redis; namespace NadekoBot.Services.Impl { @@ -40,15 +43,16 @@ namespace NadekoBot.Services.Impl private readonly Timer _carbonitexTimer; private readonly Timer _dataTimer; private readonly ShardsCoordinator _sc; + private readonly ConnectionMultiplexer _redis; - public int GuildCount => - _sc?.GuildCount ?? _client.Guilds.Count(); - - public StatsService(DiscordSocketClient client, CommandHandler cmdHandler, IBotCredentials creds, NadekoBot nadeko) + public StatsService(DiscordSocketClient client, CommandHandler cmdHandler, + IBotCredentials creds, NadekoBot nadeko, + IDataCache cache) { _client = client; _creds = creds; _sc = nadeko.ShardCoord; + _redis = cache.Redis; _started = DateTime.UtcNow; _client.MessageReceived += _ => Task.FromResult(Interlocked.Increment(ref _messageCounter)); @@ -142,7 +146,7 @@ namespace NadekoBot.Services.Impl { using (var content = new FormUrlEncodedContent( new Dictionary { - { "servercount", _sc.GuildCount.ToString() }, + { "servercount", nadeko.GuildCount.ToString() }, { "key", _creds.CarbonKey }})) { content.Headers.Clear(); @@ -175,7 +179,7 @@ namespace NadekoBot.Services.Impl using (var content = new FormUrlEncodedContent( new Dictionary { { "id", string.Concat(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(_creds.ClientId.ToString())).Select(x => x.ToString("X2"))) }, - { "guildCount", _sc.GuildCount.ToString() }, + { "guildCount", nadeko.GuildCount.ToString() }, { "version", BotVersion }, { "platform", platform }})) { diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index 015495fa..bc891a65 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -29,7 +29,6 @@ namespace NadekoBot private Logger _log; public BotCredentials Credentials { get; } - public DiscordSocketClient Client { get; } public CommandService CommandService { get; } @@ -51,11 +50,15 @@ namespace NadekoBot public ShardsCoordinator ShardCoord { get; private set; } - private readonly ShardComClient _comClient; - private readonly BotConfig _botConfig; public IDataCache Cache { get; private set; } + public int GuildCount => + Cache.Redis.GetDatabase() + .ListRange(Credentials.RedisKey() + "_shardstats") + .Select(x => JsonConvert.DeserializeObject(x)) + .Sum(x => x.Guilds); + public NadekoBot(int shardId, int parentProcessId) { if (shardId < 0) @@ -82,8 +85,6 @@ namespace NadekoBot CaseSensitiveCommands = false, DefaultRunMode = RunMode.Sync, }); - - _comClient = new ShardComClient(Cache); using (var uow = _db.UnitOfWork) { @@ -105,13 +106,18 @@ namespace NadekoBot { while (true) { - await _comClient.Send(new ShardComMessage() + var data = new ShardComMessage() { ConnectionState = Client.ConnectionState, Guilds = Client.ConnectionState == ConnectionState.Connected ? Client.Guilds.Count : 0, ShardId = Client.ShardId, Time = DateTime.UtcNow, - }); + }; + + var sub = Cache.Redis.GetSubscriber(); + var msg = JsonConvert.SerializeObject(data); + + await sub.PublishAsync(Credentials.RedisKey() + "_shardcoord_send", msg).ConfigureAwait(false); await Task.Delay(5000); } }); @@ -288,6 +294,7 @@ namespace NadekoBot Ready.TrySetResult(true); HandleStatusChanges(); + StartSendingData(); _log.Info($"Shard {Client.ShardId} ready."); } @@ -303,13 +310,7 @@ namespace NadekoBot public async Task RunAndBlockAsync(params string[] args) { await RunAsync(args).ConfigureAwait(false); - StartSendingData(); - if (ShardCoord != null) - await ShardCoord.RunAndBlockAsync(); - else - { - await Task.Delay(-1).ConfigureAwait(false); - } + await Task.Delay(-1).ConfigureAwait(false); } private void TerribleElevatedPermissionCheck() @@ -329,11 +330,6 @@ namespace NadekoBot private void SetupShard(int parentProcessId) { - if (Client.ShardId == 0) - { - ShardCoord = new ShardsCoordinator(Cache); - return; - } new Thread(new ThreadStart(() => { try diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index 62c36863..cc343ab0 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -2,75 +2,130 @@ using NLog; using System; using System.Diagnostics; -using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.ShardCom; +using StackExchange.Redis; +using Newtonsoft.Json; +using NadekoBot.Extensions; namespace NadekoBot.Services { public class ShardsCoordinator { private readonly BotCredentials _creds; + private readonly string _key; private readonly Process[] _shardProcesses; - public ShardComMessage[] Statuses { get; } - public int GuildCount => Statuses.ToArray() - .Where(x => x != null) - .Sum(x => x.Guilds); private readonly Logger _log; - private readonly ShardComServer _comServer; private readonly int _curProcessId; + private readonly ConnectionMultiplexer _redis; + private ShardComMessage _defaultShardState; - public ShardsCoordinator(IDataCache cache) + public ShardsCoordinator() { + //load main stuff LogSetup.SetupLogger(); + _log = LogManager.GetCurrentClassLogger(); _creds = new BotCredentials(); - _shardProcesses = new Process[_creds.TotalShards]; - Statuses = new ShardComMessage[_creds.TotalShards]; + _key = _creds.RedisKey(); - for (int i = 0; i < Statuses.Length; i++) + //setup initial shard statuses + _defaultShardState = new ShardComMessage() { - Statuses[i] = new ShardComMessage(); - var s = Statuses[i]; - s.ConnectionState = Discord.ConnectionState.Disconnected; - s.Guilds = 0; - s.ShardId = i; - s.Time = DateTime.Now - TimeSpan.FromMinutes(1); + ConnectionState = Discord.ConnectionState.Disconnected, + Guilds = 0, + Time = DateTime.Now - TimeSpan.FromMinutes(1) + }; + var db = _redis.GetDatabase(); + _shardProcesses = new Process[_creds.TotalShards]; + for (int i = 0; i < _creds.TotalShards; i++) + { + _defaultShardState.ShardId = i; + db.ListSetByIndex(_key + "shardstats", + i, + JsonConvert.SerializeObject(_defaultShardState), + CommandFlags.FireAndForget); } - _log = LogManager.GetCurrentClassLogger(); - - _comServer = new ShardComServer(cache); - _comServer.Start(); - - _comServer.OnDataReceived += _comServer_OnDataReceived; - _curProcessId = Process.GetCurrentProcess().Id; + + _redis = ConnectionMultiplexer.Connect("127.0.0.1"); + var sub = _redis.GetSubscriber(); + sub.Subscribe(_key + "_shardcoord_send", + OnDataReceived, + CommandFlags.FireAndForget); + + sub.Subscribe(_key + "_shardcoord_restart", + OnRestart, + CommandFlags.FireAndForget); + + sub.Subscribe(_key + "_shardcoord_stop", + OnStop, + CommandFlags.FireAndForget); } - private Task _comServer_OnDataReceived(ShardComMessage msg) + private void OnStop(RedisChannel ch, RedisValue data) { - Statuses[msg.ShardId] = msg; - if (msg.ConnectionState == Discord.ConnectionState.Disconnected || msg.ConnectionState == Discord.ConnectionState.Disconnecting) - _log.Error("!!! SHARD {0} IS IN {1} STATE", msg.ShardId, msg.ConnectionState.ToString()); - return Task.CompletedTask; + var shardId = JsonConvert.DeserializeObject(data); + var db = _redis.GetDatabase(); + _defaultShardState.ShardId = shardId; + db.ListSetByIndex(_key + "shardstats", + shardId, + JsonConvert.SerializeObject(_defaultShardState), + CommandFlags.FireAndForget); + var p = _shardProcesses[shardId]; + _shardProcesses[shardId] = null; + try { p?.Kill(); } catch { } + try { p?.Dispose(); } catch { } + } + + private void OnRestart(RedisChannel ch, RedisValue data) + { + OnStop(ch, data); + var shardId = JsonConvert.DeserializeObject(data); + _shardProcesses[shardId] = StartShard(shardId); + } + + private void OnDataReceived(RedisChannel ch, RedisValue data) + { + var msg = JsonConvert.DeserializeObject(data); + if (msg == null) + return; + var db = _redis.GetDatabase(); + db.ListSetByIndex(_key + "shardstats", + msg.ShardId, + data, + CommandFlags.FireAndForget); + if (msg.ConnectionState == Discord.ConnectionState.Disconnected + || msg.ConnectionState == Discord.ConnectionState.Disconnecting) + { + _log.Error("!!! SHARD {0} IS IN {1} STATE !!!", msg.ShardId, msg.ConnectionState.ToString()); + } + return; } public async Task RunAsync() { - for (int i = 1; i < _creds.TotalShards; i++) + for (int i = 0; i < _creds.TotalShards; i++) { - var p = Process.Start(new ProcessStartInfo() - { - FileName = _creds.ShardRunCommand, - Arguments = string.Format(_creds.ShardRunArguments, i, _curProcessId, "") - }); - // last "" in format is for backwards compatibility - // because current startup commands have {2} in them probably - await Task.Delay(5000); + var p = StartShard(i); + + _shardProcesses[i] = p; + await Task.Delay(6000); } } + private Process StartShard(int shardId) + { + return Process.Start(new ProcessStartInfo() + { + FileName = _creds.ShardRunCommand, + Arguments = string.Format(_creds.ShardRunArguments, shardId, _curProcessId, "") + }); + // last "" in format is for backwards compatibility + // because current startup commands have {2} in them probably + } + public async Task RunAndBlockAsync() { try @@ -80,14 +135,15 @@ namespace NadekoBot.Services catch (Exception ex) { _log.Error(ex); + foreach (var p in _shardProcesses) + { + try { p.Kill(); } catch { } + try { p.Dispose(); } catch { } + } + return; } await Task.Delay(-1); - foreach (var p in _shardProcesses) - { - try { p.Kill(); } catch { } - try { p.Dispose(); } catch { } - } } } } diff --git a/NadekoBot.Core/_Extensions/Extensions.cs b/NadekoBot.Core/_Extensions/Extensions.cs index 34106c3b..e7a70aff 100644 --- a/NadekoBot.Core/_Extensions/Extensions.cs +++ b/NadekoBot.Core/_Extensions/Extensions.cs @@ -16,24 +16,15 @@ using System.Threading.Tasks; using NadekoBot.Common.Collections; using SixLabors.Primitives; using NadekoBot.Common; +using NadekoBot.Services; namespace NadekoBot.Extensions { public static class Extensions { - //so ftw - public static bool IsSubclassOfRawGeneric(this Type toCheck, Type generic) + public static string RedisKey(this IBotCredentials bc) { - while (toCheck != null && toCheck != typeof(object)) - { - var cur = toCheck.IsGenericType ? toCheck.GetGenericTypeDefinition() : toCheck; - if (generic == cur) - { - return true; - } - toCheck = toCheck.BaseType; - } - return false; + return bc.Token.Substring(0, 10); } public static async Task ReplaceAsync(this Regex regex, string input, Func> replacementFn) @@ -223,7 +214,7 @@ namespace NadekoBot.Extensions var xOffset = 0; for (int i = 0; i < imgs.Length; i++) { - canvas.DrawImage(imgs[i], 100, default(Size), new Point(xOffset, 0)); + canvas.DrawImage(imgs[i], 100, default, new Point(xOffset, 0)); xOffset += imgs[i].Bounds.Width; } diff --git a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs index df0d5cbb..3c2c17c7 100644 --- a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs +++ b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs @@ -263,7 +263,7 @@ namespace NadekoBot.Modules.Utility.Services throw new StreamRoleNotFoundException(); await user.RemoveRoleAsync(addRole).ConfigureAwait(false); - _log.Info("Removed stream role from a user {0} in {1} server", user.ToString(), user.Guild.ToString()); + _log.Info("Removed stream role from the user {0} in {1} server", user.ToString(), user.Guild.ToString()); } catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.Forbidden) { @@ -272,7 +272,6 @@ namespace NadekoBot.Modules.Utility.Services _log.Error(ex); throw new StreamRolePermissionException(); } - _log.Info("Removed stream role from the user {0} in {1} server", user.ToString(), user.Guild.ToString()); } } } diff --git a/NadekoBot.Modules.Utility/Utility.cs b/NadekoBot.Modules.Utility/Utility.cs index 82c8551e..17d65f36 100644 --- a/NadekoBot.Modules.Utility/Utility.cs +++ b/NadekoBot.Modules.Utility/Utility.cs @@ -5,11 +5,8 @@ using System.Linq; using System.Threading.Tasks; using System.Text; using NadekoBot.Extensions; -using System.Reflection; using NadekoBot.Services.Impl; using System.Net.Http; -using System.Collections.Concurrent; -using System.Threading; using ImageSharp; using System.Collections.Generic; using Newtonsoft.Json; @@ -17,7 +14,6 @@ using Discord.WebSocket; using System.Diagnostics; using NadekoBot.Common; using NadekoBot.Common.Attributes; -using Color = Discord.Color; using NadekoBot.Services; namespace NadekoBot.Modules.Utility @@ -27,14 +23,14 @@ namespace NadekoBot.Modules.Utility private readonly DiscordSocketClient _client; private readonly IStatsService _stats; private readonly IBotCredentials _creds; - private readonly ShardsCoordinator _shardCoord; + private readonly NadekoBot _bot; public Utility(NadekoBot nadeko, DiscordSocketClient client, IStatsService stats, IBotCredentials creds) { _client = client; _stats = stats; _creds = creds; - _shardCoord = nadeko.ShardCoord; + _bot = nadeko; } [NadekoCommand, Usage, Description, Aliases] @@ -214,47 +210,6 @@ namespace NadekoBot.Modules.Utility await Context.Channel.SendConfirmAsync($"{Context.User.Mention} https://discord.gg/{invite.Code}"); } - [NadekoCommand, Usage, Description, Aliases] - [Shard0Precondition] - public async Task ShardStats(int page = 1) - { - if (--page < 0) - return; - var statuses = _shardCoord.Statuses.ToArray() - .Where(x => x != null); - - var status = string.Join(", ", statuses - .GroupBy(x => x.ConnectionState) - .Select(x => $"{x.Count()} {x.Key}") - .ToArray()); - - var allShardStrings = statuses - .Select(x => - { - var timeDiff = DateTime.UtcNow - x.Time; - if (timeDiff > TimeSpan.FromSeconds(20)) - return $"Shard #{Format.Bold(x.ShardId.ToString())} **UNRESPONSIVE** for {timeDiff.ToString(@"hh\:mm\:ss")}"; - return GetText("shard_stats_txt", x.ShardId.ToString(), - Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.ToString()), timeDiff.ToString(@"hh\:mm\:ss")); - }) - .ToArray(); - - await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => - { - - var str = string.Join("\n", allShardStrings.Skip(25 * curPage).Take(25)); - - if (string.IsNullOrWhiteSpace(str)) - str = GetText("no_shards_on_page"); - - return new EmbedBuilder() - .WithAuthor(a => a.WithName(GetText("shard_stats"))) - .WithTitle(status) - .WithOkColor() - .WithDescription(str); - }, allShardStrings.Length / 25); - } - [NadekoCommand, Usage, Description, Aliases] public async Task Stats() { @@ -273,7 +228,7 @@ namespace NadekoBot.Modules.Utility .AddField(efb => efb.WithName(GetText("uptime")).WithValue(_stats.GetUptimeString("\n")).WithIsInline(true)) .AddField(efb => efb.WithName(GetText("presence")).WithValue( GetText("presence_txt", - _stats.GuildCount, _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))); + _bot.GuildCount, _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index e2b0a122..6935f084 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using NadekoBot.Services; +using System.Threading.Tasks; namespace NadekoBot { @@ -6,12 +7,18 @@ namespace NadekoBot { public static Task Main(string[] args) { - if (args.Length == 2 && int.TryParse(args[0], out int shardId) && int.TryParse(args[1], out int parentProcessId)) + if (args.Length == 2 + && int.TryParse(args[0], out int shardId) + && int.TryParse(args[1], out int parentProcessId)) { - return new NadekoBot(shardId, parentProcessId).RunAndBlockAsync(args); + return new NadekoBot(shardId, parentProcessId) + .RunAndBlockAsync(args); } else - return new NadekoBot(0, 0).RunAndBlockAsync(args); + { + return new ShardsCoordinator() + .RunAndBlockAsync(); + } } } } From e32446335ebedb8fff97e6555c2fbce7a81a33e9 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 13 Oct 2017 02:21:39 +0200 Subject: [PATCH 009/192] Cleanup, .clparew can now be ran everyone, modules load appropriate guild configs, IEnumerable replaces with NadekoBot.AllGuildConfigs --- NadekoBot.Core/Common/Caching/FactoryCache.cs | 49 +++++++ .../Common/Caching/IFactoryCache.cs | 13 ++ .../Administration/DangerousCommands.cs | 48 +++++++ .../Services/AdministrationService.cs | 8 +- .../Services/AutoAssignRoleService.cs | 6 +- .../Services/GameVoiceChannelService.cs | 4 +- .../Services/GuildTimezoneService.cs | 10 +- .../Services/LogCommandService.cs | 4 +- .../Administration/Services/MuteService.cs | 21 +-- .../Services/ProtectionService.cs | 5 +- .../Services/RatelimitService.cs | 6 +- .../Administration/Services/SelfService.cs | 6 +- .../Administration/Services/VcRoleService.cs | 4 +- .../Administration/Services/VplusTService.cs | 4 +- .../Permissions/Services/CmdCdService.cs | 4 +- .../Permissions/Services/FilterService.cs | 12 +- NadekoBot.Core/Services/CommandHandler.cs | 6 +- .../Services/Database/NadekoContext.cs | 2 - .../Services/GreetSettingsService.cs | 12 +- NadekoBot.Core/Services/Impl/Localization.cs | 7 +- NadekoBot.Core/Services/Impl/StatsService.cs | 4 +- NadekoBot.Core/Services/NadekoBot.cs | 15 +- NadekoBot.Core/Services/ServiceProvider.cs | 10 ++ NadekoBot.Core/Services/ShardsCoordinator.cs | 4 + .../Services/WaifuService.cs | 12 ++ .../WaifuClaimCommands.cs | 19 +-- .../Services/ChatterbotService.cs | 8 +- .../Services/GamesService.cs | 5 +- .../Services/MusicService.cs | 6 +- .../Services/FeedsService.cs | 9 +- .../Services/SearchesService.cs | 5 +- NadekoBot.Modules.Utility/PatreonCommands.cs | 6 +- .../Services/CommandMapService.cs | 4 +- .../Services/ConverterService.cs | 1 + .../Services/MessageRepeaterService.cs | 27 ++-- .../Services/PatreonRewardsService.cs | 130 ++++++++++-------- .../Services/StreamRoleService.cs | 5 +- .../Services/VerboseErrorsService.cs | 7 +- NadekoBot.Modules.Xp/Services/XpService.cs | 6 +- src/NadekoBot/data/command_strings.json | 2 +- 40 files changed, 336 insertions(+), 180 deletions(-) create mode 100644 NadekoBot.Core/Common/Caching/FactoryCache.cs create mode 100644 NadekoBot.Core/Common/Caching/IFactoryCache.cs create mode 100644 NadekoBot.Core/Modules/Administration/DangerousCommands.cs create mode 100644 NadekoBot.Modules.Gambling/Services/WaifuService.cs diff --git a/NadekoBot.Core/Common/Caching/FactoryCache.cs b/NadekoBot.Core/Common/Caching/FactoryCache.cs new file mode 100644 index 00000000..3d7bfbe4 --- /dev/null +++ b/NadekoBot.Core/Common/Caching/FactoryCache.cs @@ -0,0 +1,49 @@ +using System; + +namespace NadekoBot.Core.Common.Caching +{ + /// + /// A caching object which loads its value with a factory method when it expires. + /// + /// Type of the value which is cached. + public class FactoryCache : IFactoryCache + { + public DateTime LastUpdate { get; set; } = DateTime.MinValue; + private readonly object _locker = new object(); + private TimeSpan _expireAfter; + private readonly Func _factory; + private T Value; + + /// + /// Creates a new factory cache object. + /// + /// Method which loads the value when it expires or if it's not loaded the first time. + /// Time after which the value will be reloaded. + /// Should the value be loaded right away. If set to false, value will load when it's first retrieved. + public FactoryCache(Func factory, TimeSpan expireAfter, + bool loadImmediately = false) + { + _expireAfter = expireAfter; + _factory = factory; + if (loadImmediately) + { + Value = _factory(); + LastUpdate = DateTime.UtcNow; + } + } + + public T GetValue() + { + lock (_locker) + { + if (DateTime.UtcNow - LastUpdate > _expireAfter) + { + LastUpdate = DateTime.UtcNow; + return Value = _factory(); + } + + return Value; + } + } + } +} diff --git a/NadekoBot.Core/Common/Caching/IFactoryCache.cs b/NadekoBot.Core/Common/Caching/IFactoryCache.cs new file mode 100644 index 00000000..439152d4 --- /dev/null +++ b/NadekoBot.Core/Common/Caching/IFactoryCache.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Core.Common.Caching +{ + public interface IFactoryCache + { + + } +} diff --git a/NadekoBot.Core/Modules/Administration/DangerousCommands.cs b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs new file mode 100644 index 00000000..4bb6ead5 --- /dev/null +++ b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs @@ -0,0 +1,48 @@ +using Discord.Commands; +using Microsoft.EntityFrameworkCore; +using NadekoBot.Common.Attributes; +using NadekoBot.Extensions; +using NadekoBot.Modules; +using NadekoBot.Services; +using System; +using System.Threading.Tasks; + +#if DEBUG +namespace NadekoBot.Modules.Administration +{ + public partial class Administration + { + [Group] + [OwnerOnly] + public class DangerousCommands : NadekoSubmodule + { + private readonly DbService _db; + + public DangerousCommands(DbService db) + { + _db = db; + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task ExecSql([Remainder]string sql) + { + try + { + int res; + using (var uow = _db.UnitOfWork) + { + res = uow._context.Database.ExecuteSqlCommand(sql); + } + + await Context.Channel.SendConfirmAsync(res.ToString()); + } + catch (Exception ex) + { + await Context.Channel.SendErrorAsync(ex.ToString()); + } + } + } + } +} +#endif \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs index 57ec29a8..9a43348a 100644 --- a/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Discord; @@ -7,7 +6,6 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Services; -using NadekoBot.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -16,12 +14,14 @@ namespace NadekoBot.Modules.Administration.Services { public readonly ConcurrentHashSet DeleteMessagesOnCommand; private readonly Logger _log; + private readonly NadekoBot _bot; - public AdministrationService(IEnumerable gcs, CommandHandler cmdHandler) + public AdministrationService(NadekoBot bot, CommandHandler cmdHandler) { _log = LogManager.GetCurrentClassLogger(); + _bot = bot; - DeleteMessagesOnCommand = new ConcurrentHashSet(gcs.Where(g => g.DeleteMessageOnCommand).Select(g => g.GuildId)); + DeleteMessagesOnCommand = new ConcurrentHashSet(bot.AllGuildConfigs.Where(g => g.DeleteMessageOnCommand).Select(g => g.GuildId)); cmdHandler.CommandExecuted += DelMsgOnCmd_Handler; } diff --git a/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs index 040986cb..6ea37049 100644 --- a/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Services; -using NadekoBot.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -18,13 +16,13 @@ namespace NadekoBot.Modules.Administration.Services //guildid/roleid public ConcurrentDictionary AutoAssignedRoles { get; } - public AutoAssignRoleService(DiscordSocketClient client, IEnumerable gcs) + public AutoAssignRoleService(DiscordSocketClient client, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); _client = client; AutoAssignedRoles = new ConcurrentDictionary( - gcs.Where(x => x.AutoAssignRoleId != 0) + bot.AllGuildConfigs.Where(x => x.AutoAssignRoleId != 0) .ToDictionary(k => k.GuildId, v => v.AutoAssignRoleId)); _client.UserJoined += (user) => diff --git a/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs index e97e0eb7..30191c54 100644 --- a/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs @@ -19,14 +19,14 @@ namespace NadekoBot.Modules.Administration.Services private readonly DbService _db; private readonly DiscordSocketClient _client; - public GameVoiceChannelService(DiscordSocketClient client, DbService db, IEnumerable gcs) + public GameVoiceChannelService(DiscordSocketClient client, DbService db, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); _db = db; _client = client; GameVoiceChannels = new ConcurrentHashSet( - gcs.Where(gc => gc.GameVoiceChannel != null) + bot.AllGuildConfigs.Where(gc => gc.GameVoiceChannel != null) .Select(gc => gc.GameVoiceChannel.Value)); _client.UserVoiceStateUpdated += Client_UserVoiceStateUpdated; diff --git a/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs index fdef20c5..1f4e44cd 100644 --- a/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs @@ -16,9 +16,9 @@ namespace NadekoBot.Modules.Administration.Services private ConcurrentDictionary _timezones; private readonly DbService _db; - public GuildTimezoneService(DiscordSocketClient client, IEnumerable gcs, DbService db) + public GuildTimezoneService(DiscordSocketClient client, NadekoBot bot, DbService db) { - _timezones = gcs + _timezones = bot.AllGuildConfigs .Select(x => { TimeZoneInfo tz; @@ -33,10 +33,10 @@ namespace NadekoBot.Modules.Administration.Services { tz = null; } - return (x.GuildId, tz); + return (x.GuildId, Timezone: tz); }) - .Where(x => x.Item2 != null) - .ToDictionary(x => x.Item1, x => x.Item2) + .Where(x => x.Timezone != null) + .ToDictionary(x => x.GuildId, x => x.Timezone) .ToConcurrent(); var curUser = client.CurrentUser; diff --git a/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs index 37b2781e..2400afc5 100644 --- a/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs @@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Administration.Services private readonly GuildTimezoneService _tz; public LogCommandService(DiscordSocketClient client, NadekoStrings strings, - IEnumerable gcs, DbService db, MuteService mute, ProtectionService prot, GuildTimezoneService tz) + NadekoBot bot, DbService db, MuteService mute, ProtectionService prot, GuildTimezoneService tz) { _client = client; _log = LogManager.GetCurrentClassLogger(); @@ -60,7 +60,7 @@ namespace NadekoBot.Modules.Administration.Services _prot = prot; _tz = tz; - GuildLogSettings = gcs + GuildLogSettings = bot.AllGuildConfigs .ToDictionary(g => g.GuildId, g => g.LogSetting) .ToConcurrent(); diff --git a/NadekoBot.Core/Modules/Administration/Services/MuteService.cs b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs index 77b4136c..917f90e8 100644 --- a/NadekoBot.Core/Modules/Administration/Services/MuteService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs @@ -38,22 +38,25 @@ namespace NadekoBot.Modules.Administration.Services private readonly DiscordSocketClient _client; private readonly DbService _db; - public MuteService(DiscordSocketClient client, IEnumerable gcs, DbService db) + public MuteService(DiscordSocketClient client, NadekoBot bot, DbService db) { _client = client; _db = db; - GuildMuteRoles = gcs - .Where(c => !string.IsNullOrWhiteSpace(c.MuteRoleName)) - .ToDictionary(c => c.GuildId, c => c.MuteRoleName) - .ToConcurrent(); + GuildMuteRoles = bot + .AllGuildConfigs + .Where(c => !string.IsNullOrWhiteSpace(c.MuteRoleName)) + .ToDictionary(c => c.GuildId, c => c.MuteRoleName) + .ToConcurrent(); - MutedUsers = new ConcurrentDictionary>(gcs.ToDictionary( - k => k.GuildId, - v => new ConcurrentHashSet(v.MutedUsers.Select(m => m.UserId)) + MutedUsers = new ConcurrentDictionary>(bot + .AllGuildConfigs + .ToDictionary( + k => k.GuildId, + v => new ConcurrentHashSet(v.MutedUsers.Select(m => m.UserId)) )); - foreach (var conf in gcs) + foreach (var conf in bot.AllGuildConfigs) { foreach (var x in conf.UnmuteTimers) { diff --git a/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs index ea65fd3f..94397ab6 100644 --- a/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Discord; @@ -26,13 +25,13 @@ namespace NadekoBot.Modules.Administration.Services private readonly DiscordSocketClient _client; private readonly MuteService _mute; - public ProtectionService(DiscordSocketClient client, IEnumerable gcs, MuteService mute) + public ProtectionService(DiscordSocketClient client, NadekoBot bot, MuteService mute) { _log = LogManager.GetCurrentClassLogger(); _client = client; _mute = mute; - foreach (var gc in gcs) + foreach (var gc in bot.AllGuildConfigs) { var raid = gc.AntiRaidSetting; var spam = gc.AntiSpamSetting; diff --git a/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs index 9667d193..68bcffe6 100644 --- a/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs @@ -23,17 +23,17 @@ namespace NadekoBot.Modules.Administration.Services private readonly Logger _log; private readonly DiscordSocketClient _client; - public SlowmodeService(DiscordSocketClient client, IEnumerable gcs) + public SlowmodeService(DiscordSocketClient client, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); _client = client; IgnoredRoles = new ConcurrentDictionary>( - gcs.ToDictionary(x => x.GuildId, + bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => new HashSet(x.SlowmodeIgnoredRoles.Select(y => y.RoleId)))); IgnoredUsers = new ConcurrentDictionary>( - gcs.ToDictionary(x => x.GuildId, + bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => new HashSet(x.SlowmodeIgnoredUsers.Select(y => y.UserId)))); } diff --git a/NadekoBot.Core/Modules/Administration/Services/SelfService.cs b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs index c0a811fa..74fe7b2f 100644 --- a/NadekoBot.Core/Modules/Administration/Services/SelfService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs @@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Administration.Services _creds = creds; _bc = bc; - var _ = Task.Run(async () => + Task.Run(async () => { await bot.Ready.Task.ConfigureAwait(false); @@ -57,14 +57,12 @@ namespace NadekoBot.Modules.Administration.Services } }); - var ___ = Task.Run(async () => + Task.Run(async () => { await bot.Ready.Task.ConfigureAwait(false); await Task.Delay(5000); - _client.Guilds.SelectMany(g => g.Users); - if(client.ShardId == 0) LoadOwnerChannels(); }); diff --git a/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs index 9f4f1b53..7879f171 100644 --- a/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs @@ -19,7 +19,7 @@ namespace NadekoBot.Modules.Administration.Services public ConcurrentDictionary> VcRoles { get; } - public VcRoleService(DiscordSocketClient client, IEnumerable gcs, DbService db) + public VcRoleService(DiscordSocketClient client, NadekoBot bot, DbService db) { _log = LogManager.GetCurrentClassLogger(); _db = db; @@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration.Services _client.UserVoiceStateUpdated += ClientOnUserVoiceStateUpdated; VcRoles = new ConcurrentDictionary>(); var missingRoles = new List(); - foreach (var gconf in gcs) + foreach (var gconf in bot.AllGuildConfigs) { var g = _client.GetGuild(gconf.GuildId); if (g == null) diff --git a/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs index 9ffd8dcb..101e29f8 100644 --- a/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs @@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration.Services private readonly DbService _db; private readonly Logger _log; - public VplusTService(DiscordSocketClient client, IEnumerable gcs, NadekoStrings strings, + public VplusTService(DiscordSocketClient client, NadekoBot bot, NadekoStrings strings, DbService db) { _client = client; @@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Administration.Services _db = db; _log = LogManager.GetCurrentClassLogger(); - VoicePlusTextCache = new ConcurrentHashSet(gcs.Where(g => g.VoicePlusTextEnabled).Select(g => g.GuildId)); + VoicePlusTextCache = new ConcurrentHashSet(bot.AllGuildConfigs.Where(g => g.VoicePlusTextEnabled).Select(g => g.GuildId)); _client.UserVoiceStateUpdated += UserUpdatedEventHandler; } diff --git a/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs index bead8238..87a3f6dc 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs @@ -16,10 +16,10 @@ namespace NadekoBot.Modules.Permissions.Services public ConcurrentDictionary> CommandCooldowns { get; } public ConcurrentDictionary> ActiveCooldowns { get; } = new ConcurrentDictionary>(); - public CmdCdService(IEnumerable gcs) + public CmdCdService(NadekoBot bot) { CommandCooldowns = new ConcurrentDictionary>( - gcs.ToDictionary(k => k.GuildId, + bot.AllGuildConfigs.ToDictionary(k => k.GuildId, v => new ConcurrentHashSet(v.CommandCooldowns))); } diff --git a/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs index e15926a9..d09aa9ba 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs @@ -43,21 +43,21 @@ namespace NadekoBot.Modules.Permissions.Services return words; } - public FilterService(DiscordSocketClient _client, IEnumerable gcs) + public FilterService(DiscordSocketClient _client, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); - InviteFilteringServers = new ConcurrentHashSet(gcs.Where(gc => gc.FilterInvites).Select(gc => gc.GuildId)); - InviteFilteringChannels = new ConcurrentHashSet(gcs.SelectMany(gc => gc.FilterInvitesChannelIds.Select(fci => fci.ChannelId))); + InviteFilteringServers = new ConcurrentHashSet(bot.AllGuildConfigs.Where(gc => gc.FilterInvites).Select(gc => gc.GuildId)); + InviteFilteringChannels = new ConcurrentHashSet(bot.AllGuildConfigs.SelectMany(gc => gc.FilterInvitesChannelIds.Select(fci => fci.ChannelId))); - var dict = gcs.ToDictionary(gc => gc.GuildId, gc => new ConcurrentHashSet(gc.FilteredWords.Select(fw => fw.Word))); + var dict = bot.AllGuildConfigs.ToDictionary(gc => gc.GuildId, gc => new ConcurrentHashSet(gc.FilteredWords.Select(fw => fw.Word))); ServerFilteredWords = new ConcurrentDictionary>(dict); - var serverFiltering = gcs.Where(gc => gc.FilterWords); + var serverFiltering = bot.AllGuildConfigs.Where(gc => gc.FilterWords); WordFilteringServers = new ConcurrentHashSet(serverFiltering.Select(gc => gc.GuildId)); - WordFilteringChannels = new ConcurrentHashSet(gcs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId))); + WordFilteringChannels = new ConcurrentHashSet(bot.AllGuildConfigs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId))); _client.MessageUpdated += (oldData, newMsg, channel) => { diff --git a/NadekoBot.Core/Services/CommandHandler.cs b/NadekoBot.Core/Services/CommandHandler.cs index c06d14ab..6b9e67b8 100644 --- a/NadekoBot.Core/Services/CommandHandler.cs +++ b/NadekoBot.Core/Services/CommandHandler.cs @@ -51,7 +51,9 @@ namespace NadekoBot.Services public ConcurrentHashSet UsersOnShortCooldown { get; } = new ConcurrentHashSet(); private readonly Timer _clearUsersOnShortCooldown; - public CommandHandler(DiscordSocketClient client, DbService db, IBotConfigProvider bc, IEnumerable gcs, CommandService commandService, IBotCredentials credentials, NadekoBot bot) + public CommandHandler(DiscordSocketClient client, DbService db, + IBotConfigProvider bc, CommandService commandService, + IBotCredentials credentials, NadekoBot bot) { _client = client; _commandService = commandService; @@ -67,7 +69,7 @@ namespace NadekoBot.Services }, null, GlobalCommandsCooldown, GlobalCommandsCooldown); DefaultPrefix = bc.BotConfig.DefaultPrefix; - _prefixes = gcs + _prefixes = bot.AllGuildConfigs .Where(x => x.Prefix != null) .ToDictionary(x => x.GuildId, x => x.Prefix) .ToConcurrent(); diff --git a/NadekoBot.Core/Services/Database/NadekoContext.cs b/NadekoBot.Core/Services/Database/NadekoContext.cs index 2d484582..b4079f17 100644 --- a/NadekoBot.Core/Services/Database/NadekoContext.cs +++ b/NadekoBot.Core/Services/Database/NadekoContext.cs @@ -29,8 +29,6 @@ namespace NadekoBot.Services.Database public DbSet Quotes { get; set; } public DbSet Donators { get; set; } public DbSet GuildConfigs { get; set; } - public DbSet ClashOfClans { get; set; } - public DbSet ClashCallers { get; set; } public DbSet Reminders { get; set; } public DbSet SelfAssignableRoles { get; set; } public DbSet BotConfig { get; set; } diff --git a/NadekoBot.Core/Services/GreetSettingsService.cs b/NadekoBot.Core/Services/GreetSettingsService.cs index 2d8b5e9b..dc73c978 100644 --- a/NadekoBot.Core/Services/GreetSettingsService.cs +++ b/NadekoBot.Core/Services/GreetSettingsService.cs @@ -21,13 +21,15 @@ namespace NadekoBot.Services private readonly DiscordSocketClient _client; private readonly Logger _log; - public GreetSettingsService(DiscordSocketClient client, IEnumerable guildConfigs, DbService db) + public GreetSettingsService(DiscordSocketClient client, NadekoBot bot, DbService db) { _db = db; _client = client; _log = LogManager.GetCurrentClassLogger(); - GuildConfigsCache = new ConcurrentDictionary(guildConfigs.ToDictionary(g => g.GuildId, GreetSettings.Create)); + GuildConfigsCache = new ConcurrentDictionary( + bot.AllGuildConfigs + .ToDictionary(g => g.GuildId, GreetSettings.Create)); _client.UserJoined += UserJoined; _client.UserLeft += UserLeft; @@ -180,10 +182,8 @@ namespace NadekoBot.Services public GreetSettings GetOrAddSettingsForGuild(ulong guildId) { - GreetSettings settings; - GuildConfigsCache.TryGetValue(guildId, out settings); - - if (settings != null) + if(GuildConfigsCache.TryGetValue(guildId, out var settings) && + settings != null) return settings; using (var uow = _db.UnitOfWork) diff --git a/NadekoBot.Core/Services/Impl/Localization.cs b/NadekoBot.Core/Services/Impl/Localization.cs index 8bc0d257..dd25aa56 100644 --- a/NadekoBot.Core/Services/Impl/Localization.cs +++ b/NadekoBot.Core/Services/Impl/Localization.cs @@ -28,11 +28,11 @@ namespace NadekoBot.Services.Impl } private Localization() { } - public Localization(IBotConfigProvider bcp, IEnumerable gcs, DbService db) + public Localization(IBotConfigProvider bcp, NadekoBot bot, DbService db) { _log = LogManager.GetCurrentClassLogger(); - var cultureInfoNames = gcs.ToDictionary(x => x.GuildId, x => x.Locale); + var cultureInfoNames = bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.Locale); var defaultCulture = bcp.BotConfig.Locale; _db = db; @@ -123,8 +123,7 @@ namespace NadekoBot.Services.Impl { if (guildId == null) return DefaultCultureInfo; - CultureInfo info = null; - GuildCultureInfos.TryGetValue(guildId.Value, out info); + GuildCultureInfos.TryGetValue(guildId.Value, out CultureInfo info); return info ?? DefaultCultureInfo; } diff --git a/NadekoBot.Core/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs index 89b9543d..c667791e 100644 --- a/NadekoBot.Core/Services/Impl/StatsService.cs +++ b/NadekoBot.Core/Services/Impl/StatsService.cs @@ -42,7 +42,6 @@ namespace NadekoBot.Services.Impl private readonly Timer _carbonitexTimer; private readonly Timer _dataTimer; - private readonly ShardsCoordinator _sc; private readonly ConnectionMultiplexer _redis; public StatsService(DiscordSocketClient client, CommandHandler cmdHandler, @@ -51,7 +50,6 @@ namespace NadekoBot.Services.Impl { _client = client; _creds = creds; - _sc = nadeko.ShardCoord; _redis = cache.Redis; _started = DateTime.UtcNow; @@ -134,7 +132,7 @@ namespace NadekoBot.Services.Impl return Task.CompletedTask; }; - if (_sc != null) + if (_client.ShardId == 0) { _carbonitexTimer = new Timer(async (state) => { diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index bc891a65..dd9a60a9 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -48,8 +48,6 @@ namespace NadekoBot public INServiceProvider Services { get; private set; } - public ShardsCoordinator ShardCoord { get; private set; } - private readonly BotConfig _botConfig; public IDataCache Cache { get; private set; } @@ -143,9 +141,6 @@ namespace NadekoBot .AddManual(Client) .AddManual(CommandService) .AddManual(botConfigProvider) - //todo this needs to reload whenever a new service is supposed to be loaded - //except at startup for obvious reasons - .AddManual>(AllGuildConfigs) //todo wrap this .AddManual(this) .AddManual(uow) .AddManual(Cache); @@ -255,9 +250,6 @@ namespace NadekoBot public async Task RunAsync(params string[] args) { - if (Client.ShardId == 0) - _log.Info("Starting NadekoBot v" + StatsService.BotVersion); - var sw = Stopwatch.StartNew(); await LoginAsync(Credentials.Token).ConfigureAwait(false); @@ -450,7 +442,12 @@ namespace NadekoBot { if (_packageModules.ContainsKey(name)) return false; - + + var startingGuildIdList = Client.Guilds.Select(x => (long)x.Id).ToList(); + using (var uow = _db.UnitOfWork) + { + AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList).ToImmutableArray(); + } var package = Assembly.LoadFile(Path.Combine(AppContext.BaseDirectory, "modules", $"NadekoBot.Modules.{name}", diff --git a/NadekoBot.Core/Services/ServiceProvider.cs b/NadekoBot.Core/Services/ServiceProvider.cs index c0c8df7c..eb806090 100644 --- a/NadekoBot.Core/Services/ServiceProvider.cs +++ b/NadekoBot.Core/Services/ServiceProvider.cs @@ -54,6 +54,16 @@ namespace NadekoBot.Services return this; } + public INServiceProvider UpdateManual(T obj) + { + lock (_locker) + { + _services.Remove(typeof(T)); + _services.TryAdd(typeof(T), obj); + } + return this; + } + public IEnumerable LoadFrom(Assembly assembly) { List addedTypes = new List(); diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index cc343ab0..7816d466 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -27,7 +27,11 @@ namespace NadekoBot.Services LogSetup.SetupLogger(); _log = LogManager.GetCurrentClassLogger(); _creds = new BotCredentials(); + + _log.Info("Starting NadekoBot v" + StatsService.BotVersion); + _key = _creds.RedisKey(); + _redis = ConnectionMultiplexer.Connect("127.0.0.1"); //setup initial shard statuses _defaultShardState = new ShardComMessage() diff --git a/NadekoBot.Modules.Gambling/Services/WaifuService.cs b/NadekoBot.Modules.Gambling/Services/WaifuService.cs new file mode 100644 index 00000000..fea6a07f --- /dev/null +++ b/NadekoBot.Modules.Gambling/Services/WaifuService.cs @@ -0,0 +1,12 @@ +using NadekoBot.Services; +using System; +using System.Collections.Concurrent; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class WaifuService : INService + { + public ConcurrentDictionary DivorceCooldowns { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AffinityCooldowns { get; } = new ConcurrentDictionary(); + } +} diff --git a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs index 875fd01c..2adf7a11 100644 --- a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs +++ b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs @@ -4,13 +4,17 @@ using NadekoBot.Extensions; using NadekoBot.Services; using NadekoBot.Services.Database.Models; using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common; using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Services; +//todo add .deletewaifus +//todo add .deletecurrency +//todo add .deleteplaylists +//todo add .deletexp namespace NadekoBot.Modules.Gambling { public partial class Gambling @@ -44,13 +48,10 @@ namespace NadekoBot.Modules.Gambling Depraved, Harlot } - //todo unclaimed waifus should lose 3% of their value a day - [Group] - public class WaifuClaimCommands : NadekoSubmodule - { - private static ConcurrentDictionary _divorceCooldowns { get; } = new ConcurrentDictionary(); - private static ConcurrentDictionary _affinityCooldowns { get; } = new ConcurrentDictionary(); + [Group] + public class WaifuClaimCommands : NadekoSubmodule + { enum WaifuClaimResult { Success, @@ -219,7 +220,7 @@ namespace NadekoBot.Modules.Gambling var now = DateTime.UtcNow; if (w?.Claimer == null || w.Claimer.UserId != Context.User.Id) result = DivorceResult.NotYourWife; - else if (_divorceCooldowns.AddOrUpdate(Context.User.Id, + else if (_service.DivorceCooldowns.AddOrUpdate(Context.User.Id, now, (key, old) => ((difference = now.Subtract(old)) > _divorceLimit) ? now : old) != now) { @@ -303,7 +304,7 @@ namespace NadekoBot.Modules.Gambling if (w?.Affinity?.UserId == u?.Id) { } - else if (_affinityCooldowns.AddOrUpdate(Context.User.Id, + else if (_service.AffinityCooldowns.AddOrUpdate(Context.User.Id, now, (key, old) => ((difference = now.Subtract(old)) > _affinityLimit) ? now : old) != now) { diff --git a/NadekoBot.Modules.Games/Services/ChatterbotService.cs b/NadekoBot.Modules.Games/Services/ChatterbotService.cs index a137b953..3d2e6d43 100644 --- a/NadekoBot.Modules.Games/Services/ChatterbotService.cs +++ b/NadekoBot.Modules.Games/Services/ChatterbotService.cs @@ -28,8 +28,9 @@ namespace NadekoBot.Modules.Games.Services public ConcurrentDictionary> ChatterBotGuilds { get; } - public ChatterBotService(DiscordSocketClient client, PermissionService perms, IEnumerable gcs, - CommandHandler cmd, NadekoStrings strings, IBotCredentials creds) + public ChatterBotService(DiscordSocketClient client, PermissionService perms, + NadekoBot bot, CommandHandler cmd, NadekoStrings strings, + IBotCredentials creds) { _client = client; _log = LogManager.GetCurrentClassLogger(); @@ -39,7 +40,8 @@ namespace NadekoBot.Modules.Games.Services _creds = creds; ChatterBotGuilds = new ConcurrentDictionary>( - gcs.Where(gc => gc.CleverbotEnabled) + bot.AllGuildConfigs + .Where(gc => gc.CleverbotEnabled) .ToDictionary(gc => gc.GuildId, gc => new Lazy(() => CreateSession(), true))); } diff --git a/NadekoBot.Modules.Games/Services/GamesService.cs b/NadekoBot.Modules.Games/Services/GamesService.cs index dece8333..7573cda0 100644 --- a/NadekoBot.Modules.Games/Services/GamesService.cs +++ b/NadekoBot.Modules.Games/Services/GamesService.cs @@ -55,7 +55,7 @@ namespace NadekoBot.Modules.Games.Services public ConcurrentDictionary RunningContests { get; } = new ConcurrentDictionary(); public ConcurrentDictionary NunchiGames { get; } = new ConcurrentDictionary(); - public GamesService(CommandHandler cmd, IBotConfigProvider bc, IEnumerable gcs, + public GamesService(CommandHandler cmd, IBotConfigProvider bc, NadekoBot bot, NadekoStrings strings, IImagesService images, CommandHandler cmdHandler) { _bc = bc; @@ -77,7 +77,8 @@ namespace NadekoBot.Modules.Games.Services //plantpick _cmd.OnMessageNoTrigger += PotentialFlowerGeneration; - GenerationChannels = new ConcurrentHashSet(gcs + GenerationChannels = new ConcurrentHashSet(bot + .AllGuildConfigs .SelectMany(c => c.GenerateCurrencyChannelIds.Select(obj => obj.ChannelId))); try diff --git a/NadekoBot.Modules.Music/Services/MusicService.cs b/NadekoBot.Modules.Music/Services/MusicService.cs index 78ca31a9..e27c8ba1 100644 --- a/NadekoBot.Modules.Music/Services/MusicService.cs +++ b/NadekoBot.Modules.Music/Services/MusicService.cs @@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Music.Services public MusicService(DiscordSocketClient client, IGoogleApiService google, NadekoStrings strings, ILocalization localization, DbService db, - SoundCloudApiService sc, IBotCredentials creds, IEnumerable gcs) + SoundCloudApiService sc, IBotCredentials creds, NadekoBot bot) { _client = client; _google = google; @@ -51,7 +51,9 @@ namespace NadekoBot.Modules.Music.Services try { Directory.Delete(MusicDataPath, true); } catch { } - _defaultVolumes = new ConcurrentDictionary(gcs.ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); + _defaultVolumes = new ConcurrentDictionary( + bot.AllGuildConfigs + .ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); Directory.CreateDirectory(MusicDataPath); } diff --git a/NadekoBot.Modules.Searches/Services/FeedsService.cs b/NadekoBot.Modules.Searches/Services/FeedsService.cs index 33ac0ff9..09ad09dd 100644 --- a/NadekoBot.Modules.Searches/Services/FeedsService.cs +++ b/NadekoBot.Modules.Searches/Services/FeedsService.cs @@ -24,11 +24,13 @@ namespace NadekoBot.Modules.Searches.Services private readonly ConcurrentDictionary _lastPosts = new ConcurrentDictionary(); - public FeedsService(IEnumerable gcs, DbService db, DiscordSocketClient client) + public FeedsService(NadekoBot bot, DbService db, DiscordSocketClient client) { _db = db; - _subs = gcs.SelectMany(x => x.FeedSubs) + _subs = bot + .AllGuildConfigs + .SelectMany(x => x.FeedSubs) .GroupBy(x => x.Url) .ToDictionary(x => x.Key, x => x.ToHashSet()) .ToConcurrent(); @@ -54,8 +56,7 @@ namespace NadekoBot.Modules.Searches.Services if (kvp.Value.Count == 0) continue; - DateTime lastTime; - if (!_lastPosts.TryGetValue(kvp.Key, out lastTime)) + if (!_lastPosts.TryGetValue(kvp.Key, out DateTime lastTime)) lastTime = _lastPosts.AddOrUpdate(kvp.Key, DateTime.UtcNow, (k, old) => DateTime.UtcNow); var rssUrl = kvp.Key; diff --git a/NadekoBot.Modules.Searches/Services/SearchesService.cs b/NadekoBot.Modules.Searches/Services/SearchesService.cs index ded817e5..0b410aee 100644 --- a/NadekoBot.Modules.Searches/Services/SearchesService.cs +++ b/NadekoBot.Modules.Searches/Services/SearchesService.cs @@ -49,7 +49,8 @@ namespace NadekoBot.Modules.Searches.Services private readonly ConcurrentDictionary> _blacklistedTags = new ConcurrentDictionary>(); - public SearchesService(DiscordSocketClient client, IGoogleApiService google, DbService db, IEnumerable gcs) + public SearchesService(DiscordSocketClient client, IGoogleApiService google, + DbService db, NadekoBot bot) { Http = new HttpClient(); Http.AddFakeHeaders(); @@ -59,7 +60,7 @@ namespace NadekoBot.Modules.Searches.Services _log = LogManager.GetCurrentClassLogger(); _blacklistedTags = new ConcurrentDictionary>( - gcs.ToDictionary( + bot.AllGuildConfigs.ToDictionary( x => x.GuildId, x => new HashSet(x.NsfwBlacklistedTags.Select(y => y.Tag)))); diff --git a/NadekoBot.Modules.Utility/PatreonCommands.cs b/NadekoBot.Modules.Utility/PatreonCommands.cs index 96ac04c4..933ee7bc 100644 --- a/NadekoBot.Modules.Utility/PatreonCommands.cs +++ b/NadekoBot.Modules.Utility/PatreonCommands.cs @@ -26,21 +26,19 @@ namespace NadekoBot.Modules.Utility _db = db; _currency = currency; } - + [NadekoCommand, Usage, Description, Aliases] - [OwnerOnly] [RequireContext(ContextType.DM)] public async Task PatreonRewardsReload() { if (string.IsNullOrWhiteSpace(_creds.PatreonAccessToken)) return; - await _service.RefreshPledges(true).ConfigureAwait(false); + await _service.RefreshPledges().ConfigureAwait(false); await Context.Channel.SendConfirmAsync("👌").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.DM)] public async Task ClaimPatreonRewards() { if (string.IsNullOrWhiteSpace(_creds.PatreonAccessToken)) diff --git a/NadekoBot.Modules.Utility/Services/CommandMapService.cs b/NadekoBot.Modules.Utility/Services/CommandMapService.cs index 2aa1c419..c2ca0fe5 100644 --- a/NadekoBot.Modules.Utility/Services/CommandMapService.cs +++ b/NadekoBot.Modules.Utility/Services/CommandMapService.cs @@ -17,11 +17,11 @@ namespace NadekoBot.Modules.Utility.Services public ConcurrentDictionary> AliasMaps { get; } = new ConcurrentDictionary>(); //commandmap - public CommandMapService(IEnumerable gcs) + public CommandMapService(NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); AliasMaps = new ConcurrentDictionary>( - gcs.ToDictionary( + bot.AllGuildConfigs.ToDictionary( x => x.GuildId, x => new ConcurrentDictionary(x.CommandAliases .Distinct(new CommandAliasEqualityComparer()) diff --git a/NadekoBot.Modules.Utility/Services/ConverterService.cs b/NadekoBot.Modules.Utility/Services/ConverterService.cs index 62eab125..05e9bed3 100644 --- a/NadekoBot.Modules.Utility/Services/ConverterService.cs +++ b/NadekoBot.Modules.Utility/Services/ConverterService.cs @@ -13,6 +13,7 @@ using NLog; namespace NadekoBot.Modules.Utility.Services { + //todo rewrite public class ConverterService : INService, IUnloadableService { public List Units { get; } = new List(); diff --git a/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs index 2b19e520..d7e7a0a5 100644 --- a/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs +++ b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs @@ -16,24 +16,25 @@ namespace NadekoBot.Modules.Utility.Services public ConcurrentDictionary> Repeaters { get; set; } public bool RepeaterReady { get; private set; } - public MessageRepeaterService(NadekoBot bot, DiscordSocketClient client, IEnumerable gcs) + public MessageRepeaterService(NadekoBot bot, DiscordSocketClient client) { var _ = Task.Run(async () => { await bot.Ready.Task.ConfigureAwait(false); - Repeaters = new ConcurrentDictionary>(gcs - .Select(gc => - { - var guild = client.GetGuild(gc.GuildId); - if (guild == null) - return (0, null); - return (gc.GuildId, new ConcurrentQueue(gc.GuildRepeaters - .Select(gr => new RepeatRunner(client, guild, gr)) - .Where(x => x.Guild != null))); - }) - .Where(x => x.Item2 != null) - .ToDictionary(x => x.GuildId, x => x.Item2)); + Repeaters = new ConcurrentDictionary>( + bot.AllGuildConfigs + .Select(gc => + { + var guild = client.GetGuild(gc.GuildId); + if (guild == null) + return (0, null); + return (gc.GuildId, new ConcurrentQueue(gc.GuildRepeaters + .Select(gr => new RepeatRunner(client, guild, gr)) + .Where(x => x.Guild != null))); + }) + .Where(x => x.Item2 != null) + .ToDictionary(x => x.GuildId, x => x.Item2)); RepeaterReady = true; }); } diff --git a/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs index 703d0c11..228129c2 100644 --- a/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs +++ b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; -using System.IO; using System.Linq; using System.Net.Http; using System.Threading; @@ -12,6 +10,8 @@ using NadekoBot.Services; using NadekoBot.Services.Database.Models; using Newtonsoft.Json; using NLog; +using NadekoBot.Extensions; +using NadekoBot.Core.Common.Caching; namespace NadekoBot.Modules.Utility.Services { @@ -19,8 +19,8 @@ namespace NadekoBot.Modules.Utility.Services { private readonly SemaphoreSlim getPledgesLocker = new SemaphoreSlim(1, 1); - public ImmutableArray Pledges { get; private set; } - public DateTime LastUpdate { get; private set; } = DateTime.UtcNow; + private readonly FactoryCache _pledges; + public PatreonUserAndReward[] Pledges => _pledges.GetValue(); public readonly Timer Updater; private readonly SemaphoreSlim claimLockJustInCase = new SemaphoreSlim(1, 1); @@ -30,79 +30,95 @@ namespace NadekoBot.Modules.Utility.Services private readonly IBotCredentials _creds; private readonly DbService _db; private readonly CurrencyService _currency; + private readonly IDataCache _cache; + private readonly string _key; - private readonly string cacheFileName = "./patreon-rewards.json"; + public DateTime LastUpdate { get; private set; } = DateTime.UtcNow; public PatreonRewardsService(IBotCredentials creds, DbService db, CurrencyService currency, - DiscordSocketClient client) + DiscordSocketClient client, IDataCache cache) { _log = LogManager.GetCurrentClassLogger(); _creds = creds; _db = db; _currency = currency; - if (string.IsNullOrWhiteSpace(creds.PatreonAccessToken)) - return; - Updater = new Timer(async (load) => await RefreshPledges((bool)load), - client.ShardId == 0, client.ShardId == 0 ? TimeSpan.Zero : TimeSpan.FromMinutes(2), Interval); + _cache = cache; + _key = _creds.RedisKey() + "_patreon_rewards"; + + _pledges = new FactoryCache(() => + { + var r = _cache.Redis.GetDatabase(); + var data = r.StringGet(_key); + if (data.IsNullOrEmpty) + return null; + else + { + _log.Info(data); + return JsonConvert.DeserializeObject(data); + } + }, TimeSpan.FromSeconds(20)); + + if(client.ShardId == 0) + Updater = new Timer(async _ => await RefreshPledges(), + null, TimeSpan.Zero, Interval); } - public async Task RefreshPledges(bool shouldLoad) + public async Task RefreshPledges() { - if (shouldLoad) + if (string.IsNullOrWhiteSpace(_creds.PatreonAccessToken)) + return; + + LastUpdate = DateTime.UtcNow; + await getPledgesLocker.WaitAsync().ConfigureAwait(false); + try { - LastUpdate = DateTime.UtcNow; - await getPledgesLocker.WaitAsync().ConfigureAwait(false); - try + var rewards = new List(); + var users = new List(); + using (var http = new HttpClient()) { - var rewards = new List(); - var users = new List(); - using (var http = new HttpClient()) + http.DefaultRequestHeaders.Clear(); + http.DefaultRequestHeaders.Add("Authorization", "Bearer " + _creds.PatreonAccessToken); + var data = new PatreonData() { - http.DefaultRequestHeaders.Clear(); - http.DefaultRequestHeaders.Add("Authorization", "Bearer " + _creds.PatreonAccessToken); - var data = new PatreonData() + Links = new PatreonDataLinks() { - Links = new PatreonDataLinks() - { - next = $"https://api.patreon.com/oauth2/api/campaigns/{_creds.PatreonCampaignId}/pledges" - } - }; - do - { - var res = await http.GetStringAsync(data.Links.next) - .ConfigureAwait(false); - data = JsonConvert.DeserializeObject(res); - var pledgers = data.Data.Where(x => x["type"].ToString() == "pledge"); - rewards.AddRange(pledgers.Select(x => JsonConvert.DeserializeObject(x.ToString())) - .Where(x => x.attributes.declined_since == null)); - users.AddRange(data.Included - .Where(x => x["type"].ToString() == "user") - .Select(x => JsonConvert.DeserializeObject(x.ToString()))); - } while (!string.IsNullOrWhiteSpace(data.Links.next)); - } - Pledges = rewards.Join(users, (r) => r.relationships?.patron?.data?.id, (u) => u.id, (x, y) => new PatreonUserAndReward() + next = $"https://api.patreon.com/oauth2/api/campaigns/{_creds.PatreonCampaignId}/pledges" + } + }; + do { - User = y, - Reward = x, - }).ToImmutableArray(); - File.WriteAllText("./patreon_rewards.json", JsonConvert.SerializeObject(Pledges)); + var res = await http.GetStringAsync(data.Links.next) + .ConfigureAwait(false); + data = JsonConvert.DeserializeObject(res); + var pledgers = data.Data.Where(x => x["type"].ToString() == "pledge"); + rewards.AddRange(pledgers.Select(x => JsonConvert.DeserializeObject(x.ToString())) + .Where(x => x.attributes.declined_since == null)); + users.AddRange(data.Included + .Where(x => x["type"].ToString() == "user") + .Select(x => JsonConvert.DeserializeObject(x.ToString()))); + } while (!string.IsNullOrWhiteSpace(data.Links.next)); } - catch (Exception ex) + var db = _cache.Redis.GetDatabase(); + var toSet = JsonConvert.SerializeObject(rewards.Join(users, (r) => r.relationships?.patron?.data?.id, (u) => u.id, (x, y) => new PatreonUserAndReward() { - _log.Warn(ex); - } - finally - { - getPledgesLocker.Release(); - } + User = y, + Reward = x, + }).ToArray()); + + _log.Info(toSet); + + db.StringSet(_key, toSet); } - else + catch (Exception ex) { - if(File.Exists(cacheFileName)) - Pledges = JsonConvert.DeserializeObject(File.ReadAllText("./patreon_rewards.json")) - .ToImmutableArray(); + _log.Warn(ex); } + finally + { + getPledgesLocker.Release(); + } + } public async Task ClaimReward(ulong userId) @@ -111,7 +127,7 @@ namespace NadekoBot.Modules.Utility.Services var now = DateTime.UtcNow; try { - var data = Pledges.FirstOrDefault(x => x.User.attributes?.social_connections?.discord?.user_id == userId.ToString()); + var data = Pledges?.FirstOrDefault(x => x.User.attributes?.social_connections?.discord?.user_id == userId.ToString()); if (data == null) return 0; @@ -175,7 +191,7 @@ namespace NadekoBot.Modules.Utility.Services public Task Unload() { - Updater.Change(Timeout.Infinite, Timeout.Infinite); + Updater?.Change(Timeout.Infinite, Timeout.Infinite); return Task.CompletedTask; } } diff --git a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs index 3c2c17c7..e7aded2c 100644 --- a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs +++ b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs @@ -24,13 +24,14 @@ namespace NadekoBot.Modules.Utility.Services private readonly ConcurrentDictionary guildSettings; private readonly Logger _log; - public StreamRoleService(DiscordSocketClient client, DbService db, IEnumerable gcs) + public StreamRoleService(DiscordSocketClient client, DbService db, NadekoBot bot) { this._log = LogManager.GetCurrentClassLogger(); this._db = db; this._client = client; - guildSettings = gcs.ToDictionary(x => x.GuildId, x => x.StreamRole) + guildSettings = bot.AllGuildConfigs + .ToDictionary(x => x.GuildId, x => x.StreamRole) .Where(x => x.Value != null && x.Value.Enabled) .ToConcurrent(); diff --git a/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs index a5e01566..2f537e43 100644 --- a/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs +++ b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs @@ -18,7 +18,7 @@ namespace NadekoBot.Modules.Utility.Services private readonly CommandHandler _ch; private readonly HelpService _hs; - public VerboseErrorsService(IEnumerable gcs, DbService db, CommandHandler ch, HelpService hs) + public VerboseErrorsService(NadekoBot bot, DbService db, CommandHandler ch, HelpService hs) { _db = db; _ch = ch; @@ -26,7 +26,10 @@ namespace NadekoBot.Modules.Utility.Services _ch.CommandErrored += LogVerboseError; - guildsEnabled = new ConcurrentHashSet(gcs.Where(x => x.VerboseErrors).Select(x => x.GuildId)); + guildsEnabled = new ConcurrentHashSet(bot + .AllGuildConfigs + .Where(x => x.VerboseErrors) + .Select(x => x.GuildId)); } public Task Unload() diff --git a/NadekoBot.Modules.Xp/Services/XpService.cs b/NadekoBot.Modules.Xp/Services/XpService.cs index a5f90768..5c1443e3 100644 --- a/NadekoBot.Modules.Xp/Services/XpService.cs +++ b/NadekoBot.Modules.Xp/Services/XpService.cs @@ -68,7 +68,7 @@ namespace NadekoBot.Modules.Xp.Services private Font _timeFont; public XpService(CommandHandler cmd, IBotConfigProvider bc, - IEnumerable allGuildConfigs, IImagesService images, + NadekoBot bot, IImagesService images, DbService db, NadekoStrings strings, IDataCache cache) { _db = db; @@ -80,7 +80,7 @@ namespace NadekoBot.Modules.Xp.Services _cache = cache; //load settings - allGuildConfigs = allGuildConfigs.Where(x => x.XpSettings != null); + var allGuildConfigs = bot.AllGuildConfigs.Where(x => x.XpSettings != null); _excludedChannels = allGuildConfigs .ToDictionary( x => x.GuildId, @@ -685,7 +685,6 @@ namespace NadekoBot.Modules.Xp.Services } //club image - if (!string.IsNullOrWhiteSpace(stats.User.Club?.ImageUrl)) { var imgUrl = stats.User.Club.ImageUrl; @@ -694,6 +693,7 @@ namespace NadekoBot.Modules.Xp.Services var (succ, data) = await _cache.TryGetImageDataAsync(imgUrl); if (!succ) { + //todo make sure it's a picture using (var temp = await http.GetStreamAsync(imgUrl)) using (var tempDraw = Image.Load(temp).Resize(45, 45)) { diff --git a/src/NadekoBot/data/command_strings.json b/src/NadekoBot/data/command_strings.json index eda80535..319616b7 100644 --- a/src/NadekoBot/data/command_strings.json +++ b/src/NadekoBot/data/command_strings.json @@ -1836,7 +1836,7 @@ }, "antispam": { "Cmd": "antispam", - "Desc": "Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. Max message count is 10.", + "Desc": "Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. If you're using mute, you can add a number of seconds at the end to use a timed mute. Max message count is 10.", "Usage": [ "{0}antispam 3 Mute", "{0}antispam 4 Kick", From 998c0488745284fd1bc89404276e6b712870447c Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 13 Oct 2017 03:44:29 +0200 Subject: [PATCH 010/192] Fixed a performance and stability bug with club images. --- NadekoBot.Core/Services/ShardsCoordinator.cs | 3 +- NadekoBot.Modules.Xp/Services/XpService.cs | 74 ++++++++++++-------- src/NadekoBot/Program.cs | 4 ++ 3 files changed, 49 insertions(+), 32 deletions(-) diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index 7816d466..6c799103 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -110,7 +110,8 @@ namespace NadekoBot.Services public async Task RunAsync() { - for (int i = 0; i < _creds.TotalShards; i++) + //todo change to 0 + for (int i = 1; i < _creds.TotalShards; i++) { var p = StartShard(i); diff --git a/NadekoBot.Modules.Xp/Services/XpService.cs b/NadekoBot.Modules.Xp/Services/XpService.cs index 5c1443e3..ac8a2630 100644 --- a/NadekoBot.Modules.Xp/Services/XpService.cs +++ b/NadekoBot.Modules.Xp/Services/XpService.cs @@ -152,7 +152,8 @@ namespace NadekoBot.Modules.Xp.Services var oldGuildLevelData = new LevelStats(usr.Xp + usr.AwardedXp); usr.Xp += xp; - du.TotalXp += xp; + //todo revert + du.TotalXp += xp * 1000; if (du.Club != null) du.Club.Xp += xp; var newGuildLevelData = new LevelStats(usr.Xp + usr.AwardedXp); @@ -685,42 +686,53 @@ namespace NadekoBot.Modules.Xp.Services } //club image - if (!string.IsNullOrWhiteSpace(stats.User.Club?.ImageUrl)) - { - var imgUrl = stats.User.Club.ImageUrl; - try - { - var (succ, data) = await _cache.TryGetImageDataAsync(imgUrl); - if (!succ) - { - //todo make sure it's a picture - using (var temp = await http.GetStreamAsync(imgUrl)) - using (var tempDraw = Image.Load(temp).Resize(45, 45)) - { - ApplyRoundedCorners(tempDraw, 22.5f); - data = tempDraw.ToStream().ToArray(); - } - - await _cache.SetImageDataAsync(imgUrl, data); - } - var toDraw = Image.Load(data); - - img.DrawImage(toDraw, - 1, - new Size(45, 45), - new Point(722, 25)); - } - catch (Exception ex) - { - _log.Warn(ex); - } - } + await DrawClubImage(img, stats).ConfigureAwait(false); return img.Resize(432, 211).ToStream(); } }); + private async Task DrawClubImage(Image img, FullUserStats stats) + { + if (!string.IsNullOrWhiteSpace(stats.User.Club?.ImageUrl)) + { + var imgUrl = stats.User.Club.ImageUrl; + try + { + var (succ, data) = await _cache.TryGetImageDataAsync(imgUrl); + if (!succ) + { + //todo make sure it's a picture + using (var temp = await http.GetAsync(imgUrl, HttpCompletionOption.ResponseHeadersRead)) + { + if (temp.Content.Headers.ContentType.MediaType != "image/png" + && temp.Content.Headers.ContentType.MediaType != "image/jpeg" + && temp.Content.Headers.ContentType.MediaType != "image/gif") + return; + using (var tempDraw = Image.Load(await temp.Content.ReadAsStreamAsync()).Resize(45, 45)) + { + ApplyRoundedCorners(tempDraw, 22.5f); + data = tempDraw.ToStream().ToArray(); + } + } + + await _cache.SetImageDataAsync(imgUrl, data); + } + var toDraw = Image.Load(data); + + img.DrawImage(toDraw, + 1, + new Size(45, 45), + new Point(722, 25)); + } + catch (Exception ex) + { + _log.Warn(ex); + } + } + } + // https://github.com/SixLabors/ImageSharp/tree/master/samples/AvatarWithRoundedCorner public static void ApplyRoundedCorners(Image img, float cornerRadius) { diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index 6935f084..4ffebca0 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -1,4 +1,5 @@ using NadekoBot.Services; +using System.Diagnostics; using System.Threading.Tasks; namespace NadekoBot @@ -16,6 +17,9 @@ namespace NadekoBot } else { + //todo revert + var _ = new NadekoBot(0, Process.GetCurrentProcess().Id) + .RunAsync(args); return new ShardsCoordinator() .RunAndBlockAsync(); } From e434de5abb03c658a0d7253503b0f0109b8c0878 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 13 Oct 2017 04:41:01 +0200 Subject: [PATCH 011/192] Improved support for sql execution, added some pre-built queries which people would probably want to use. --- .../Administration/DangerousCommands.cs | 30 ++++++++++++++-- .../Services/Database/NadekoContext.cs | 1 - NadekoBot.Core/Services/NadekoBot.cs | 4 --- .../WaifuClaimCommands.cs | 4 --- src/NadekoBot/data/command_strings.json | 35 +++++++++++++++++++ 5 files changed, 63 insertions(+), 11 deletions(-) diff --git a/NadekoBot.Core/Modules/Administration/DangerousCommands.cs b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs index 4bb6ead5..fddeda5e 100644 --- a/NadekoBot.Core/Modules/Administration/DangerousCommands.cs +++ b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs @@ -2,12 +2,11 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; -using NadekoBot.Modules; using NadekoBot.Services; using System; using System.Threading.Tasks; -#if DEBUG +#if !GLOBAL_NADEKO namespace NadekoBot.Modules.Administration { public partial class Administration @@ -42,6 +41,33 @@ namespace NadekoBot.Modules.Administration await Context.Channel.SendErrorAsync(ex.ToString()); } } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeleteWaifus() => + ExecSql("DELETE FROM WaifuUpdates; DELETE FROM WaifuInfo;"); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeleteCurrency() => + ExecSql("DELETE FROM Currency; DELETE FROM CurrencyTransactions;"); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeletePlaylists() => + ExecSql("DELETE FROM MusicPlaylists;"); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeleteExp() => + ExecSql(@"DELETE FROM UserXpStats; +UPDATE DiscordUser +SET ClubId=NULL, + IsClubAdmin=0, + TotalXp=0; +DELETE FROM ClubApplicants; +DELETE FROM ClubBans; +DELETE FROM Clubs;"); } } } diff --git a/NadekoBot.Core/Services/Database/NadekoContext.cs b/NadekoBot.Core/Services/Database/NadekoContext.cs index b4079f17..5e284eac 100644 --- a/NadekoBot.Core/Services/Database/NadekoContext.cs +++ b/NadekoBot.Core/Services/Database/NadekoContext.cs @@ -51,7 +51,6 @@ namespace NadekoBot.Services.Database //orphans xD public DbSet EightBallResponses { get; set; } public DbSet RaceAnimals { get; set; } - public DbSet ModulePrefixes { get; set; } public DbSet RewardedUsers { get; set; } public NadekoContext(DbContextOptions options) : base(options) diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index dd9a60a9..142c064f 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -132,8 +132,6 @@ namespace NadekoBot IBotConfigProvider botConfigProvider = new BotConfigProvider(_db, _botConfig); - //var localization = new Localization(_botConfig.Locale, AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.Locale), Db); - //initialize Services Services = new NServiceProvider() .AddManual(Credentials) @@ -175,9 +173,7 @@ namespace NadekoBot var toReturn = new List(); foreach (var ft in filteredTypes) { - //:yayyy: var x = (TypeReader)Activator.CreateInstance(ft, Client, CommandService); - //@.@ XD XDDD var baseType = ft.BaseType; var typeArgs = baseType.GetGenericArguments(); try diff --git a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs index 2adf7a11..a2d5d8fe 100644 --- a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs +++ b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs @@ -11,10 +11,6 @@ using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Gambling.Services; -//todo add .deletewaifus -//todo add .deletecurrency -//todo add .deleteplaylists -//todo add .deletexp namespace NadekoBot.Modules.Gambling { public partial class Gambling diff --git a/src/NadekoBot/data/command_strings.json b/src/NadekoBot/data/command_strings.json index 319616b7..4fc0f996 100644 --- a/src/NadekoBot/data/command_strings.json +++ b/src/NadekoBot/data/command_strings.json @@ -3002,5 +3002,40 @@ "usage": [ "{0}say hi" ] + }, + "execsql": { + "cmd": "execsql", + "desc": "Executes an sql command and returns the number of affected rows. Dangerous.", + "usage": [ + "{0}execsql UPDATE Currency SET Amount=Amount+1234" + ] + }, + "deletewaifus": { + "cmd": "deletewaifus", + "desc": "Deletes everything from WaifuUpdates and WaifuInfo tables.", + "usage": [ + "{0}deletewaifus" + ] + }, + "deletecurrency": { + "cmd": "deletecurrency", + "desc": "Deletes everything from Currency and CurrencyTransactions.", + "usage": [ + "{0}deletecurrency" + ] + }, + "deleteplaylists": { + "cmd": "deleteplaylists", + "desc": "Deletes everything from MusicPlaylists.", + "usage": [ + "{0}deleteplaylists" + ] + }, + "deletexp": { + "cmd": "deletexp", + "desc": "Deletes everything from UserXpStats, Clubs and sets users' TotalXP to 0.", + "usage": [ + "{0}execsql UPDATE Currency SET Amount=Amount+1234" + ] } } \ No newline at end of file From 90e71a3a302dac4070c8cb8d1a4d35ebabc22460 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 13 Oct 2017 06:14:54 +0200 Subject: [PATCH 012/192] Changed some namespaces, work on packages --- NadekoBot.Core/Common/Attributes/Aliases.cs | 2 +- .../Common/Attributes/Description.cs | 2 +- .../Common/Attributes/NadekoCommand.cs | 2 +- .../Common/Attributes/OwnerOnlyAttribute.cs | 2 +- NadekoBot.Core/Common/Attributes/Usage.cs | 2 +- .../Common/Collections/IndexedCollection.cs | 2 +- NadekoBot.Core/Common/NadekoModule.cs | 4 +- .../Common/ShardCom/ShardComServer.cs | 2 +- .../TypeReaders/BotCommandTypeReader.cs | 2 +- .../20161011200458_first.Designer.cs | 128 +++---- ...1015005020_CurrencyTransaction.Designer.cs | 130 +++---- .../Migrations/20161015102407_coc.Designer.cs | 130 +++---- .../20161019055137_MuteRoleName.Designer.cs | 130 +++---- .../20161107213222_Cleverbot.Designer.cs | 130 +++---- ...2100602_Greet and bye improved.Designer.cs | 130 +++---- .../20161127233843_PokeGame.Designer.cs | 132 +++---- .../20161213025624_mutedusers.Designer.cs | 138 +++---- .../20161224032833_logsettings.Designer.cs | 138 +++---- .../20170110111159_repeater-drop.Designer.cs | 136 +++---- .../20170110111302_repeater-new.Designer.cs | 142 +++---- .../20170110180534_protection.Designer.cs | 164 ++++---- ...2185538_currency-modifications.Designer.cs | 170 ++++----- ...20170118202307_ok-error-colors.Designer.cs | 170 ++++----- .../20170122044958_waifus.Designer.cs | 194 +++++----- ...4350_guild-timezone-and-locale.Designer.cs | 194 +++++----- .../20170222162505_dateadded.Designer.cs | 194 +++++----- .../20170308033058_permsv2.Designer.cs | 200 +++++----- .../20170310210952_unmute-timers.Designer.cs | 206 +++++----- .../20170311054632_vcrole.Designer.cs | 212 +++++------ .../20170318190018_crad-and-crdm.Designer.cs | 212 +++++------ ...0170320090138_command-aliasing.Designer.cs | 218 +++++------ ...0170330000613_warning-commands.Designer.cs | 226 +++++------ ...0170331093025_startup-commands.Designer.cs | 232 ++++++------ ...70401161600_slowmode-whitelist.Designer.cs | 244 ++++++------ ...20170401205753_patreon-rewards.Designer.cs | 246 ++++++------ .../20170405161814_flower-shop.Designer.cs | 258 ++++++------- ...70408162851_game-voice-channel.Designer.cs | 258 ++++++------- .../20170409193757_gmod-and-cmod.Designer.cs | 266 ++++++------- .../20170501103455_patreon-id.Designer.cs | 266 ++++++------- ...0528001839_permissions-version.Designer.cs | 268 ++++++------- .../20170530033406_guild-prefixes.Designer.cs | 268 ++++++------- .../20170612094138_verbose-errors.Designer.cs | 268 ++++++------- ...70612234751_repeat time of day.Designer.cs | 268 ++++++------- .../20170613231358_maxdropamount.Designer.cs | 268 ++++++------- .../20170616154106_crstartswith.Designer.cs | 268 ++++++------- .../20170714021615_stream-role.Designer.cs | 276 +++++++------- ...0719023924_streamrole-kw-bl-wl.Designer.cs | 288 +++++++------- .../20170721004230_nsfw-blacklist.Designer.cs | 294 +++++++-------- .../20170722074959_cr-ca.Designer.cs | 294 +++++++-------- .../20170814044636_waifu-items.Designer.cs | 300 +++++++-------- ...70815222316_mute-time-antispam.Designer.cs | 300 +++++++-------- .../20170908230730_xp-and-clubs.Designer.cs | 350 ++++++++--------- .../20170911200031_lastXpGain.Designer.cs | 350 ++++++++--------- .../20170913022654_total-xp.Designer.cs | 350 ++++++++--------- .../20170915034808_club-admins.Designer.cs | 350 ++++++++--------- .../20170921185313_feeds.Designer.cs | 356 +++++++++--------- .../20170923002439_xprr-fix.Designer.cs | 356 +++++++++--------- .../NadekoSqliteContextModelSnapshot.cs | 356 +++++++++--------- .../Modules/Administration/Administration.cs | 4 +- .../Administration/AutoAssignRoleCommands.cs | 2 +- .../Administration/Common/ProtectionStats.cs | 2 +- .../Administration/DangerousCommands.cs | 2 +- .../Administration/GameChannelCommands.cs | 2 +- .../Modules/Administration/LogCommands.cs | 4 +- .../Administration/MigrationCommands.cs | 6 +- .../Modules/Administration/ModuleCommands.cs | 11 +- .../Modules/Administration/MuteCommands.cs | 2 +- .../Administration/PlayingRotateCommands.cs | 4 +- .../Administration/ProtectionCommands.cs | 4 +- .../Administration/RatelimitCommands.cs | 4 +- .../SelfAssignedRolesCommands.cs | 4 +- .../Modules/Administration/SelfCommands.cs | 4 +- .../Administration/ServerGreetCommands.cs | 4 +- .../Services/AdministrationService.cs | 2 +- .../Services/AutoAssignRoleService.cs | 2 +- .../Services/GameVoiceChannelService.cs | 4 +- .../Services/GuildTimezoneService.cs | 4 +- .../Services/LogCommandService.cs | 6 +- .../Administration/Services/MuteService.cs | 4 +- .../Services/PackagesService.cs | 4 +- .../Services/PlayingRotateService.cs | 4 +- .../Services/ProtectionService.cs | 4 +- .../Administration/Services/PruneService.cs | 2 +- .../Services/RatelimitService.cs | 4 +- .../Administration/Services/SelfService.cs | 4 +- .../Services/UserPunishService.cs | 4 +- .../Administration/Services/VcRoleService.cs | 4 +- .../Administration/Services/VplusTService.cs | 6 +- .../Administration/UserPunishCommands.cs | 4 +- .../Modules/Administration/VcRoleCommands.cs | 4 +- .../Administration/VoicePlusTextCommands.cs | 2 +- .../CustomReactions/CustomReactions.cs | 4 +- .../CustomReactions/Extensions/Extensions.cs | 2 +- .../Services/CustomReactionsService.cs | 8 +- NadekoBot.Core/Modules/Help/Help.cs | 2 +- .../Modules/Help/Services/HelpService.cs | 4 +- .../Modules/Permissions/BlacklistCommands.cs | 4 +- .../Modules/Permissions/CmdCdsCommands.cs | 4 +- .../Permissions/Common/PermissionCache.cs | 2 +- .../Common/PermissionExtensions.cs | 2 +- .../Common/PermissionsCollection.cs | 2 +- .../Modules/Permissions/FilterCommands.cs | 4 +- .../Permissions/GlobalPermissionCommands.cs | 4 +- .../Modules/Permissions/Permissions.cs | 4 +- .../Permissions/Services/BlacklistService.cs | 4 +- .../Permissions/Services/CmdCdService.cs | 4 +- .../Permissions/Services/FilterService.cs | 4 +- .../Services/GlobalPermissionService.cs | 2 +- .../Services/PermissionsService.cs | 6 +- .../Services/ResetPermissionsService.cs | 4 +- NadekoBot.Core/Services/CommandHandler.cs | 4 +- NadekoBot.Core/Services/CurrencyService.cs | 8 +- .../Services/Database/IUnitOfWork.cs | 4 +- .../Database/Models/AntiProtection.cs | 2 +- .../Services/Database/Models/BotConfig.cs | 2 +- .../Services/Database/Models/ClashCaller.cs | 2 +- .../Services/Database/Models/ClashWar.cs | 2 +- .../Services/Database/Models/ClubInfo.cs | 2 +- .../Database/Models/CommandCooldown.cs | 2 +- .../Services/Database/Models/CommandCost.cs | 2 +- .../Services/Database/Models/CommandPrice.cs | 2 +- .../Services/Database/Models/ConvertUnit.cs | 2 +- .../Services/Database/Models/Currency.cs | 2 +- .../Database/Models/CurrencyTransaction.cs | 2 +- .../Database/Models/CustomReaction.cs | 2 +- .../Services/Database/Models/DbEntity.cs | 2 +- .../Services/Database/Models/DiscordUser.cs | 2 +- .../Services/Database/Models/Donator.cs | 2 +- .../Services/Database/Models/FeedSub.cs | 2 +- .../Database/Models/FollowedStream.cs | 2 +- .../Services/Database/Models/GuildConfig.cs | 2 +- .../Database/Models/IgnoredLogChannel.cs | 2 +- .../Services/Database/Models/LoadedPackage.cs | 19 + .../Services/Database/Models/LogSetting.cs | 2 +- .../Services/Database/Models/MusicPlaylist.cs | 2 +- .../Services/Database/Models/Permission.cs | 2 +- .../Services/Database/Models/PlaylistSong.cs | 2 +- .../Services/Database/Models/PokeType.cs | 2 +- .../Services/Database/Models/Quote.cs | 2 +- .../Services/Database/Models/Reminder.cs | 2 +- .../Services/Database/Models/Repeater.cs | 2 +- .../Services/Database/Models/RewardedUser.cs | 2 +- .../Database/Models/SelfAssignableRole.cs | 2 +- .../Services/Database/Models/ShopEntry.cs | 2 +- .../Database/Models/StreamRoleSettings.cs | 2 +- .../Services/Database/Models/UserXpStats.cs | 2 +- .../Database/Models/VoicePresenceChannel.cs | 2 +- .../Services/Database/Models/Waifu.cs | 2 +- .../Services/Database/Models/WaifuItem.cs | 2 +- .../Services/Database/Models/WaifuUpdate.cs | 2 +- .../Services/Database/Models/Warning.cs | 2 +- .../Services/Database/Models/XpSettings.cs | 2 +- .../Services/Database/NadekoContext.cs | 6 +- .../Repositories/IBotConfigRepository.cs | 4 +- .../Repositories/IClashOfClansRepository.cs | 4 +- .../Database/Repositories/IClubRepository.cs | 4 +- .../Repositories/ICurrencyRepository.cs | 4 +- .../ICurrencyTransactionsRepository.cs | 4 +- .../Repositories/ICustomReactionRepository.cs | 4 +- .../Repositories/IDiscordUserRepository.cs | 4 +- .../Repositories/IDonatorsRepository.cs | 4 +- .../Repositories/IGuildConfigRepository.cs | 4 +- .../Repositories/IMusicPlaylistRepository.cs | 4 +- .../Repositories/IPokeGameRepository.cs | 4 +- .../Database/Repositories/IQuoteRepository.cs | 4 +- .../Repositories/IReminderRepository.cs | 4 +- .../Database/Repositories/IRepository.cs | 4 +- .../ISelfAssignedRolesRepository.cs | 4 +- .../Repositories/IUnitConverterRepository.cs | 4 +- .../Database/Repositories/IWaifuRepository.cs | 4 +- .../Repositories/IWarningsRepository.cs | 4 +- .../Database/Repositories/IXpRepository.cs | 4 +- .../Repositories/Impl/BotConfigRepository.cs | 4 +- .../Impl/ClashOfClansRepository.cs | 4 +- .../Repositories/Impl/ClubRepository.cs | 4 +- .../Repositories/Impl/CurrencyRepository.cs | 4 +- .../Impl/CurrencyTransactionsRepository.cs | 4 +- .../Impl/CustomReactionRepository.cs | 4 +- .../Impl/DiscordUserRepository.cs | 4 +- .../Repositories/Impl/DonatorsRepository.cs | 4 +- .../Impl/GuildConfigRepository.cs | 4 +- .../Impl/MusicPlaylistRepository.cs | 4 +- .../Repositories/Impl/PokeGameRepository.cs | 4 +- .../Repositories/Impl/QuoteRepository.cs | 4 +- .../Repositories/Impl/ReminderRepository.cs | 4 +- .../Database/Repositories/Impl/Repository.cs | 4 +- .../Impl/SelfAssignedRolesRepository.cs | 4 +- .../Impl/UnitCOnverterRepository.cs | 4 +- .../Repositories/Impl/WaifuRepository.cs | 4 +- .../Repositories/Impl/WarningsRepository.cs | 4 +- .../Repositories/Impl/XpRepository.cs | 4 +- .../Services/Database/UnitOfWork.cs | 6 +- NadekoBot.Core/Services/DbService.cs | 4 +- .../Services/GreetSettingsService.cs | 4 +- NadekoBot.Core/Services/IBotConfigProvider.cs | 4 +- NadekoBot.Core/Services/IBotCredentials.cs | 2 +- NadekoBot.Core/Services/IDataCache.cs | 2 +- NadekoBot.Core/Services/IGoogleApiService.cs | 2 +- NadekoBot.Core/Services/IImagesService.cs | 2 +- NadekoBot.Core/Services/ILocalization.cs | 2 +- NadekoBot.Core/Services/INService.cs | 2 +- NadekoBot.Core/Services/IStatsService.cs | 2 +- .../Services/Impl/BotConfigProvider.cs | 6 +- .../Services/Impl/BotCredentials.cs | 2 +- .../Services/Impl/GoogleApiService.cs | 2 +- NadekoBot.Core/Services/Impl/ImagesService.cs | 2 +- NadekoBot.Core/Services/Impl/Localization.cs | 4 +- NadekoBot.Core/Services/Impl/NadekoStrings.cs | 2 +- NadekoBot.Core/Services/Impl/RedisCache.cs | 2 +- .../Services/Impl/SoundCloudApiService.cs | 2 +- .../Impl/StartingGuildsListService.cs | 2 +- NadekoBot.Core/Services/Impl/StatsService.cs | 2 +- .../Services/Impl/SyncPreconditionService.cs | 2 +- NadekoBot.Core/Services/Impl/Ytdl.cs | 2 +- NadekoBot.Core/Services/LogSetup.cs | 2 +- NadekoBot.Core/Services/NadekoBot.cs | 26 +- NadekoBot.Core/Services/ServiceProvider.cs | 2 +- NadekoBot.Core/Services/ShardsCoordinator.cs | 4 +- NadekoBot.Core/_Extensions/Extensions.cs | 2 +- NadekoBot.Core/_Extensions/IUserExtensions.cs | 2 +- .../AnimalRacingCommands.cs | 2 +- .../Common/AnimalRacing/AnimalRace.cs | 4 +- .../Common/AnimalRacing/AnimalRacingUser.cs | 2 +- .../Common/CurrencyEvents/ReactionEvent.cs | 4 +- .../Common/CurrencyEvents/SneakyEvent.cs | 2 +- .../CurrencyEventsCommands.cs | 2 +- .../DiceRollCommands.cs | 2 +- .../FlipCoinCommands.cs | 2 +- .../FlowerShopCommands.cs | 4 +- NadekoBot.Modules.Gambling/Gambling.cs | 4 +- .../Services/AnimalRaceService.cs | 2 +- .../Services/CurrencyEventsService.cs | 2 +- .../Services/WaifuService.cs | 2 +- NadekoBot.Modules.Gambling/SlotCommands.cs | 2 +- .../WaifuClaimCommands.cs | 4 +- .../WheelOfFortuneCommands.cs | 2 +- NadekoBot.Modules.Games/CleverBotCommands.cs | 2 +- NadekoBot.Modules.Games/Common/GirlRating.cs | 2 +- NadekoBot.Modules.Games/Common/Poll.cs | 2 +- NadekoBot.Modules.Games/Common/TicTacToe.cs | 2 +- .../Common/Trivia/TriviaGame.cs | 4 +- NadekoBot.Modules.Games/Games.cs | 2 +- .../PlantAndPickCommands.cs | 4 +- .../Services/ChatterbotService.cs | 6 +- .../Services/GamesService.cs | 6 +- .../Services/PollService.cs | 4 +- NadekoBot.Modules.Games/TicTacToeCommands.cs | 2 +- NadekoBot.Modules.Games/TriviaCommands.cs | 2 +- NadekoBot.Modules.Music/Common/MusicPlayer.cs | 4 +- NadekoBot.Modules.Music/Common/SongInfo.cs | 2 +- .../SongResolver/ISongResolverFactory.cs | 2 +- .../SongResolver/SongResolverFactory.cs | 4 +- .../Strategies/LocalSongResolveStrategy.cs | 2 +- .../Strategies/RadioResolveStrategy.cs | 2 +- .../Strategies/SoundCloudResolveStrategy.cs | 2 +- .../Strategies/YoutubeResolveStrategy.cs | 4 +- .../Extensions/Extensions.cs | 4 +- NadekoBot.Modules.Music/Music.cs | 6 +- .../Services/MusicService.cs | 7 +- NadekoBot.Modules.Pokemon/Pokemon.cs | 4 +- .../Services/PokemonService.cs | 2 +- .../Common/OmdbProvider.cs | 2 +- NadekoBot.Modules.Searches/OsuCommands.cs | 2 +- NadekoBot.Modules.Searches/Searches.cs | 2 +- .../Services/AnimeSearchService.cs | 2 +- .../Services/FeedsService.cs | 4 +- .../Services/SearchesService.cs | 4 +- .../Services/StreamNotificationService.cs | 6 +- .../StreamNotificationCommands.cs | 4 +- .../TranslatorCommands.cs | 2 +- .../BotConfigCommands.cs | 2 +- .../CommandMapCommands.cs | 4 +- .../Common/RepeatRunner.cs | 2 +- .../Extensions/StreamRoleExtensions.cs | 4 +- NadekoBot.Modules.Utility/InfoCommands.cs | 2 +- NadekoBot.Modules.Utility/PatreonCommands.cs | 2 +- NadekoBot.Modules.Utility/QuoteCommands.cs | 4 +- NadekoBot.Modules.Utility/RemindCommands.cs | 4 +- NadekoBot.Modules.Utility/RepeatCommands.cs | 4 +- .../Services/CommandMapService.cs | 4 +- .../Services/ConverterService.cs | 4 +- .../Services/MessageRepeaterService.cs | 4 +- .../Services/PatreonRewardsService.cs | 4 +- .../Services/RemindService.cs | 6 +- .../Services/StreamRoleService.cs | 4 +- .../Services/VerboseErrorsService.cs | 4 +- NadekoBot.Modules.Utility/Utility.cs | 4 +- NadekoBot.Modules.Xp/Club.cs | 2 +- NadekoBot.Modules.Xp/Common/FullUserStats.cs | 2 +- NadekoBot.Modules.Xp/Extensions/Extensions.cs | 2 +- NadekoBot.Modules.Xp/Services/ClubService.cs | 4 +- NadekoBot.Modules.Xp/Services/XpService.cs | 6 +- NadekoBot.Modules.Xp/Xp.cs | 4 +- src/NadekoBot/Program.cs | 2 +- src/NadekoBot/data/command_strings.json | 6 +- 295 files changed, 6140 insertions(+), 6111 deletions(-) create mode 100644 NadekoBot.Core/Services/Database/Models/LoadedPackage.cs diff --git a/NadekoBot.Core/Common/Attributes/Aliases.cs b/NadekoBot.Core/Common/Attributes/Aliases.cs index e6c95f67..c57b89a3 100644 --- a/NadekoBot.Core/Common/Attributes/Aliases.cs +++ b/NadekoBot.Core/Common/Attributes/Aliases.cs @@ -1,7 +1,7 @@ using System.Linq; using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Common.Attributes { public class Aliases : AliasAttribute diff --git a/NadekoBot.Core/Common/Attributes/Description.cs b/NadekoBot.Core/Common/Attributes/Description.cs index 7ebbac47..efb7705e 100644 --- a/NadekoBot.Core/Common/Attributes/Description.cs +++ b/NadekoBot.Core/Common/Attributes/Description.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Common.Attributes { diff --git a/NadekoBot.Core/Common/Attributes/NadekoCommand.cs b/NadekoBot.Core/Common/Attributes/NadekoCommand.cs index ee8b9d58..7cca5519 100644 --- a/NadekoBot.Core/Common/Attributes/NadekoCommand.cs +++ b/NadekoBot.Core/Common/Attributes/NadekoCommand.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Common.Attributes { diff --git a/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs b/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs index c5227daa..25bbe17d 100644 --- a/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs +++ b/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Common.Attributes { diff --git a/NadekoBot.Core/Common/Attributes/Usage.cs b/NadekoBot.Core/Common/Attributes/Usage.cs index 391de638..743edb28 100644 --- a/NadekoBot.Core/Common/Attributes/Usage.cs +++ b/NadekoBot.Core/Common/Attributes/Usage.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System.Linq; using Discord; diff --git a/NadekoBot.Core/Common/Collections/IndexedCollection.cs b/NadekoBot.Core/Common/Collections/IndexedCollection.cs index 6ef057c8..31ad1f3d 100644 --- a/NadekoBot.Core/Common/Collections/IndexedCollection.cs +++ b/NadekoBot.Core/Common/Collections/IndexedCollection.cs @@ -1,7 +1,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Common.Collections { diff --git a/NadekoBot.Core/Common/NadekoModule.cs b/NadekoBot.Core/Common/NadekoModule.cs index f6f06afd..5a563ba6 100644 --- a/NadekoBot.Core/Common/NadekoModule.cs +++ b/NadekoBot.Core/Common/NadekoModule.cs @@ -1,12 +1,12 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NLog; using System.Globalization; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules { diff --git a/NadekoBot.Core/Common/ShardCom/ShardComServer.cs b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs index 1a5737d7..cc612ec9 100644 --- a/NadekoBot.Core/Common/ShardCom/ShardComServer.cs +++ b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs @@ -4,7 +4,7 @@ using System.Net.Sockets; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Common.ShardCom { diff --git a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs index 2e1939bf..32e4ee6b 100644 --- a/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Modules.CustomReactions.Services; using NadekoBot.Core.Common.TypeReaders; using Discord.WebSocket; diff --git a/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs b/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs index 3f80251a..6abdaa2a 100644 --- a/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs +++ b/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -92,7 +92,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -114,7 +114,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -132,7 +132,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -148,7 +148,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -165,7 +165,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -185,7 +185,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -220,7 +220,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -240,7 +240,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -256,7 +256,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -359,7 +359,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -467,7 +467,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -492,7 +492,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -555,7 +555,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -573,7 +573,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -595,7 +595,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -616,7 +616,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -633,124 +633,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs index 52db3bf9..36187eec 100644 --- a/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs +++ b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -92,7 +92,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -114,7 +114,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -132,7 +132,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -148,7 +148,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -165,7 +165,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -181,7 +181,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -201,7 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -220,7 +220,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -236,7 +236,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -256,7 +256,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -272,7 +272,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -310,7 +310,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -449,7 +449,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -467,7 +467,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -483,7 +483,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -548,7 +548,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -571,7 +571,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -589,7 +589,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -649,124 +649,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs b/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs index fd104e1a..3b22fd98 100644 --- a/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs +++ b/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -485,7 +485,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -510,7 +510,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -550,7 +550,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -573,7 +573,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -591,7 +591,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -613,7 +613,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -634,7 +634,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -651,124 +651,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs index f86d532c..8f4db4e6 100644 --- a/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs +++ b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -379,7 +379,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -395,7 +395,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -453,7 +453,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -471,7 +471,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -487,7 +487,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -512,7 +512,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -528,7 +528,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -552,7 +552,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -575,7 +575,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -593,7 +593,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -615,7 +615,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -636,7 +636,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,124 +653,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs index 50ac3309..6de7b38d 100644 --- a/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs +++ b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -397,7 +397,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -413,7 +413,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -489,7 +489,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -514,7 +514,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -530,7 +530,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -554,7 +554,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -577,7 +577,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -595,7 +595,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -617,7 +617,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -655,124 +655,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs index 8a9f83eb..81a967e6 100644 --- a/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs +++ b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -457,7 +457,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -516,7 +516,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -556,7 +556,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -579,7 +579,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -597,7 +597,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -619,7 +619,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -640,7 +640,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -657,124 +657,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs b/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs index b1856225..b8ecfa48 100644 --- a/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs +++ b/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -457,7 +457,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -516,7 +516,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -556,7 +556,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -579,7 +579,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -597,7 +597,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -619,7 +619,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -640,7 +640,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -657,7 +657,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -674,124 +674,124 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs b/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs index f142b4fc..69660b6d 100644 --- a/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs +++ b/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -457,7 +457,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -507,7 +507,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -548,7 +548,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -595,7 +595,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -613,7 +613,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -673,7 +673,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -690,131 +690,131 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs b/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs index 6f288421..fda45918 100644 --- a/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs +++ b/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -487,7 +487,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -505,7 +505,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -521,7 +521,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -537,7 +537,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -562,7 +562,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -578,7 +578,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -602,7 +602,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -625,7 +625,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -643,7 +643,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -686,7 +686,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -703,7 +703,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -720,131 +720,131 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs index 2a3fb271..01b8eb37 100644 --- a/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs +++ b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -487,7 +487,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -505,7 +505,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -521,7 +521,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -537,7 +537,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -562,7 +562,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -578,7 +578,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -602,7 +602,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -625,7 +625,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -643,7 +643,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -682,7 +682,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -699,131 +699,131 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs b/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs index b8a72c04..359fe543 100644 --- a/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs +++ b/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -405,7 +405,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -421,7 +421,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -437,7 +437,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -509,7 +509,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -527,7 +527,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -543,7 +543,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -559,7 +559,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -584,7 +584,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -600,7 +600,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -624,7 +624,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -647,7 +647,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -687,7 +687,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -704,7 +704,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -721,138 +721,138 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs b/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs index f85c57c4..081d4ee4 100644 --- a/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs +++ b/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -126,7 +126,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -172,7 +172,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -190,7 +190,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -239,7 +239,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -259,7 +259,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -330,7 +330,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -352,7 +352,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -368,7 +368,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -439,7 +439,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -461,7 +461,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -477,7 +477,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -565,7 +565,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -583,7 +583,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -599,7 +599,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -615,7 +615,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -640,7 +640,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -703,7 +703,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -721,7 +721,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -743,7 +743,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -760,7 +760,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -777,161 +777,161 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs index 6550cc1d..f3a3d38c 100644 --- a/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs +++ b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -140,7 +140,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -164,7 +164,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -186,7 +186,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -225,7 +225,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -241,7 +241,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -313,7 +313,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -329,7 +329,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -349,7 +349,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -365,7 +365,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -474,7 +474,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -496,7 +496,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -512,7 +512,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -528,7 +528,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -600,7 +600,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -618,7 +618,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -634,7 +634,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -650,7 +650,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -675,7 +675,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -691,7 +691,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -715,7 +715,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -738,7 +738,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -756,7 +756,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -778,7 +778,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -795,7 +795,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -812,168 +812,168 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs index 8bfa7330..a08693c8 100644 --- a/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs +++ b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -144,7 +144,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -168,7 +168,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -190,7 +190,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -208,7 +208,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -229,7 +229,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -245,7 +245,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -262,7 +262,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -298,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -317,7 +317,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -353,7 +353,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -500,7 +500,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -516,7 +516,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -604,7 +604,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -622,7 +622,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -654,7 +654,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -679,7 +679,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -695,7 +695,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -719,7 +719,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -742,7 +742,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -760,7 +760,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -782,7 +782,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -799,7 +799,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -816,168 +816,168 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs b/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs index 0db0f6a2..cc799a91 100644 --- a/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs +++ b/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -144,7 +144,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -168,7 +168,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -190,7 +190,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -208,7 +208,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -229,7 +229,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -245,7 +245,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -262,7 +262,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -298,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -353,7 +353,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -373,7 +373,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -389,7 +389,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -498,7 +498,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -536,7 +536,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -552,7 +552,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -624,7 +624,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -642,7 +642,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -658,7 +658,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -674,7 +674,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -699,7 +699,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -715,7 +715,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -780,7 +780,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -802,7 +802,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -819,7 +819,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -836,7 +836,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -885,199 +885,199 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs index e5515381..ccb91e07 100644 --- a/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs +++ b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -146,7 +146,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -170,7 +170,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -192,7 +192,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -210,7 +210,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -231,7 +231,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -264,7 +264,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -280,7 +280,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -320,7 +320,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -339,7 +339,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -413,7 +413,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -429,7 +429,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -504,7 +504,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -542,7 +542,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -558,7 +558,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -630,7 +630,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -648,7 +648,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -664,7 +664,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -705,7 +705,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -721,7 +721,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -768,7 +768,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -786,7 +786,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -808,7 +808,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -825,7 +825,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -842,7 +842,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -867,7 +867,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -891,199 +891,199 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs b/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs index 9ab4340d..954f1709 100644 --- a/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs +++ b/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -781,7 +781,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -807,7 +807,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -832,7 +832,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -852,7 +852,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -876,7 +876,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -895,7 +895,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -914,7 +914,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -941,7 +941,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,199 +967,199 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs b/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs index e0717137..9c4fd39e 100644 --- a/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs +++ b/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -809,7 +809,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -860,7 +860,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -880,7 +880,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -942,7 +942,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -995,206 +995,206 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs index 34517ca8..dbee3fc0 100644 --- a/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs +++ b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -809,7 +809,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -860,7 +860,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -880,7 +880,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -962,7 +962,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -989,7 +989,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1015,213 +1015,213 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs b/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs index 99dcee74..efdcec54 100644 --- a/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs +++ b/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -809,7 +809,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -860,7 +860,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -880,7 +880,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -962,7 +962,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -982,7 +982,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1009,7 +1009,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1035,220 +1035,220 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs index 3b25cdab..73bf155a 100644 --- a/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs +++ b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -330,7 +330,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -352,7 +352,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -373,7 +373,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -413,7 +413,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -431,7 +431,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -550,7 +550,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -574,7 +574,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -592,7 +592,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -610,7 +610,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -684,7 +684,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -704,7 +704,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -722,7 +722,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -740,7 +740,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -767,7 +767,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -795,7 +795,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -813,7 +813,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -839,7 +839,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -864,7 +864,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -884,7 +884,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -908,7 +908,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -927,7 +927,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -966,7 +966,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -986,7 +986,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1013,7 +1013,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1039,220 +1039,220 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs index 7fe32ff1..0031a051 100644 --- a/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs +++ b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -594,7 +594,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -612,7 +612,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -630,7 +630,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -704,7 +704,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -724,7 +724,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -742,7 +742,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -760,7 +760,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -787,7 +787,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -815,7 +815,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -833,7 +833,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -859,7 +859,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -884,7 +884,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -928,7 +928,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -986,7 +986,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1006,7 +1006,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1033,7 +1033,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,227 +1059,227 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs b/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs index 5cb6a428..57f29a43 100644 --- a/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs +++ b/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -988,7 +988,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1008,7 +1008,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1035,7 +1035,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1061,7 +1061,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1085,7 +1085,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1107,235 +1107,235 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs b/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs index 1ba8cc51..8a7566bf 100644 --- a/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs +++ b/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -981,7 +981,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1001,7 +1001,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1020,7 +1020,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1040,7 +1040,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1067,7 +1067,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1139,242 +1139,242 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs index a6cdb622..5416fe51 100644 --- a/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs +++ b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -985,7 +985,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1017,7 +1017,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1037,7 +1037,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1056,7 +1056,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1076,7 +1076,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1103,7 +1103,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1129,7 +1129,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1153,7 +1153,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1175,256 +1175,256 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs index 2c60d6c8..8c314a7e 100644 --- a/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs +++ b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -951,7 +951,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -970,7 +970,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -988,7 +988,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1006,7 +1006,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1038,7 +1038,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1058,7 +1058,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1097,7 +1097,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1124,7 +1124,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1150,7 +1150,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1174,7 +1174,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1196,256 +1196,256 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs b/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs index a9836330..8c977e61 100644 --- a/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs +++ b/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -951,7 +951,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -970,7 +970,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1000,7 +1000,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1018,7 +1018,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1036,7 +1036,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1054,7 +1054,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1086,7 +1086,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1106,7 +1106,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1125,7 +1125,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1145,7 +1145,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1172,7 +1172,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1198,7 +1198,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1222,7 +1222,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1244,270 +1244,270 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs index ff8d5d8d..cbce7eaa 100644 --- a/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs +++ b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -574,7 +574,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -598,7 +598,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -616,7 +616,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -634,7 +634,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -708,7 +708,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -728,7 +728,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -746,7 +746,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -764,7 +764,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -819,7 +819,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -837,7 +837,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -863,7 +863,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -888,7 +888,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -908,7 +908,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -932,7 +932,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -953,7 +953,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -972,7 +972,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1002,7 +1002,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1020,7 +1020,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1038,7 +1038,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1056,7 +1056,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1088,7 +1088,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1108,7 +1108,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1174,7 +1174,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1200,7 +1200,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1224,7 +1224,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1246,270 +1246,270 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs index 98eb17ff..4da980d9 100644 --- a/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs +++ b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -120,7 +120,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -178,7 +178,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -228,7 +228,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -248,7 +248,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -268,7 +268,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -291,7 +291,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -309,7 +309,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -346,7 +346,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -394,7 +394,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -497,7 +497,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -515,7 +515,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -620,7 +620,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -730,7 +730,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -750,7 +750,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -768,7 +768,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -786,7 +786,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -813,7 +813,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -841,7 +841,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -859,7 +859,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -885,7 +885,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -910,7 +910,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -954,7 +954,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -975,7 +975,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -994,7 +994,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1024,7 +1024,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1042,7 +1042,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1060,7 +1060,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1078,7 +1078,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1110,7 +1110,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1130,7 +1130,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1149,7 +1149,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1169,7 +1169,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1196,7 +1196,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1222,7 +1222,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1246,7 +1246,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1268,281 +1268,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs b/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs index 3ca47b2c..c3b82dc2 100644 --- a/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs +++ b/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -120,7 +120,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -178,7 +178,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -228,7 +228,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -248,7 +248,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -268,7 +268,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -291,7 +291,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -309,7 +309,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -346,7 +346,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -394,7 +394,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -497,7 +497,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -515,7 +515,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -620,7 +620,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -730,7 +730,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -750,7 +750,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -768,7 +768,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -786,7 +786,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -813,7 +813,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -841,7 +841,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -859,7 +859,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -885,7 +885,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -910,7 +910,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -954,7 +954,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -977,7 +977,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -996,7 +996,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1026,7 +1026,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1044,7 +1044,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1062,7 +1062,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1080,7 +1080,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1112,7 +1112,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1132,7 +1132,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1151,7 +1151,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1171,7 +1171,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1198,7 +1198,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1224,7 +1224,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1248,7 +1248,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1270,281 +1270,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs b/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs index b46dd601..31a1d795 100644 --- a/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs +++ b/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -181,7 +181,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -207,7 +207,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -231,7 +231,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -251,7 +251,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -271,7 +271,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -331,7 +331,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -349,7 +349,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -397,7 +397,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -418,7 +418,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -436,7 +436,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -458,7 +458,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -476,7 +476,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -500,7 +500,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -518,7 +518,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -599,7 +599,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -623,7 +623,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -641,7 +641,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -659,7 +659,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -733,7 +733,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -753,7 +753,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -771,7 +771,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -816,7 +816,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -844,7 +844,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -862,7 +862,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -888,7 +888,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -913,7 +913,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -933,7 +933,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -957,7 +957,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -980,7 +980,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -999,7 +999,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1029,7 +1029,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1047,7 +1047,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1065,7 +1065,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1083,7 +1083,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1135,7 +1135,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1154,7 +1154,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1174,7 +1174,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1201,7 +1201,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1227,7 +1227,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1273,281 +1273,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs index 4a11493b..7925b10b 100644 --- a/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs +++ b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -209,7 +209,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -233,7 +233,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -253,7 +253,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -351,7 +351,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -420,7 +420,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -438,7 +438,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -460,7 +460,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -502,7 +502,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -603,7 +603,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -627,7 +627,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -645,7 +645,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -663,7 +663,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -737,7 +737,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -757,7 +757,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -775,7 +775,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -793,7 +793,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -820,7 +820,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -866,7 +866,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -892,7 +892,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -917,7 +917,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -937,7 +937,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -961,7 +961,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -984,7 +984,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1003,7 +1003,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1033,7 +1033,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1051,7 +1051,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1069,7 +1069,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1087,7 +1087,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1119,7 +1119,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1139,7 +1139,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1158,7 +1158,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1178,7 +1178,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1205,7 +1205,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1231,7 +1231,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1255,7 +1255,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1277,281 +1277,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs index c4ebb7cc..90c9c0a5 100644 --- a/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs +++ b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -209,7 +209,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -233,7 +233,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -253,7 +253,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -351,7 +351,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -420,7 +420,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -438,7 +438,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -460,7 +460,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -502,7 +502,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -605,7 +605,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -629,7 +629,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -647,7 +647,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -759,7 +759,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -777,7 +777,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -795,7 +795,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -822,7 +822,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -850,7 +850,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -868,7 +868,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -919,7 +919,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -939,7 +939,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -963,7 +963,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -986,7 +986,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1005,7 +1005,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1035,7 +1035,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1053,7 +1053,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1071,7 +1071,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1089,7 +1089,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1121,7 +1121,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1141,7 +1141,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1160,7 +1160,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1180,7 +1180,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1233,7 +1233,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1257,7 +1257,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1279,281 +1279,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs index c97b4d1c..85b4f59b 100644 --- a/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs +++ b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -209,7 +209,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -233,7 +233,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -253,7 +253,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -351,7 +351,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -420,7 +420,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -438,7 +438,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -460,7 +460,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -502,7 +502,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -605,7 +605,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -631,7 +631,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -649,7 +649,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -667,7 +667,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -741,7 +741,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -761,7 +761,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -779,7 +779,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -797,7 +797,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -824,7 +824,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -852,7 +852,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -870,7 +870,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -896,7 +896,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -921,7 +921,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -941,7 +941,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -965,7 +965,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -988,7 +988,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1007,7 +1007,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1037,7 +1037,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1055,7 +1055,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1073,7 +1073,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1091,7 +1091,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1123,7 +1123,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1143,7 +1143,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1162,7 +1162,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1182,7 +1182,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1209,7 +1209,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1235,7 +1235,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1259,7 +1259,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1281,281 +1281,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs index c007c907..ccedbe5a 100644 --- a/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs +++ b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -185,7 +185,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -211,7 +211,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -235,7 +235,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -255,7 +255,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -275,7 +275,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -298,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -316,7 +316,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -335,7 +335,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -353,7 +353,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -379,7 +379,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -401,7 +401,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -440,7 +440,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -462,7 +462,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -480,7 +480,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -504,7 +504,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -522,7 +522,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -607,7 +607,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -633,7 +633,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -651,7 +651,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -669,7 +669,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -743,7 +743,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -781,7 +781,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -799,7 +799,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -826,7 +826,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -854,7 +854,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -872,7 +872,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -898,7 +898,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -990,7 +990,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1009,7 +1009,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1039,7 +1039,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1057,7 +1057,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1075,7 +1075,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1125,7 +1125,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1145,7 +1145,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1164,7 +1164,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1184,7 +1184,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1211,7 +1211,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1237,7 +1237,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1261,7 +1261,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1283,281 +1283,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs b/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs index 57e8960b..85ab2f4e 100644 --- a/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs +++ b/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -828,7 +828,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -856,7 +856,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -925,7 +925,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -992,7 +992,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1011,7 +1011,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1041,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1166,7 +1166,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1186,7 +1186,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1213,7 +1213,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1239,7 +1239,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1263,7 +1263,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1285,281 +1285,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs b/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs index a1621e42..2ffa1bf9 100644 --- a/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs +++ b/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -828,7 +828,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -856,7 +856,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -925,7 +925,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -992,7 +992,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1011,7 +1011,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1041,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1148,7 +1148,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1168,7 +1168,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1187,7 +1187,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1234,7 +1234,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1260,7 +1260,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1284,7 +1284,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1306,289 +1306,289 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs index 222865ec..aa3880e6 100644 --- a/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs +++ b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -828,7 +828,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -856,7 +856,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -925,7 +925,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -992,7 +992,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1011,7 +1011,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1041,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1172,7 +1172,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1192,7 +1192,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1231,7 +1231,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1278,7 +1278,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1304,7 +1304,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1328,7 +1328,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1350,303 +1350,303 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs index 918bf926..205632ba 100644 --- a/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs +++ b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -819,7 +819,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -846,7 +846,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -892,7 +892,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -918,7 +918,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -963,7 +963,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -987,7 +987,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1010,7 +1010,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1029,7 +1029,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1113,7 +1113,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1145,7 +1145,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1165,7 +1165,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1190,7 +1190,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1210,7 +1210,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1230,7 +1230,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1249,7 +1249,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1269,7 +1269,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1296,7 +1296,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1322,7 +1322,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1346,7 +1346,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1368,310 +1368,310 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs b/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs index df888de6..87e8e223 100644 --- a/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs +++ b/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -405,7 +405,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -444,7 +444,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -466,7 +466,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -484,7 +484,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -637,7 +637,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -655,7 +655,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -673,7 +673,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -747,7 +747,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -767,7 +767,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -785,7 +785,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -803,7 +803,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -821,7 +821,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -876,7 +876,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -920,7 +920,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -965,7 +965,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -989,7 +989,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1012,7 +1012,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1031,7 +1031,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1061,7 +1061,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1079,7 +1079,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1097,7 +1097,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1167,7 +1167,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1192,7 +1192,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1232,7 +1232,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1271,7 +1271,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1298,7 +1298,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1324,7 +1324,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1348,7 +1348,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1370,310 +1370,310 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs b/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs index c76dcc33..a9b85a2b 100644 --- a/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs +++ b/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -405,7 +405,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -444,7 +444,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -466,7 +466,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -484,7 +484,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -637,7 +637,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -655,7 +655,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -673,7 +673,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -747,7 +747,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -767,7 +767,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -785,7 +785,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -803,7 +803,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -821,7 +821,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -876,7 +876,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -920,7 +920,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -965,7 +965,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -989,7 +989,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1012,7 +1012,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1031,7 +1031,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1061,7 +1061,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1079,7 +1079,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1097,7 +1097,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1167,7 +1167,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1192,7 +1192,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1232,7 +1232,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1271,7 +1271,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1298,7 +1298,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1320,7 +1320,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1346,7 +1346,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1370,7 +1370,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1392,317 +1392,317 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs index fcab240e..4c4201c0 100644 --- a/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs +++ b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -189,7 +189,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -215,7 +215,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -239,7 +239,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -259,7 +259,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -279,7 +279,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -302,7 +302,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -320,7 +320,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -339,7 +339,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -357,7 +357,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -428,7 +428,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -446,7 +446,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -468,7 +468,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -486,7 +486,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -510,7 +510,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -528,7 +528,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -613,7 +613,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -639,7 +639,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -657,7 +657,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -675,7 +675,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -749,7 +749,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -769,7 +769,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -787,7 +787,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -805,7 +805,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -823,7 +823,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -850,7 +850,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -878,7 +878,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -896,7 +896,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -922,7 +922,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -991,7 +991,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1014,7 +1014,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1033,7 +1033,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1063,7 +1063,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1081,7 +1081,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1099,7 +1099,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1149,7 +1149,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1169,7 +1169,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1194,7 +1194,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1214,7 +1214,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1234,7 +1234,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1253,7 +1253,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1273,7 +1273,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1300,7 +1300,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1322,7 +1322,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1348,7 +1348,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1372,7 +1372,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1394,317 +1394,317 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs index 6b324c08..b6d86975 100644 --- a/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs +++ b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -503,7 +503,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -521,7 +521,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -541,7 +541,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -563,7 +563,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -581,7 +581,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -605,7 +605,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -623,7 +623,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -708,7 +708,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -734,7 +734,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -752,7 +752,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -770,7 +770,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -844,7 +844,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -864,7 +864,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -882,7 +882,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -918,7 +918,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -973,7 +973,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -991,7 +991,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1017,7 +1017,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1042,7 +1042,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1062,7 +1062,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1086,7 +1086,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1109,7 +1109,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1128,7 +1128,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1158,7 +1158,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1176,7 +1176,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1194,7 +1194,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1244,7 +1244,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1264,7 +1264,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1289,7 +1289,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1309,7 +1309,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1329,7 +1329,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1348,7 +1348,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1377,7 +1377,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1397,7 +1397,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1424,7 +1424,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1446,7 +1446,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1472,7 +1472,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1496,7 +1496,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1518,7 +1518,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1540,7 +1540,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1563,381 +1563,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs index e5c805df..6918f1a1 100644 --- a/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs +++ b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -484,7 +484,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -505,7 +505,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -523,7 +523,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -543,7 +543,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -565,7 +565,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -583,7 +583,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -607,7 +607,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -625,7 +625,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -710,7 +710,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -754,7 +754,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -772,7 +772,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -846,7 +846,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -866,7 +866,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -884,7 +884,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -902,7 +902,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -920,7 +920,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -975,7 +975,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -993,7 +993,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1019,7 +1019,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1044,7 +1044,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1064,7 +1064,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1088,7 +1088,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1111,7 +1111,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1130,7 +1130,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1160,7 +1160,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1178,7 +1178,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1196,7 +1196,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1214,7 +1214,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1246,7 +1246,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1266,7 +1266,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1291,7 +1291,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1311,7 +1311,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1331,7 +1331,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1350,7 +1350,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1379,7 +1379,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1399,7 +1399,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1426,7 +1426,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1448,7 +1448,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1474,7 +1474,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1498,7 +1498,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1520,7 +1520,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1542,7 +1542,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1565,381 +1565,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs b/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs index 6764dd56..2780805f 100644 --- a/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs +++ b/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -486,7 +486,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -507,7 +507,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -525,7 +525,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -545,7 +545,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -567,7 +567,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -585,7 +585,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -627,7 +627,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -712,7 +712,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -738,7 +738,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -756,7 +756,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -774,7 +774,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -868,7 +868,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -922,7 +922,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -977,7 +977,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -995,7 +995,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1021,7 +1021,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1046,7 +1046,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1066,7 +1066,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1090,7 +1090,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1113,7 +1113,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1132,7 +1132,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1162,7 +1162,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1180,7 +1180,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1198,7 +1198,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1216,7 +1216,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1248,7 +1248,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1268,7 +1268,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1293,7 +1293,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1313,7 +1313,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1333,7 +1333,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1352,7 +1352,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1381,7 +1381,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1401,7 +1401,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1428,7 +1428,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1450,7 +1450,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1476,7 +1476,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1500,7 +1500,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1522,7 +1522,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1544,7 +1544,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1567,381 +1567,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs b/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs index d7b4c4d9..d43b815a 100644 --- a/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs +++ b/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -488,7 +488,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -509,7 +509,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -527,7 +527,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -547,7 +547,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -569,7 +569,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -587,7 +587,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -629,7 +629,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -714,7 +714,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -740,7 +740,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -758,7 +758,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -776,7 +776,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -850,7 +850,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -870,7 +870,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -888,7 +888,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -924,7 +924,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -951,7 +951,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -979,7 +979,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -997,7 +997,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1023,7 +1023,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1048,7 +1048,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1068,7 +1068,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1092,7 +1092,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1134,7 +1134,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1164,7 +1164,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1182,7 +1182,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1200,7 +1200,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1218,7 +1218,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1250,7 +1250,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1270,7 +1270,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1295,7 +1295,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1315,7 +1315,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1335,7 +1335,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1354,7 +1354,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1383,7 +1383,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1403,7 +1403,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1430,7 +1430,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1452,7 +1452,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1478,7 +1478,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1502,7 +1502,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1524,7 +1524,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1546,7 +1546,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1569,381 +1569,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs b/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs index 86ee94cc..41a76330 100644 --- a/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs +++ b/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs @@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; using System; namespace NadekoBot.Migrations @@ -21,7 +21,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -44,7 +44,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -62,7 +62,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -85,7 +85,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -105,7 +105,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -127,7 +127,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -201,7 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -227,7 +227,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -251,7 +251,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -264,7 +264,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -308,7 +308,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -371,7 +371,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -389,7 +389,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -408,7 +408,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -454,7 +454,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -492,7 +492,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -513,7 +513,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -531,7 +531,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -551,7 +551,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("FeedSub"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -594,7 +594,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -612,7 +612,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -636,7 +636,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -654,7 +654,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -875,7 +875,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -895,7 +895,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -913,7 +913,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -931,7 +931,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -976,7 +976,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1004,7 +1004,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1022,7 +1022,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1048,7 +1048,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1073,7 +1073,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1140,7 +1140,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1159,7 +1159,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1189,7 +1189,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1225,7 +1225,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1243,7 +1243,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1275,7 +1275,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1295,7 +1295,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1320,7 +1320,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1340,7 +1340,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1360,7 +1360,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1379,7 +1379,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1408,7 +1408,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1428,7 +1428,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1455,7 +1455,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1477,7 +1477,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1503,7 +1503,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1527,7 +1527,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1549,7 +1549,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1571,7 +1571,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1594,389 +1594,389 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithMany("FeedSubs") .HasForeignKey("GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 diff --git a/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs index 79e0e678..2941d0d6 100644 --- a/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs +++ b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs @@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; using System; namespace NadekoBot.Migrations @@ -21,7 +21,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -44,7 +44,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -62,7 +62,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -85,7 +85,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -105,7 +105,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -127,7 +127,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -201,7 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -227,7 +227,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -251,7 +251,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -264,7 +264,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -308,7 +308,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -371,7 +371,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -389,7 +389,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -408,7 +408,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -454,7 +454,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -492,7 +492,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -513,7 +513,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -531,7 +531,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -551,7 +551,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("FeedSub"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -594,7 +594,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -612,7 +612,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -636,7 +636,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -654,7 +654,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -875,7 +875,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -895,7 +895,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -913,7 +913,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -931,7 +931,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -976,7 +976,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1004,7 +1004,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1022,7 +1022,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1048,7 +1048,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1073,7 +1073,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1140,7 +1140,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1159,7 +1159,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1189,7 +1189,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1225,7 +1225,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1243,7 +1243,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1275,7 +1275,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1295,7 +1295,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1320,7 +1320,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1340,7 +1340,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1360,7 +1360,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1379,7 +1379,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1408,7 +1408,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1428,7 +1428,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1455,7 +1455,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1477,7 +1477,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1503,7 +1503,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1527,7 +1527,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1549,7 +1549,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1570,7 +1570,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1593,390 +1593,390 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithMany("FeedSubs") .HasForeignKey("GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings", "XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 diff --git a/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs index dee868e0..5de0bc1b 100644 --- a/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; using System; namespace NadekoBot.Migrations @@ -20,7 +20,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -43,7 +43,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -61,7 +61,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -84,7 +84,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -104,7 +104,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -126,7 +126,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -200,7 +200,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -250,7 +250,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -263,7 +263,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -276,7 +276,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -307,7 +307,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -327,7 +327,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -347,7 +347,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -370,7 +370,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -388,7 +388,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -425,7 +425,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -453,7 +453,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -512,7 +512,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -530,7 +530,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -550,7 +550,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -571,7 +571,7 @@ namespace NadekoBot.Migrations b.ToTable("FeedSub"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -593,7 +593,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -738,7 +738,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -764,7 +764,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -782,7 +782,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -800,7 +800,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -912,7 +912,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -948,7 +948,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -975,7 +975,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1003,7 +1003,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1021,7 +1021,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1047,7 +1047,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1072,7 +1072,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1092,7 +1092,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1116,7 +1116,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1139,7 +1139,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1158,7 +1158,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1188,7 +1188,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1206,7 +1206,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1224,7 +1224,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1242,7 +1242,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1274,7 +1274,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1294,7 +1294,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1319,7 +1319,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1339,7 +1339,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1359,7 +1359,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1378,7 +1378,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1407,7 +1407,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1427,7 +1427,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1454,7 +1454,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1476,7 +1476,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1502,7 +1502,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1526,7 +1526,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1548,7 +1548,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1569,7 +1569,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1592,390 +1592,390 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithMany("FeedSubs") .HasForeignKey("GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings", "XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 diff --git a/NadekoBot.Core/Modules/Administration/Administration.cs b/NadekoBot.Core/Modules/Administration/Administration.cs index 5c943b27..9f3c92c9 100644 --- a/NadekoBot.Core/Modules/Administration/Administration.cs +++ b/NadekoBot.Core/Modules/Administration/Administration.cs @@ -6,9 +6,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Modules.Administration.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration { diff --git a/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs b/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs index 54d2e244..81e1a8d7 100644 --- a/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs b/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs index 6c1a5dea..18ca4d47 100644 --- a/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs +++ b/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs @@ -1,7 +1,7 @@ using System.Collections.Concurrent; using Discord; using NadekoBot.Common.Collections; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration.Common { diff --git a/NadekoBot.Core/Modules/Administration/DangerousCommands.cs b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs index fddeda5e..f61a3525 100644 --- a/NadekoBot.Core/Modules/Administration/DangerousCommands.cs +++ b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; diff --git a/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs b/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs index 647874a6..81ad7396 100644 --- a/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs +++ b/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs @@ -1,6 +1,6 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Administration.Services; diff --git a/NadekoBot.Core/Modules/Administration/LogCommands.cs b/NadekoBot.Core/Modules/Administration/LogCommands.cs index c3415246..731809ae 100644 --- a/NadekoBot.Core/Modules/Administration/LogCommands.cs +++ b/NadekoBot.Core/Modules/Administration/LogCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Core/Modules/Administration/MigrationCommands.cs b/NadekoBot.Core/Modules/Administration/MigrationCommands.cs index 5c9b4a70..2e1b2092 100644 --- a/NadekoBot.Core/Modules/Administration/MigrationCommands.cs +++ b/NadekoBot.Core/Modules/Administration/MigrationCommands.cs @@ -4,12 +4,12 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Newtonsoft.Json; using System.Collections.Concurrent; using NadekoBot.Extensions; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; using Microsoft.Data.Sqlite; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; diff --git a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs index ab6ee999..71c3b835 100644 --- a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs @@ -1,12 +1,13 @@ using Discord.Commands; using NadekoBot.Common.Attributes; -using NadekoBot.Core.Modules.Administration.Services; +using NadekoBot.Modules.Administration.Services; using NadekoBot.Extensions; using System; using System.IO; using System.Reflection; using System.Text.RegularExpressions; using System.Threading.Tasks; +using System.Linq; namespace NadekoBot.Modules.Administration { @@ -27,7 +28,13 @@ namespace NadekoBot.Modules.Administration public async Task PackageList() { _service.ReloadAvailablePackages(); - await Context.Channel.SendConfirmAsync(string.Join("\n", _service.Packages)); + await Context.Channel.SendConfirmAsync( + string.Join( + "\n", + _service.Packages + .Select(x => _bot.LoadedPackages.Contains(x) + ? "✅ " + x + : x))); } [NadekoCommand, Usage, Description, Aliases] diff --git a/NadekoBot.Core/Modules/Administration/MuteCommands.cs b/NadekoBot.Core/Modules/Administration/MuteCommands.cs index a8322de4..076bc920 100644 --- a/NadekoBot.Core/Modules/Administration/MuteCommands.cs +++ b/NadekoBot.Core/Modules/Administration/MuteCommands.cs @@ -1,6 +1,6 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs b/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs index 4cccf226..7f852fce 100644 --- a/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs +++ b/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs @@ -1,6 +1,6 @@ using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs b/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs index 6a09692a..d1bc0406 100644 --- a/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs b/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs index 40b37884..d2069e8b 100644 --- a/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs +++ b/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs @@ -2,8 +2,8 @@ using Discord; using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs b/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs index 79e76a1d..7972b7d3 100644 --- a/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Core/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs index 411cd442..dd570b25 100644 --- a/NadekoBot.Core/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -8,8 +8,8 @@ using System.Linq; using System.Net.Http; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Diagnostics; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs b/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs index 0f94e002..d8bac136 100644 --- a/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs index 9a43348a..54142fe3 100644 --- a/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs @@ -5,7 +5,7 @@ using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Collections; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs index 6ea37049..2c87d793 100644 --- a/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs @@ -3,7 +3,7 @@ using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs index 30191c54..12bb7dcb 100644 --- a/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs @@ -5,8 +5,8 @@ using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs index 1f4e44cd..fd542baf 100644 --- a/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs @@ -4,8 +4,8 @@ using System.Collections.Generic; using System.Linq; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration.Services { diff --git a/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs index 2400afc5..cae41488 100644 --- a/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs @@ -8,9 +8,9 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; using NadekoBot.Modules.Administration.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using NadekoBot.Common; diff --git a/NadekoBot.Core/Modules/Administration/Services/MuteService.cs b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs index 917f90e8..d28ad5be 100644 --- a/NadekoBot.Core/Modules/Administration/Services/MuteService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs @@ -9,8 +9,8 @@ using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs b/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs index a28af228..26f6bef0 100644 --- a/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs @@ -1,11 +1,11 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; -namespace NadekoBot.Core.Modules.Administration.Services +namespace NadekoBot.Modules.Administration.Services { public class PackagesService : INService { diff --git a/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs index cdcf05e5..476666ff 100644 --- a/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs @@ -3,8 +3,8 @@ using System.Linq; using System.Threading; using Discord.WebSocket; using NadekoBot.Common.Replacements; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs index 94397ab6..22362a45 100644 --- a/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs @@ -5,8 +5,8 @@ using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Modules.Administration.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/PruneService.cs b/NadekoBot.Core/Modules/Administration/Services/PruneService.cs index 4f25e3c3..b1da3348 100644 --- a/NadekoBot.Core/Modules/Administration/Services/PruneService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PruneService.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Administration.Services { diff --git a/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs index 68bcffe6..68393b01 100644 --- a/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs @@ -8,8 +8,8 @@ using Discord.WebSocket; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; using NadekoBot.Modules.Administration.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/SelfService.cs b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs index 74fe7b2f..11aeb7fa 100644 --- a/NadekoBot.Core/Modules/Administration/Services/SelfService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs @@ -7,8 +7,8 @@ using Discord.WebSocket; using NadekoBot.Common; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs b/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs index 55b886f3..532e3ca3 100644 --- a/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Threading.Tasks; using Discord; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration.Services { diff --git a/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs index 7879f171..01872a9f 100644 --- a/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs @@ -5,8 +5,8 @@ using System.Linq; using System.Threading.Tasks; using Discord; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs index 101e29f8..36d4ba79 100644 --- a/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs @@ -9,9 +9,9 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Administration.Services diff --git a/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs b/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs index fbfd813b..2b70661a 100644 --- a/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs +++ b/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs b/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs index ad0c7feb..0f8940fd 100644 --- a/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs @@ -8,8 +8,8 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Administration.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration { diff --git a/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs b/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs index ee063f8b..26af5560 100644 --- a/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs +++ b/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs b/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs index 4902293f..43b429bb 100644 --- a/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs +++ b/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs @@ -1,8 +1,8 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Discord; using NadekoBot.Extensions; using Discord.WebSocket; diff --git a/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs b/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs index f24effb1..9d6f6f6c 100644 --- a/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs +++ b/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs @@ -4,7 +4,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; using NadekoBot.Modules.CustomReactions.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs b/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs index f45bcb53..08cd3a25 100644 --- a/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs +++ b/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs @@ -1,6 +1,6 @@ using Discord; using Discord.WebSocket; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System.Collections.Concurrent; using System.Linq; @@ -9,12 +9,12 @@ using System.Threading.Tasks; using NadekoBot.Common; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services.Database; -using NadekoBot.Services; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services; using NadekoBot.Modules.CustomReactions.Extensions; using NadekoBot.Modules.Permissions.Common; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using Newtonsoft.Json; namespace NadekoBot.Modules.CustomReactions.Services diff --git a/NadekoBot.Core/Modules/Help/Help.cs b/NadekoBot.Core/Modules/Help/Help.cs index 35a8f32f..b07ea5be 100644 --- a/NadekoBot.Core/Modules/Help/Help.cs +++ b/NadekoBot.Core/Modules/Help/Help.cs @@ -2,7 +2,7 @@ using NadekoBot.Extensions; using System.Linq; using Discord; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using System; using System.IO; diff --git a/NadekoBot.Core/Modules/Help/Services/HelpService.cs b/NadekoBot.Core/Modules/Help/Services/HelpService.cs index 88220154..2de4ccfb 100644 --- a/NadekoBot.Core/Modules/Help/Services/HelpService.cs +++ b/NadekoBot.Core/Modules/Help/Services/HelpService.cs @@ -7,8 +7,8 @@ using NadekoBot.Extensions; using System.Linq; using NadekoBot.Common.Attributes; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Help.Services { diff --git a/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs b/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs index 78cb57ec..43108982 100644 --- a/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; diff --git a/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs b/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs index 5c3fed31..66b68cd5 100644 --- a/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs index fd02a0b3..b8a8c7cb 100644 --- a/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs +++ b/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Common { diff --git a/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs index 977a319a..0ad0c8e5 100644 --- a/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs +++ b/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs @@ -2,7 +2,7 @@ using System.Linq; using Discord; using Discord.WebSocket; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Common { diff --git a/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs index 0f6ab6b9..df2e1759 100644 --- a/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs +++ b/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using NadekoBot.Common.Collections; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Common { diff --git a/NadekoBot.Core/Modules/Permissions/FilterCommands.cs b/NadekoBot.Core/Modules/Permissions/FilterCommands.cs index 22e22c82..e300a5de 100644 --- a/NadekoBot.Core/Modules/Permissions/FilterCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/FilterCommands.cs @@ -3,13 +3,13 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions { diff --git a/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs b/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs index 5c49adf7..0c88199b 100644 --- a/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs @@ -1,13 +1,13 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.TypeReaders; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions { diff --git a/NadekoBot.Core/Modules/Permissions/Permissions.cs b/NadekoBot.Core/Modules/Permissions/Permissions.cs index ce7f6fa9..d9987f16 100644 --- a/NadekoBot.Core/Modules/Permissions/Permissions.cs +++ b/NadekoBot.Core/Modules/Permissions/Permissions.cs @@ -2,9 +2,9 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Discord; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using Discord.WebSocket; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs b/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs index 3c2128dc..f5b17ef9 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs @@ -3,8 +3,8 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Services { diff --git a/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs index 87a3f6dc..f4942863 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs @@ -6,8 +6,8 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Services { diff --git a/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs index d09aa9ba..f0170f6a 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs @@ -8,8 +8,8 @@ using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Permissions.Services diff --git a/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs b/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs index 18d5337f..d8908ccd 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs @@ -4,7 +4,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Permissions.Services { diff --git a/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs b/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs index 9b218758..38435a0d 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; using NadekoBot.Modules.Permissions.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Permissions.Services diff --git a/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs b/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs index 08834b36..fcf5b200 100644 --- a/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Services { diff --git a/NadekoBot.Core/Services/CommandHandler.cs b/NadekoBot.Core/Services/CommandHandler.cs index 6b9e67b8..f7cd4e61 100644 --- a/NadekoBot.Core/Services/CommandHandler.cs +++ b/NadekoBot.Core/Services/CommandHandler.cs @@ -10,14 +10,14 @@ using NadekoBot.Extensions; using System.Collections.Concurrent; using System.Threading; using System.Collections.Immutable; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.IO; using Discord.Net; using NadekoBot.Common; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class GuildUserComparer : IEqualityComparer { diff --git a/NadekoBot.Core/Services/CurrencyService.cs b/NadekoBot.Core/Services/CurrencyService.cs index 5b8fb44f..f94359fc 100644 --- a/NadekoBot.Core/Services/CurrencyService.cs +++ b/NadekoBot.Core/Services/CurrencyService.cs @@ -2,11 +2,11 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Database; -using NadekoBot.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class CurrencyService : INService { diff --git a/NadekoBot.Core/Services/Database/IUnitOfWork.cs b/NadekoBot.Core/Services/Database/IUnitOfWork.cs index 6b97a085..3d47a534 100644 --- a/NadekoBot.Core/Services/Database/IUnitOfWork.cs +++ b/NadekoBot.Core/Services/Database/IUnitOfWork.cs @@ -1,8 +1,8 @@ -using NadekoBot.Services.Database.Repositories; +using NadekoBot.Core.Services.Database.Repositories; using System; using System.Threading.Tasks; -namespace NadekoBot.Services.Database +namespace NadekoBot.Core.Services.Database { public interface IUnitOfWork : IDisposable { diff --git a/NadekoBot.Core/Services/Database/Models/AntiProtection.cs b/NadekoBot.Core/Services/Database/Models/AntiProtection.cs index fbafc9e3..9d6c5d14 100644 --- a/NadekoBot.Core/Services/Database/Models/AntiProtection.cs +++ b/NadekoBot.Core/Services/Database/Models/AntiProtection.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class AntiRaidSetting : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/BotConfig.cs b/NadekoBot.Core/Services/Database/Models/BotConfig.cs index 98b84594..59446747 100644 --- a/NadekoBot.Core/Services/Database/Models/BotConfig.cs +++ b/NadekoBot.Core/Services/Database/Models/BotConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class BotConfig : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/ClashCaller.cs b/NadekoBot.Core/Services/Database/Models/ClashCaller.cs index 88ad4b78..0c43c4bf 100644 --- a/NadekoBot.Core/Services/Database/Models/ClashCaller.cs +++ b/NadekoBot.Core/Services/Database/Models/ClashCaller.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations.Schema; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class ClashCaller : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/ClashWar.cs b/NadekoBot.Core/Services/Database/Models/ClashWar.cs index aa1baca1..2ea851a2 100644 --- a/NadekoBot.Core/Services/Database/Models/ClashWar.cs +++ b/NadekoBot.Core/Services/Database/Models/ClashWar.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class ClashWar : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/ClubInfo.cs b/NadekoBot.Core/Services/Database/Models/ClubInfo.cs index 68f68bc3..e2645c23 100644 --- a/NadekoBot.Core/Services/Database/Models/ClubInfo.cs +++ b/NadekoBot.Core/Services/Database/Models/ClubInfo.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class ClubInfo : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs b/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs index 6adcf2ad..57ec7657 100644 --- a/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs +++ b/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CommandCooldown : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/CommandCost.cs b/NadekoBot.Core/Services/Database/Models/CommandCost.cs index b3a74745..3fc6c6e3 100644 --- a/NadekoBot.Core/Services/Database/Models/CommandCost.cs +++ b/NadekoBot.Core/Services/Database/Models/CommandCost.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CommandCost : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/CommandPrice.cs b/NadekoBot.Core/Services/Database/Models/CommandPrice.cs index 62db2067..5f6ffb14 100644 --- a/NadekoBot.Core/Services/Database/Models/CommandPrice.cs +++ b/NadekoBot.Core/Services/Database/Models/CommandPrice.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CommandPrice : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/ConvertUnit.cs b/NadekoBot.Core/Services/Database/Models/ConvertUnit.cs index f31c4ad3..fed41fc3 100644 --- a/NadekoBot.Core/Services/Database/Models/ConvertUnit.cs +++ b/NadekoBot.Core/Services/Database/Models/ConvertUnit.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class ConvertUnit : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Currency.cs b/NadekoBot.Core/Services/Database/Models/Currency.cs index b86e32e1..c6e62a7f 100644 --- a/NadekoBot.Core/Services/Database/Models/Currency.cs +++ b/NadekoBot.Core/Services/Database/Models/Currency.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Currency : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs b/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs index 243539a3..e9ef93e5 100644 --- a/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs +++ b/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CurrencyTransaction : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/CustomReaction.cs b/NadekoBot.Core/Services/Database/Models/CustomReaction.cs index cd57bc35..4c1399fe 100644 --- a/NadekoBot.Core/Services/Database/Models/CustomReaction.cs +++ b/NadekoBot.Core/Services/Database/Models/CustomReaction.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Text.RegularExpressions; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CustomReaction : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/DbEntity.cs b/NadekoBot.Core/Services/Database/Models/DbEntity.cs index e727851c..47f68831 100644 --- a/NadekoBot.Core/Services/Database/Models/DbEntity.cs +++ b/NadekoBot.Core/Services/Database/Models/DbEntity.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/DiscordUser.cs b/NadekoBot.Core/Services/Database/Models/DiscordUser.cs index 654408e2..48d2ef40 100644 --- a/NadekoBot.Core/Services/Database/Models/DiscordUser.cs +++ b/NadekoBot.Core/Services/Database/Models/DiscordUser.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class DiscordUser : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Donator.cs b/NadekoBot.Core/Services/Database/Models/Donator.cs index da5cd390..16a100d3 100644 --- a/NadekoBot.Core/Services/Database/Models/Donator.cs +++ b/NadekoBot.Core/Services/Database/Models/Donator.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Donator : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/FeedSub.cs b/NadekoBot.Core/Services/Database/Models/FeedSub.cs index aabf455e..a20d4918 100644 --- a/NadekoBot.Core/Services/Database/Models/FeedSub.cs +++ b/NadekoBot.Core/Services/Database/Models/FeedSub.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class FeedSub : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/FollowedStream.cs b/NadekoBot.Core/Services/Database/Models/FollowedStream.cs index b49bc430..57273418 100644 --- a/NadekoBot.Core/Services/Database/Models/FollowedStream.cs +++ b/NadekoBot.Core/Services/Database/Models/FollowedStream.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class FollowedStream : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/GuildConfig.cs b/NadekoBot.Core/Services/Database/Models/GuildConfig.cs index 501b9a64..cd2c9b14 100644 --- a/NadekoBot.Core/Services/Database/Models/GuildConfig.cs +++ b/NadekoBot.Core/Services/Database/Models/GuildConfig.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class GuildConfig : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs b/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs index 40198c7f..753b8969 100644 --- a/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs +++ b/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class IgnoredLogChannel : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/LoadedPackage.cs b/NadekoBot.Core/Services/Database/Models/LoadedPackage.cs new file mode 100644 index 00000000..4de54ebe --- /dev/null +++ b/NadekoBot.Core/Services/Database/Models/LoadedPackage.cs @@ -0,0 +1,19 @@ +namespace NadekoBot.Core.Services.Database.Models +{ + public class LoadedPackage : DbEntity + { + public string Name { get; set; } + + public override bool Equals(object obj) + { + return obj is LoadedPackage p + ? p.Name == Name + : false; + } + + public override int GetHashCode() + { + return Name.GetHashCode(); + } + } +} diff --git a/NadekoBot.Core/Services/Database/Models/LogSetting.cs b/NadekoBot.Core/Services/Database/Models/LogSetting.cs index 659df55c..16255964 100644 --- a/NadekoBot.Core/Services/Database/Models/LogSetting.cs +++ b/NadekoBot.Core/Services/Database/Models/LogSetting.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class LogSetting : DbEntity diff --git a/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs b/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs index 9788f033..b514d1f0 100644 --- a/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs +++ b/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class MusicPlaylist : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Permission.cs b/NadekoBot.Core/Services/Database/Models/Permission.cs index fe692221..ddbd0cc8 100644 --- a/NadekoBot.Core/Services/Database/Models/Permission.cs +++ b/NadekoBot.Core/Services/Database/Models/Permission.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Diagnostics; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { [DebuggerDisplay("{global::NadekoBot.Modules.Permissions.PermissionExtensions.GetCommand(this)}", Target = typeof(Permission))] public class Permission : DbEntity diff --git a/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs b/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs index f938d242..eadc3dca 100644 --- a/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs +++ b/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class PlaylistSong : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/PokeType.cs b/NadekoBot.Core/Services/Database/Models/PokeType.cs index d4956c96..c0487406 100644 --- a/NadekoBot.Core/Services/Database/Models/PokeType.cs +++ b/NadekoBot.Core/Services/Database/Models/PokeType.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class UserPokeTypes : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Quote.cs b/NadekoBot.Core/Services/Database/Models/Quote.cs index f8a3e308..3f04823f 100644 --- a/NadekoBot.Core/Services/Database/Models/Quote.cs +++ b/NadekoBot.Core/Services/Database/Models/Quote.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Quote : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Reminder.cs b/NadekoBot.Core/Services/Database/Models/Reminder.cs index 63600de9..013fdd24 100644 --- a/NadekoBot.Core/Services/Database/Models/Reminder.cs +++ b/NadekoBot.Core/Services/Database/Models/Reminder.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Reminder : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Repeater.cs b/NadekoBot.Core/Services/Database/Models/Repeater.cs index c30c1b87..4bea35d4 100644 --- a/NadekoBot.Core/Services/Database/Models/Repeater.cs +++ b/NadekoBot.Core/Services/Database/Models/Repeater.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Repeater : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/RewardedUser.cs b/NadekoBot.Core/Services/Database/Models/RewardedUser.cs index f40e083f..f2751b4b 100644 --- a/NadekoBot.Core/Services/Database/Models/RewardedUser.cs +++ b/NadekoBot.Core/Services/Database/Models/RewardedUser.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class RewardedUser : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs b/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs index 93e70223..bc1eeec4 100644 --- a/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs +++ b/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class SelfAssignedRole : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/ShopEntry.cs b/NadekoBot.Core/Services/Database/Models/ShopEntry.cs index aaedbe00..d00dcaa9 100644 --- a/NadekoBot.Core/Services/Database/Models/ShopEntry.cs +++ b/NadekoBot.Core/Services/Database/Models/ShopEntry.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public enum ShopEntryType { diff --git a/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs b/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs index 8ef5b690..51dd051d 100644 --- a/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs +++ b/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class StreamRoleSettings : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/UserXpStats.cs b/NadekoBot.Core/Services/Database/Models/UserXpStats.cs index 8695298e..ea2e78fd 100644 --- a/NadekoBot.Core/Services/Database/Models/UserXpStats.cs +++ b/NadekoBot.Core/Services/Database/Models/UserXpStats.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class UserXpStats : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs b/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs index 75bced37..23b347d1 100644 --- a/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs +++ b/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class IgnoredVoicePresenceChannel : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Waifu.cs b/NadekoBot.Core/Services/Database/Models/Waifu.cs index 5be73b46..5f90c12c 100644 --- a/NadekoBot.Core/Services/Database/Models/Waifu.cs +++ b/NadekoBot.Core/Services/Database/Models/Waifu.cs @@ -1,7 +1,7 @@ using NadekoBot.Extensions; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class WaifuInfo : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/WaifuItem.cs b/NadekoBot.Core/Services/Database/Models/WaifuItem.cs index 2184391f..b203f5fb 100644 --- a/NadekoBot.Core/Services/Database/Models/WaifuItem.cs +++ b/NadekoBot.Core/Services/Database/Models/WaifuItem.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class WaifuItem : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs b/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs index 2722900a..bfb23515 100644 --- a/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs +++ b/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class WaifuUpdate : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/Warning.cs b/NadekoBot.Core/Services/Database/Models/Warning.cs index e5c8f4ff..94ab616a 100644 --- a/NadekoBot.Core/Services/Database/Models/Warning.cs +++ b/NadekoBot.Core/Services/Database/Models/Warning.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Warning : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/XpSettings.cs b/NadekoBot.Core/Services/Database/Models/XpSettings.cs index fcc67fff..ca04d36b 100644 --- a/NadekoBot.Core/Services/Database/Models/XpSettings.cs +++ b/NadekoBot.Core/Services/Database/Models/XpSettings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class XpSettings : DbEntity { diff --git a/NadekoBot.Core/Services/Database/NadekoContext.cs b/NadekoBot.Core/Services/Database/NadekoContext.cs index 5e284eac..53c89b20 100644 --- a/NadekoBot.Core/Services/Database/NadekoContext.cs +++ b/NadekoBot.Core/Services/Database/NadekoContext.cs @@ -1,14 +1,15 @@ using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NadekoBot.Extensions; using System; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Data.Sqlite; using System.IO; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database +namespace NadekoBot.Core.Services.Database { public class NadekoContextFactory : IDesignTimeDbContextFactory { @@ -42,6 +43,7 @@ namespace NadekoBot.Services.Database public DbSet Warnings { get; set; } public DbSet UserXpStats { get; set; } public DbSet Clubs { get; set; } + public DbSet LoadedPackages { get; set; } //logging public DbSet LogSettings { get; set; } diff --git a/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs index 7a2adf63..507f041f 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IBotConfigRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs index 14edcea8..4c44f908 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IClashOfClansRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs index 66ad3d92..5b00dcef 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IClubRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs index a59d8233..51f35cf0 100644 --- a/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface ICurrencyRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs index dd583ed9..4efa1ba3 100644 --- a/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface ICurrencyTransactionsRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs index 83d10990..034a93eb 100644 --- a/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface ICustomReactionRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs index fb9360b7..78dce1ec 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs @@ -1,7 +1,7 @@ using Discord; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IDiscordUserRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs index d0cfd699..4a7731cf 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IDonatorsRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs index 498b72ed..0444a252 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs @@ -1,10 +1,10 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IGuildConfigRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs index d14b27c2..bcb15f26 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IMusicPlaylistRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs index af9b003b..7af017c6 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IPokeGameRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs index 2cd1cdbe..4781ca7f 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs @@ -1,8 +1,8 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Threading.Tasks; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IQuoteRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs index dc757dbc..f5823aac 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IReminderRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IRepository.cs index d66aae87..30ec2a05 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IRepository where T : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs index 249ece0a..c33a84c8 100644 --- a/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface ISelfAssignedRolesRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IUnitConverterRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IUnitConverterRepository.cs index 527f0de1..f6fa5faa 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IUnitConverterRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IUnitConverterRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IUnitConverterRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs index 50295897..0c90612e 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IWaifuRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs index f8c8296e..63320b1a 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IWarningsRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs index f62394d7..f19ba8be 100644 --- a/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IXpRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs index c21b1ff2..7d2f6e92 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using System; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class BotConfigRepository : Repository, IBotConfigRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs index 828c4bce..9336b814 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class ClashOfClansRepository : Repository, IClashOfClansRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs index 8caa1838..9da05925 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using System; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class ClubRepository : Repository, IClubRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs index 6f397789..e21c63a1 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class CurrencyRepository : Repository, ICurrencyRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs index 85a23a47..cb49e10c 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class CurrencyTransactionsRepository : Repository, ICurrencyTransactionsRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs index f9b7c819..51b304f3 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class CustomReactionsRepository : Repository, ICustomReactionRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs index 933d583b..9aab7144 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using Discord; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class DiscordUserRepository : Repository, IDiscordUserRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs index b5c8c269..03e322bc 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class DonatorsRepository : Repository, IDonatorsRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs index eac42399..63e8a314 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs @@ -1,10 +1,10 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; using System; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class GuildConfigRepository : Repository, IGuildConfigRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs index 50347593..3f11b2d5 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs @@ -1,10 +1,10 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class MusicPlaylistRepository : Repository, IMusicPlaylistRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs index 06662b06..ab5130ef 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class PokeGameRepository : Repository, IPokeGameRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs index 00db27b0..132d4192 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NadekoBot.Extensions; using System; using System.Collections.Generic; @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using NadekoBot.Common; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class QuoteRepository : Repository, IQuoteRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs index e29cc3f2..39b13363 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class ReminderRepository : Repository, IReminderRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs index b90cf154..0b44801f 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class Repository : IRepository where T : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs index d17dac7d..2d07de2e 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class SelfAssignedRolesRepository : Repository, ISelfAssignedRolesRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs index 2e3caa50..4bd09f48 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class UnitConverterRepository : Repository, IUnitConverterRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs index f08473b6..07fa3660 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs @@ -1,10 +1,10 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class WaifuRepository : Repository, IWaifuRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs index cb2cc089..e427627c 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Linq; using System.Threading.Tasks; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class WarningsRepository : Repository, IWarningsRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs index 90160da1..96788d13 100644 --- a/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs @@ -1,8 +1,8 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class XpRepository : Repository, IXpRepository { diff --git a/NadekoBot.Core/Services/Database/UnitOfWork.cs b/NadekoBot.Core/Services/Database/UnitOfWork.cs index 27a43b13..a6668a1a 100644 --- a/NadekoBot.Core/Services/Database/UnitOfWork.cs +++ b/NadekoBot.Core/Services/Database/UnitOfWork.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Repositories; -using NadekoBot.Services.Database.Repositories.Impl; +using NadekoBot.Core.Services.Database.Repositories; +using NadekoBot.Core.Services.Database.Repositories.Impl; using System; using System.Threading.Tasks; -namespace NadekoBot.Services.Database +namespace NadekoBot.Core.Services.Database { public class UnitOfWork : IUnitOfWork { diff --git a/NadekoBot.Core/Services/DbService.cs b/NadekoBot.Core/Services/DbService.cs index 56c6940a..737cdce2 100644 --- a/NadekoBot.Core/Services/DbService.cs +++ b/NadekoBot.Core/Services/DbService.cs @@ -1,11 +1,11 @@ using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; using System; using System.IO; using System.Linq; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class DbService { diff --git a/NadekoBot.Core/Services/GreetSettingsService.cs b/NadekoBot.Core/Services/GreetSettingsService.cs index dc73c978..b25e8785 100644 --- a/NadekoBot.Core/Services/GreetSettingsService.cs +++ b/NadekoBot.Core/Services/GreetSettingsService.cs @@ -1,7 +1,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System; using System.Collections.Concurrent; @@ -11,7 +11,7 @@ using System.Threading.Tasks; using NadekoBot.Common; using NadekoBot.Common.Replacements; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class GreetSettingsService : INService { diff --git a/NadekoBot.Core/Services/IBotConfigProvider.cs b/NadekoBot.Core/Services/IBotConfigProvider.cs index 6ef54970..b93b958b 100644 --- a/NadekoBot.Core/Services/IBotConfigProvider.cs +++ b/NadekoBot.Core/Services/IBotConfigProvider.cs @@ -1,7 +1,7 @@ using NadekoBot.Common; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IBotConfigProvider { diff --git a/NadekoBot.Core/Services/IBotCredentials.cs b/NadekoBot.Core/Services/IBotCredentials.cs index 3ee15942..af8cfe5e 100644 --- a/NadekoBot.Core/Services/IBotCredentials.cs +++ b/NadekoBot.Core/Services/IBotCredentials.cs @@ -1,7 +1,7 @@ using Discord; using System.Collections.Immutable; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IBotCredentials { diff --git a/NadekoBot.Core/Services/IDataCache.cs b/NadekoBot.Core/Services/IDataCache.cs index 3be7ad35..6dc9fea4 100644 --- a/NadekoBot.Core/Services/IDataCache.cs +++ b/NadekoBot.Core/Services/IDataCache.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IDataCache { diff --git a/NadekoBot.Core/Services/IGoogleApiService.cs b/NadekoBot.Core/Services/IGoogleApiService.cs index 758a7d0f..90b2cc11 100644 --- a/NadekoBot.Core/Services/IGoogleApiService.cs +++ b/NadekoBot.Core/Services/IGoogleApiService.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IGoogleApiService : INService { diff --git a/NadekoBot.Core/Services/IImagesService.cs b/NadekoBot.Core/Services/IImagesService.cs index 0b2b94f2..53458808 100644 --- a/NadekoBot.Core/Services/IImagesService.cs +++ b/NadekoBot.Core/Services/IImagesService.cs @@ -1,6 +1,6 @@ using System.Collections.Immutable; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IImagesService : INService { diff --git a/NadekoBot.Core/Services/ILocalization.cs b/NadekoBot.Core/Services/ILocalization.cs index c3cfbe94..9e5ae3ba 100644 --- a/NadekoBot.Core/Services/ILocalization.cs +++ b/NadekoBot.Core/Services/ILocalization.cs @@ -2,7 +2,7 @@ using System.Globalization; using Discord; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface ILocalization : INService { diff --git a/NadekoBot.Core/Services/INService.cs b/NadekoBot.Core/Services/INService.cs index ba4d29c4..832ecba7 100644 --- a/NadekoBot.Core/Services/INService.cs +++ b/NadekoBot.Core/Services/INService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { /// /// All services must implement this interface in order to be auto-discovered by the DI system diff --git a/NadekoBot.Core/Services/IStatsService.cs b/NadekoBot.Core/Services/IStatsService.cs index 12e8f911..b591ba92 100644 --- a/NadekoBot.Core/Services/IStatsService.cs +++ b/NadekoBot.Core/Services/IStatsService.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IStatsService : INService { diff --git a/NadekoBot.Core/Services/Impl/BotConfigProvider.cs b/NadekoBot.Core/Services/Impl/BotConfigProvider.cs index 2d293401..1b707312 100644 --- a/NadekoBot.Core/Services/Impl/BotConfigProvider.cs +++ b/NadekoBot.Core/Services/Impl/BotConfigProvider.cs @@ -1,9 +1,9 @@ using System; using NadekoBot.Common; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class BotConfigProvider : IBotConfigProvider { diff --git a/NadekoBot.Core/Services/Impl/BotCredentials.cs b/NadekoBot.Core/Services/Impl/BotCredentials.cs index bc43354a..b7176b47 100644 --- a/NadekoBot.Core/Services/Impl/BotCredentials.cs +++ b/NadekoBot.Core/Services/Impl/BotCredentials.cs @@ -8,7 +8,7 @@ using Microsoft.Extensions.Configuration; using System.Collections.Immutable; using NadekoBot.Common; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class BotCredentials : IBotCredentials { diff --git a/NadekoBot.Core/Services/Impl/GoogleApiService.cs b/NadekoBot.Core/Services/Impl/GoogleApiService.cs index 45727fba..0721caba 100644 --- a/NadekoBot.Core/Services/Impl/GoogleApiService.cs +++ b/NadekoBot.Core/Services/Impl/GoogleApiService.cs @@ -14,7 +14,7 @@ using System.Net; using Newtonsoft.Json.Linq; using NadekoBot.Extensions; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class GoogleApiService : IGoogleApiService { diff --git a/NadekoBot.Core/Services/Impl/ImagesService.cs b/NadekoBot.Core/Services/Impl/ImagesService.cs index 3bb0bd2e..8d2e6464 100644 --- a/NadekoBot.Core/Services/Impl/ImagesService.cs +++ b/NadekoBot.Core/Services/Impl/ImagesService.cs @@ -4,7 +4,7 @@ using System.Collections.Immutable; using System.IO; using System.Linq; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class ImagesService : IImagesService { diff --git a/NadekoBot.Core/Services/Impl/Localization.cs b/NadekoBot.Core/Services/Impl/Localization.cs index dd25aa56..67a63080 100644 --- a/NadekoBot.Core/Services/Impl/Localization.cs +++ b/NadekoBot.Core/Services/Impl/Localization.cs @@ -4,12 +4,12 @@ using System.Globalization; using System.Linq; using Discord; using NLog; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NadekoBot.Common; using Newtonsoft.Json; using System.IO; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class Localization : ILocalization { diff --git a/NadekoBot.Core/Services/Impl/NadekoStrings.cs b/NadekoBot.Core/Services/Impl/NadekoStrings.cs index b50f553e..a21b7c38 100644 --- a/NadekoBot.Core/Services/Impl/NadekoStrings.cs +++ b/NadekoBot.Core/Services/Impl/NadekoStrings.cs @@ -8,7 +8,7 @@ using System.Text.RegularExpressions; using Newtonsoft.Json; using NLog; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class NadekoStrings : INService { diff --git a/NadekoBot.Core/Services/Impl/RedisCache.cs b/NadekoBot.Core/Services/Impl/RedisCache.cs index 0d64e436..7e26d2ab 100644 --- a/NadekoBot.Core/Services/Impl/RedisCache.cs +++ b/NadekoBot.Core/Services/Impl/RedisCache.cs @@ -1,7 +1,7 @@ using StackExchange.Redis; using System.Threading.Tasks; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class RedisCache : IDataCache { diff --git a/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs b/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs index acdba5b7..65249cce 100644 --- a/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs +++ b/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Net.Http; using System.Threading.Tasks; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class SoundCloudApiService : INService { diff --git a/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs b/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs index e7f413cc..02f98ff8 100644 --- a/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs +++ b/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs @@ -4,7 +4,7 @@ using System.Collections.Immutable; using System.Linq; using System.Collections; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class StartingGuildsService : IEnumerable, INService { diff --git a/NadekoBot.Core/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs index c667791e..b014f8a4 100644 --- a/NadekoBot.Core/Services/Impl/StatsService.cs +++ b/NadekoBot.Core/Services/Impl/StatsService.cs @@ -15,7 +15,7 @@ using System.Threading; using System.Threading.Tasks; using StackExchange.Redis; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class StatsService : IStatsService { diff --git a/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs b/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs index b6a47133..b40a4d41 100644 --- a/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs +++ b/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class SyncPreconditionService { diff --git a/NadekoBot.Core/Services/Impl/Ytdl.cs b/NadekoBot.Core/Services/Impl/Ytdl.cs index 0ddebe6b..5b8ba558 100644 --- a/NadekoBot.Core/Services/Impl/Ytdl.cs +++ b/NadekoBot.Core/Services/Impl/Ytdl.cs @@ -3,7 +3,7 @@ using System; using System.Diagnostics; using System.Threading.Tasks; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class YtdlOperation : IDisposable { diff --git a/NadekoBot.Core/Services/LogSetup.cs b/NadekoBot.Core/Services/LogSetup.cs index 9cf85799..6e22854c 100644 --- a/NadekoBot.Core/Services/LogSetup.cs +++ b/NadekoBot.Core/Services/LogSetup.cs @@ -2,7 +2,7 @@ using NLog.Config; using NLog.Targets; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class LogSetup { diff --git a/NadekoBot.Core/Services/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs index 142c064f..d4b177bf 100644 --- a/NadekoBot.Core/Services/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Linq; @@ -10,14 +10,14 @@ using System.Reflection; using System.Threading.Tasks; using System.Collections.Immutable; using System.Diagnostics; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Threading; using System.IO; using NadekoBot.Extensions; using System.Collections.Generic; using NadekoBot.Common; using NadekoBot.Common.ShardCom; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; using StackExchange.Redis; using Newtonsoft.Json; @@ -166,7 +166,7 @@ namespace NadekoBot return Enumerable.Empty(); } var filteredTypes = allTypes - .Where(x => x.IsSubclassOf(typeof(TypeReader)) + .Where(x => x.IsSubclassOf(typeof(TypeReader)) && x.BaseType.GetGenericArguments().Length > 0 && !x.IsAbstract); @@ -380,9 +380,9 @@ namespace NadekoBot return sub.PublishAsync(Client.CurrentUser.Id + "_status.game_set", JsonConvert.SerializeObject(obj)); } - private readonly Dictionary> _packageModules = new Dictionary>(); - private readonly Dictionary> _packageTypes = new Dictionary>(); + private readonly Dictionary Modules, IEnumerable Types)> _loadedPackages = new Dictionary, IEnumerable)>(); private readonly SemaphoreSlim _packageLocker = new SemaphoreSlim(1, 1); + public IEnumerable LoadedPackages => _loadedPackages.Keys; /// /// Unloads a package @@ -394,9 +394,12 @@ namespace NadekoBot await _packageLocker.WaitAsync().ConfigureAwait(false); try { - if (!_packageModules.TryGetValue(name, out var modules)) + if (!_loadedPackages.TryGetValue(name, out var data)) return false; + var modules = data.Modules; + var types = data.Types; + var i = 0; foreach (var m in modules) { @@ -405,7 +408,7 @@ namespace NadekoBot } _log.Info("Unloaded {0} modules.", i); - if (_packageTypes.TryGetValue(name, out var types)) + if (types != null && types.Any()) { i = 0; foreach (var t in types) @@ -436,7 +439,7 @@ namespace NadekoBot await _packageLocker.WaitAsync().ConfigureAwait(false); try { - if (_packageModules.ContainsKey(name)) + if (_loadedPackages.ContainsKey(name)) return false; var startingGuildIdList = Client.Guilds.Select(x => (long)x.Id).ToList(); @@ -458,8 +461,7 @@ namespace NadekoBot * which means they won't have a chance to be used * */ _log.Info("Loaded {0} modules and {1} types.", added.Count(), types.Count()); - _packageModules.Add(name, added); - _packageTypes.Add(name, types); + _loadedPackages.Add(name, (added, types)); return true; } finally diff --git a/NadekoBot.Core/Services/ServiceProvider.cs b/NadekoBot.Core/Services/ServiceProvider.cs index eb806090..748452c0 100644 --- a/NadekoBot.Core/Services/ServiceProvider.cs +++ b/NadekoBot.Core/Services/ServiceProvider.cs @@ -11,7 +11,7 @@ using NadekoBot.Common; #endif -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface INServiceProvider : IServiceProvider, IEnumerable { diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs index 6c799103..036bff8d 100644 --- a/NadekoBot.Core/Services/ShardsCoordinator.cs +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Diagnostics; @@ -8,7 +8,7 @@ using StackExchange.Redis; using Newtonsoft.Json; using NadekoBot.Extensions; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class ShardsCoordinator { diff --git a/NadekoBot.Core/_Extensions/Extensions.cs b/NadekoBot.Core/_Extensions/Extensions.cs index e7a70aff..48170cce 100644 --- a/NadekoBot.Core/_Extensions/Extensions.cs +++ b/NadekoBot.Core/_Extensions/Extensions.cs @@ -16,7 +16,7 @@ using System.Threading.Tasks; using NadekoBot.Common.Collections; using SixLabors.Primitives; using NadekoBot.Common; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Extensions { diff --git a/NadekoBot.Core/_Extensions/IUserExtensions.cs b/NadekoBot.Core/_Extensions/IUserExtensions.cs index 89650f21..d00d9cb3 100644 --- a/NadekoBot.Core/_Extensions/IUserExtensions.cs +++ b/NadekoBot.Core/_Extensions/IUserExtensions.cs @@ -1,5 +1,5 @@ using Discord; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.IO; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs b/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs index 20590658..b5c130bf 100644 --- a/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs +++ b/NadekoBot.Modules.Gambling/AnimalRacingCommands.cs @@ -2,7 +2,7 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRace.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRace.cs index bf1c51ac..0edbb918 100644 --- a/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRace.cs +++ b/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRace.cs @@ -1,8 +1,8 @@ using NadekoBot.Common; using NadekoBot.Extensions; using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRacingUser.cs b/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRacingUser.cs index ea9bc453..38d45ba5 100644 --- a/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRacingUser.cs +++ b/NadekoBot.Modules.Gambling/Common/AnimalRacing/AnimalRacingUser.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Gambling.Common.AnimalRacing { diff --git a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs index 912b6a72..1c13dd9b 100644 --- a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs +++ b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/ReactionEvent.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; using System; using System.Collections.Concurrent; diff --git a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs index 7d571529..07ec808e 100644 --- a/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs +++ b/NadekoBot.Modules.Gambling/Common/CurrencyEvents/SneakyEvent.cs @@ -3,7 +3,7 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common; using NadekoBot.Common.Collections; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs index 35ac3252..0c54165d 100644 --- a/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs +++ b/NadekoBot.Modules.Gambling/CurrencyEventsCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Modules.Gambling/DiceRollCommands.cs b/NadekoBot.Modules.Gambling/DiceRollCommands.cs index cb2c3b3c..0374ce95 100644 --- a/NadekoBot.Modules.Gambling/DiceRollCommands.cs +++ b/NadekoBot.Modules.Gambling/DiceRollCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.IO; diff --git a/NadekoBot.Modules.Gambling/FlipCoinCommands.cs b/NadekoBot.Modules.Gambling/FlipCoinCommands.cs index 96e69acf..d43bea7e 100644 --- a/NadekoBot.Modules.Gambling/FlipCoinCommands.cs +++ b/NadekoBot.Modules.Gambling/FlipCoinCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Gambling/FlowerShopCommands.cs b/NadekoBot.Modules.Gambling/FlowerShopCommands.cs index 6f50b7c3..dc506ed2 100644 --- a/NadekoBot.Modules.Gambling/FlowerShopCommands.cs +++ b/NadekoBot.Modules.Gambling/FlowerShopCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Modules.Gambling/Gambling.cs b/NadekoBot.Modules.Gambling/Gambling.cs index 2ecda7d7..f4cab4c0 100644 --- a/NadekoBot.Modules.Gambling/Gambling.cs +++ b/NadekoBot.Modules.Gambling/Gambling.cs @@ -3,8 +3,8 @@ using Discord.Commands; using NadekoBot.Extensions; using System.Linq; using System.Threading.Tasks; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using NadekoBot.Common; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs b/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs index 53776b78..6ad6b6b4 100644 --- a/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs +++ b/NadekoBot.Modules.Gambling/Services/AnimalRaceService.cs @@ -1,5 +1,5 @@ using System.Threading.Tasks; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Collections.Concurrent; using NadekoBot.Modules.Gambling.Common.AnimalRacing; diff --git a/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs b/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs index 4d75a144..3dcd34e9 100644 --- a/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs +++ b/NadekoBot.Modules.Gambling/Services/CurrencyEventsService.cs @@ -2,7 +2,7 @@ using Discord.Commands; using NadekoBot.Modules.Gambling.Common; using NadekoBot.Modules.Gambling.Common.CurrencyEvents; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; diff --git a/NadekoBot.Modules.Gambling/Services/WaifuService.cs b/NadekoBot.Modules.Gambling/Services/WaifuService.cs index fea6a07f..2fbc4f26 100644 --- a/NadekoBot.Modules.Gambling/Services/WaifuService.cs +++ b/NadekoBot.Modules.Gambling/Services/WaifuService.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Concurrent; diff --git a/NadekoBot.Modules.Gambling/SlotCommands.cs b/NadekoBot.Modules.Gambling/SlotCommands.cs index d77268c8..39f3cf9e 100644 --- a/NadekoBot.Modules.Gambling/SlotCommands.cs +++ b/NadekoBot.Modules.Gambling/SlotCommands.cs @@ -2,7 +2,7 @@ using Discord.Commands; using ImageSharp; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs index a2d5d8fe..630a1652 100644 --- a/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs +++ b/NadekoBot.Modules.Gambling/WaifuClaimCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Modules.Gambling/WheelOfFortuneCommands.cs b/NadekoBot.Modules.Gambling/WheelOfFortuneCommands.cs index cd3de369..ecbf4489 100644 --- a/NadekoBot.Modules.Gambling/WheelOfFortuneCommands.cs +++ b/NadekoBot.Modules.Gambling/WheelOfFortuneCommands.cs @@ -3,7 +3,7 @@ using Discord.Commands; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Gambling.Common.WheelOfFortune; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using Wof = NadekoBot.Modules.Gambling.Common.WheelOfFortune.WheelOfFortune; diff --git a/NadekoBot.Modules.Games/CleverBotCommands.cs b/NadekoBot.Modules.Games/CleverBotCommands.cs index 3373a98a..093b7530 100644 --- a/NadekoBot.Modules.Games/CleverBotCommands.cs +++ b/NadekoBot.Modules.Games/CleverBotCommands.cs @@ -1,6 +1,6 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Modules.Games/Common/GirlRating.cs b/NadekoBot.Modules.Games/Common/GirlRating.cs index d605be0d..6b7354f3 100644 --- a/NadekoBot.Modules.Games/Common/GirlRating.cs +++ b/NadekoBot.Modules.Games/Common/GirlRating.cs @@ -5,7 +5,7 @@ using System.Net.Http; using ImageSharp; using NadekoBot.Common; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NLog; using SixLabors.Primitives; diff --git a/NadekoBot.Modules.Games/Common/Poll.cs b/NadekoBot.Modules.Games/Common/Poll.cs index cf051a07..e1e3ee01 100644 --- a/NadekoBot.Modules.Games/Common/Poll.cs +++ b/NadekoBot.Modules.Games/Common/Poll.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Games.Common { diff --git a/NadekoBot.Modules.Games/Common/TicTacToe.cs b/NadekoBot.Modules.Games/Common/TicTacToe.cs index 97e07217..32a3d993 100644 --- a/NadekoBot.Modules.Games/Common/TicTacToe.cs +++ b/NadekoBot.Modules.Games/Common/TicTacToe.cs @@ -1,7 +1,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System; using System.Text; using System.Threading; diff --git a/NadekoBot.Modules.Games/Common/Trivia/TriviaGame.cs b/NadekoBot.Modules.Games/Common/Trivia/TriviaGame.cs index abafdb67..e3e98b03 100644 --- a/NadekoBot.Modules.Games/Common/Trivia/TriviaGame.cs +++ b/NadekoBot.Modules.Games/Common/Trivia/TriviaGame.cs @@ -9,8 +9,8 @@ using Discord; using Discord.Net; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Games.Common.Trivia diff --git a/NadekoBot.Modules.Games/Games.cs b/NadekoBot.Modules.Games/Games.cs index 07fd450e..9b894b72 100644 --- a/NadekoBot.Modules.Games/Games.cs +++ b/NadekoBot.Modules.Games/Games.cs @@ -1,6 +1,6 @@ using Discord.Commands; using Discord; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using System; using NadekoBot.Common; diff --git a/NadekoBot.Modules.Games/PlantAndPickCommands.cs b/NadekoBot.Modules.Games/PlantAndPickCommands.cs index a5da947b..179e9c91 100644 --- a/NadekoBot.Modules.Games/PlantAndPickCommands.cs +++ b/NadekoBot.Modules.Games/PlantAndPickCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Games/Services/ChatterbotService.cs b/NadekoBot.Modules.Games/Services/ChatterbotService.cs index 3d2e6d43..ee1a27f8 100644 --- a/NadekoBot.Modules.Games/Services/ChatterbotService.cs +++ b/NadekoBot.Modules.Games/Services/ChatterbotService.cs @@ -9,9 +9,9 @@ using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; using NadekoBot.Modules.Permissions.Common; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using NadekoBot.Modules.Games.Common.ChatterBot; diff --git a/NadekoBot.Modules.Games/Services/GamesService.cs b/NadekoBot.Modules.Games/Services/GamesService.cs index 7573cda0..25769715 100644 --- a/NadekoBot.Modules.Games/Services/GamesService.cs +++ b/NadekoBot.Modules.Games/Services/GamesService.cs @@ -12,9 +12,9 @@ using NadekoBot.Common; using NadekoBot.Common.Collections; using NadekoBot.Extensions; using NadekoBot.Modules.Games.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using Newtonsoft.Json; using NLog; using NadekoBot.Modules.Games.Common.Acrophobia; diff --git a/NadekoBot.Modules.Games/Services/PollService.cs b/NadekoBot.Modules.Games/Services/PollService.cs index 5c14afbc..e2fc96be 100644 --- a/NadekoBot.Modules.Games/Services/PollService.cs +++ b/NadekoBot.Modules.Games/Services/PollService.cs @@ -6,8 +6,8 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Modules.Games.Common; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Games.Services diff --git a/NadekoBot.Modules.Games/TicTacToeCommands.cs b/NadekoBot.Modules.Games/TicTacToeCommands.cs index 34e5b2f0..aed0b43f 100644 --- a/NadekoBot.Modules.Games/TicTacToeCommands.cs +++ b/NadekoBot.Modules.Games/TicTacToeCommands.cs @@ -7,7 +7,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using NadekoBot.Common.Attributes; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using NadekoBot.Modules.Games.Services; using NadekoBot.Modules.Games.Common; diff --git a/NadekoBot.Modules.Games/TriviaCommands.cs b/NadekoBot.Modules.Games/TriviaCommands.cs index 4b8e4129..d47058d1 100644 --- a/NadekoBot.Modules.Games/TriviaCommands.cs +++ b/NadekoBot.Modules.Games/TriviaCommands.cs @@ -2,7 +2,7 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Trivia; diff --git a/NadekoBot.Modules.Music/Common/MusicPlayer.cs b/NadekoBot.Modules.Music/Common/MusicPlayer.cs index aa61a9ce..edb85085 100644 --- a/NadekoBot.Modules.Music/Common/MusicPlayer.cs +++ b/NadekoBot.Modules.Music/Common/MusicPlayer.cs @@ -9,8 +9,8 @@ using NadekoBot.Extensions; using System.Diagnostics; using NadekoBot.Common.Collections; using NadekoBot.Modules.Music.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Music.Common { diff --git a/NadekoBot.Modules.Music/Common/SongInfo.cs b/NadekoBot.Modules.Music/Common/SongInfo.cs index c19f8057..02f7ac35 100644 --- a/NadekoBot.Modules.Music/Common/SongInfo.cs +++ b/NadekoBot.Modules.Music/Common/SongInfo.cs @@ -1,6 +1,6 @@ using Discord; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Net; using System.Text.RegularExpressions; diff --git a/NadekoBot.Modules.Music/Common/SongResolver/ISongResolverFactory.cs b/NadekoBot.Modules.Music/Common/SongResolver/ISongResolverFactory.cs index c7d79e73..688971f7 100644 --- a/NadekoBot.Modules.Music/Common/SongResolver/ISongResolverFactory.cs +++ b/NadekoBot.Modules.Music/Common/SongResolver/ISongResolverFactory.cs @@ -1,5 +1,5 @@ using NadekoBot.Modules.Music.Common.SongResolver.Strategies; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; namespace NadekoBot.Modules.Music.Common.SongResolver diff --git a/NadekoBot.Modules.Music/Common/SongResolver/SongResolverFactory.cs b/NadekoBot.Modules.Music/Common/SongResolver/SongResolverFactory.cs index 7e65701c..b06739b9 100644 --- a/NadekoBot.Modules.Music/Common/SongResolver/SongResolverFactory.cs +++ b/NadekoBot.Modules.Music/Common/SongResolver/SongResolverFactory.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NadekoBot.Modules.Music.Common.SongResolver.Strategies; namespace NadekoBot.Modules.Music.Common.SongResolver diff --git a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs index 413dfa9d..e262c9a9 100644 --- a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs +++ b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.IO; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs index 5e11ae4e..06f9ca0f 100644 --- a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs +++ b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System; using System.Net.Http; diff --git a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs index 66e42075..ae786e79 100644 --- a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs +++ b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs @@ -1,5 +1,5 @@ using NadekoBot.Modules.Music.Extensions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System.Threading.Tasks; namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies diff --git a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs index e4a0058e..1443a695 100644 --- a/NadekoBot.Modules.Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs +++ b/NadekoBot.Modules.Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs @@ -1,5 +1,5 @@ -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Globalization; diff --git a/NadekoBot.Modules.Music/Extensions/Extensions.cs b/NadekoBot.Modules.Music/Extensions/Extensions.cs index b3eb1d38..1acd66fe 100644 --- a/NadekoBot.Modules.Music/Extensions/Extensions.cs +++ b/NadekoBot.Modules.Music/Extensions/Extensions.cs @@ -1,6 +1,6 @@ using NadekoBot.Modules.Music.Common; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using System; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Music/Music.cs b/NadekoBot.Modules.Music/Music.cs index 9c15a01a..bb5f58bc 100644 --- a/NadekoBot.Modules.Music/Music.cs +++ b/NadekoBot.Modules.Music/Music.cs @@ -1,20 +1,20 @@ using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Discord; using System.Threading.Tasks; using System; using System.Linq; using NadekoBot.Extensions; using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.IO; using System.Net.Http; using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; using Newtonsoft.Json.Linq; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using NadekoBot.Modules.Music.Services; using NadekoBot.Modules.Music.Common.Exceptions; using NadekoBot.Modules.Music.Common; diff --git a/NadekoBot.Modules.Music/Services/MusicService.cs b/NadekoBot.Modules.Music/Services/MusicService.cs index e27c8ba1..1e127d98 100644 --- a/NadekoBot.Modules.Music/Services/MusicService.cs +++ b/NadekoBot.Modules.Music/Services/MusicService.cs @@ -3,15 +3,14 @@ using System.Linq; using System.Threading.Tasks; using Discord; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System.IO; -using System.Collections.Generic; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common; -using NadekoBot.Services.Impl; -using NadekoBot.Services; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Core.Services; using NadekoBot.Modules.Music.Common; using NadekoBot.Modules.Music.Common.Exceptions; using NadekoBot.Modules.Music.Common.SongResolver; diff --git a/NadekoBot.Modules.Pokemon/Pokemon.cs b/NadekoBot.Modules.Pokemon/Pokemon.cs index 0389e1b0..f4d6544a 100644 --- a/NadekoBot.Modules.Pokemon/Pokemon.cs +++ b/NadekoBot.Modules.Pokemon/Pokemon.cs @@ -1,8 +1,8 @@ using Discord.Commands; using NadekoBot.Extensions; using System.Linq; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Threading.Tasks; using Discord; diff --git a/NadekoBot.Modules.Pokemon/Services/PokemonService.cs b/NadekoBot.Modules.Pokemon/Services/PokemonService.cs index 43edc5cd..d29f8818 100644 --- a/NadekoBot.Modules.Pokemon/Services/PokemonService.cs +++ b/NadekoBot.Modules.Pokemon/Services/PokemonService.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; using NadekoBot.Modules.Pokemon.Common; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; using NLog; diff --git a/NadekoBot.Modules.Searches/Common/OmdbProvider.cs b/NadekoBot.Modules.Searches/Common/OmdbProvider.cs index 16ea322a..292ea3c0 100644 --- a/NadekoBot.Modules.Searches/Common/OmdbProvider.cs +++ b/NadekoBot.Modules.Searches/Common/OmdbProvider.cs @@ -3,7 +3,7 @@ using System.Net.Http; using System.Threading.Tasks; using Discord; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; namespace NadekoBot.Modules.Searches.Common diff --git a/NadekoBot.Modules.Searches/OsuCommands.cs b/NadekoBot.Modules.Searches/OsuCommands.cs index b8f05df0..9b4de2ce 100644 --- a/NadekoBot.Modules.Searches/OsuCommands.cs +++ b/NadekoBot.Modules.Searches/OsuCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json.Linq; using System; using System.Globalization; diff --git a/NadekoBot.Modules.Searches/Searches.cs b/NadekoBot.Modules.Searches/Searches.cs index 1b978535..9ef9af9b 100644 --- a/NadekoBot.Modules.Searches/Searches.cs +++ b/NadekoBot.Modules.Searches/Searches.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json.Linq; using System; using System.Linq; using System.Net.Http; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using System.Net; using System.Collections.Generic; diff --git a/NadekoBot.Modules.Searches/Services/AnimeSearchService.cs b/NadekoBot.Modules.Searches/Services/AnimeSearchService.cs index 1a372d8c..0a495806 100644 --- a/NadekoBot.Modules.Searches/Services/AnimeSearchService.cs +++ b/NadekoBot.Modules.Searches/Services/AnimeSearchService.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; using NLog; using System; diff --git a/NadekoBot.Modules.Searches/Services/FeedsService.cs b/NadekoBot.Modules.Searches/Services/FeedsService.cs index 09ad09dd..a5853ef2 100644 --- a/NadekoBot.Modules.Searches/Services/FeedsService.cs +++ b/NadekoBot.Modules.Searches/Services/FeedsService.cs @@ -2,14 +2,14 @@ using Microsoft.SyndicationFeed; using Microsoft.SyndicationFeed.Rss; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Xml; using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Collections.Concurrent; using Discord.WebSocket; diff --git a/NadekoBot.Modules.Searches/Services/SearchesService.cs b/NadekoBot.Modules.Searches/Services/SearchesService.cs index 0b410aee..602396b8 100644 --- a/NadekoBot.Modules.Searches/Services/SearchesService.cs +++ b/NadekoBot.Modules.Searches/Services/SearchesService.cs @@ -1,7 +1,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; using NLog; using System; @@ -10,7 +10,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using NadekoBot.Modules.Searches.Common; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using System.Net.Http; diff --git a/NadekoBot.Modules.Searches/Services/StreamNotificationService.cs b/NadekoBot.Modules.Searches/Services/StreamNotificationService.cs index 15cc639a..2ca9fd58 100644 --- a/NadekoBot.Modules.Searches/Services/StreamNotificationService.cs +++ b/NadekoBot.Modules.Searches/Services/StreamNotificationService.cs @@ -1,8 +1,8 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Newtonsoft.Json; using System; using System.Collections.Concurrent; @@ -13,7 +13,7 @@ using System.Threading; using System.Threading.Tasks; using NadekoBot.Modules.Searches.Common; using NadekoBot.Modules.Searches.Common.Exceptions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Searches.Services { diff --git a/NadekoBot.Modules.Searches/StreamNotificationCommands.cs b/NadekoBot.Modules.Searches/StreamNotificationCommands.cs index 1796b4fd..8b565704 100644 --- a/NadekoBot.Modules.Searches/StreamNotificationCommands.cs +++ b/NadekoBot.Modules.Searches/StreamNotificationCommands.cs @@ -2,9 +2,9 @@ using Discord; using System.Linq; using System.Threading.Tasks; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; diff --git a/NadekoBot.Modules.Searches/TranslatorCommands.cs b/NadekoBot.Modules.Searches/TranslatorCommands.cs index 9f4960fe..b0693fdd 100644 --- a/NadekoBot.Modules.Searches/TranslatorCommands.cs +++ b/NadekoBot.Modules.Searches/TranslatorCommands.cs @@ -4,7 +4,7 @@ using NadekoBot.Extensions; using System.Threading.Tasks; using System.Linq; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Modules.Searches.Services; namespace NadekoBot.Modules.Searches diff --git a/NadekoBot.Modules.Utility/BotConfigCommands.cs b/NadekoBot.Modules.Utility/BotConfigCommands.cs index cc91dd9f..9c1f5f56 100644 --- a/NadekoBot.Modules.Utility/BotConfigCommands.cs +++ b/NadekoBot.Modules.Utility/BotConfigCommands.cs @@ -2,7 +2,7 @@ using Discord.Commands; using NadekoBot.Common; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Utility/CommandMapCommands.cs b/NadekoBot.Modules.Utility/CommandMapCommands.cs index 9903dedf..90fc7b26 100644 --- a/NadekoBot.Modules.Utility/CommandMapCommands.cs +++ b/NadekoBot.Modules.Utility/CommandMapCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Modules.Utility/Common/RepeatRunner.cs b/NadekoBot.Modules.Utility/Common/RepeatRunner.cs index bf21d317..30c14709 100644 --- a/NadekoBot.Modules.Utility/Common/RepeatRunner.cs +++ b/NadekoBot.Modules.Utility/Common/RepeatRunner.cs @@ -5,7 +5,7 @@ using Discord; using Discord.Net; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Utility.Common diff --git a/NadekoBot.Modules.Utility/Extensions/StreamRoleExtensions.cs b/NadekoBot.Modules.Utility/Extensions/StreamRoleExtensions.cs index eaf16e84..f33ad47b 100644 --- a/NadekoBot.Modules.Utility/Extensions/StreamRoleExtensions.cs +++ b/NadekoBot.Modules.Utility/Extensions/StreamRoleExtensions.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Database.Repositories; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Database.Repositories; namespace NadekoBot.Modules.Utility.Extensions { diff --git a/NadekoBot.Modules.Utility/InfoCommands.cs b/NadekoBot.Modules.Utility/InfoCommands.cs index 95a3f6b1..96243dcc 100644 --- a/NadekoBot.Modules.Utility/InfoCommands.cs +++ b/NadekoBot.Modules.Utility/InfoCommands.cs @@ -2,7 +2,7 @@ using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Linq; using System.Text; diff --git a/NadekoBot.Modules.Utility/PatreonCommands.cs b/NadekoBot.Modules.Utility/PatreonCommands.cs index 933ee7bc..330779d8 100644 --- a/NadekoBot.Modules.Utility/PatreonCommands.cs +++ b/NadekoBot.Modules.Utility/PatreonCommands.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Discord.Commands; using System; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Extensions; using Discord; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Modules.Utility/QuoteCommands.cs b/NadekoBot.Modules.Utility/QuoteCommands.cs index 8b4a6752..1056a73a 100644 --- a/NadekoBot.Modules.Utility/QuoteCommands.cs +++ b/NadekoBot.Modules.Utility/QuoteCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Utility/RemindCommands.cs b/NadekoBot.Modules.Utility/RemindCommands.cs index caa13aed..ec18d50e 100644 --- a/NadekoBot.Modules.Utility/RemindCommands.cs +++ b/NadekoBot.Modules.Utility/RemindCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Utility/RepeatCommands.cs b/NadekoBot.Modules.Utility/RepeatCommands.cs index 921c0746..241b7744 100644 --- a/NadekoBot.Modules.Utility/RepeatCommands.cs +++ b/NadekoBot.Modules.Utility/RepeatCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Concurrent; using System.Linq; diff --git a/NadekoBot.Modules.Utility/Services/CommandMapService.cs b/NadekoBot.Modules.Utility/Services/CommandMapService.cs index c2ca0fe5..23efc2f9 100644 --- a/NadekoBot.Modules.Utility/Services/CommandMapService.cs +++ b/NadekoBot.Modules.Utility/Services/CommandMapService.cs @@ -5,8 +5,8 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Utility.Services diff --git a/NadekoBot.Modules.Utility/Services/ConverterService.cs b/NadekoBot.Modules.Utility/Services/ConverterService.cs index 05e9bed3..310d0880 100644 --- a/NadekoBot.Modules.Utility/Services/ConverterService.cs +++ b/NadekoBot.Modules.Utility/Services/ConverterService.cs @@ -6,8 +6,8 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Newtonsoft.Json; using NLog; diff --git a/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs index d7e7a0a5..bd19be3b 100644 --- a/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs +++ b/NadekoBot.Modules.Utility/Services/MessageRepeaterService.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Modules.Utility.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Utility.Services { diff --git a/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs index 228129c2..7aee3647 100644 --- a/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs +++ b/NadekoBot.Modules.Utility/Services/PatreonRewardsService.cs @@ -6,8 +6,8 @@ using System.Threading; using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Modules.Utility.Common.Patreon; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Newtonsoft.Json; using NLog; using NadekoBot.Extensions; diff --git a/NadekoBot.Modules.Utility/Services/RemindService.cs b/NadekoBot.Modules.Utility/Services/RemindService.cs index 8999e9ae..5a6fc2ce 100644 --- a/NadekoBot.Modules.Utility/Services/RemindService.cs +++ b/NadekoBot.Modules.Utility/Services/RemindService.cs @@ -7,9 +7,9 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Replacements; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using System.Collections.Generic; diff --git a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs index e7aded2c..52a3266a 100644 --- a/NadekoBot.Modules.Utility/Services/StreamRoleService.cs +++ b/NadekoBot.Modules.Utility/Services/StreamRoleService.cs @@ -6,8 +6,8 @@ using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; using NadekoBot.Modules.Utility.Extensions; using NadekoBot.Common.TypeReaders; diff --git a/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs index 2f537e43..32d6bb1b 100644 --- a/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs +++ b/NadekoBot.Modules.Utility/Services/VerboseErrorsService.cs @@ -6,8 +6,8 @@ using Discord.Commands; using NadekoBot.Common.Collections; using NadekoBot.Extensions; using NadekoBot.Modules.Help.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Utility.Services { diff --git a/NadekoBot.Modules.Utility/Utility.cs b/NadekoBot.Modules.Utility/Utility.cs index 17d65f36..b9fbee8c 100644 --- a/NadekoBot.Modules.Utility/Utility.cs +++ b/NadekoBot.Modules.Utility/Utility.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Threading.Tasks; using System.Text; using NadekoBot.Extensions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System.Net.Http; using ImageSharp; using System.Collections.Generic; @@ -14,7 +14,7 @@ using Discord.WebSocket; using System.Diagnostics; using NadekoBot.Common; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Utility { diff --git a/NadekoBot.Modules.Xp/Club.cs b/NadekoBot.Modules.Xp/Club.cs index b82e9e93..f6791d4f 100644 --- a/NadekoBot.Modules.Xp/Club.cs +++ b/NadekoBot.Modules.Xp/Club.cs @@ -5,7 +5,7 @@ using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; using NadekoBot.Modules.Xp.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using System.Threading.Tasks; diff --git a/NadekoBot.Modules.Xp/Common/FullUserStats.cs b/NadekoBot.Modules.Xp/Common/FullUserStats.cs index 11f38648..62e68a39 100644 --- a/NadekoBot.Modules.Xp/Common/FullUserStats.cs +++ b/NadekoBot.Modules.Xp/Common/FullUserStats.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Xp.Common { diff --git a/NadekoBot.Modules.Xp/Extensions/Extensions.cs b/NadekoBot.Modules.Xp/Extensions/Extensions.cs index c5d6605b..207f3e51 100644 --- a/NadekoBot.Modules.Xp/Extensions/Extensions.cs +++ b/NadekoBot.Modules.Xp/Extensions/Extensions.cs @@ -1,5 +1,5 @@ using NadekoBot.Modules.Xp.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/NadekoBot.Modules.Xp/Services/ClubService.cs b/NadekoBot.Modules.Xp/Services/ClubService.cs index 72997d3f..75181cd9 100644 --- a/NadekoBot.Modules.Xp/Services/ClubService.cs +++ b/NadekoBot.Modules.Xp/Services/ClubService.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Discord; using NadekoBot.Modules.Xp.Common; using System.Linq; diff --git a/NadekoBot.Modules.Xp/Services/XpService.cs b/NadekoBot.Modules.Xp/Services/XpService.cs index ac8a2630..c95aa50f 100644 --- a/NadekoBot.Modules.Xp/Services/XpService.cs +++ b/NadekoBot.Modules.Xp/Services/XpService.cs @@ -3,9 +3,9 @@ using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Collections.Concurrent; diff --git a/NadekoBot.Modules.Xp/Xp.cs b/NadekoBot.Modules.Xp/Xp.cs index 8685f381..5db4341a 100644 --- a/NadekoBot.Modules.Xp/Xp.cs +++ b/NadekoBot.Modules.Xp/Xp.cs @@ -5,8 +5,8 @@ using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; using NadekoBot.Modules.Xp.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index 4ffebca0..c624a290 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Diagnostics; using System.Threading.Tasks; diff --git a/src/NadekoBot/data/command_strings.json b/src/NadekoBot/data/command_strings.json index 4fc0f996..f5d09a01 100644 --- a/src/NadekoBot/data/command_strings.json +++ b/src/NadekoBot/data/command_strings.json @@ -1311,9 +1311,9 @@ }, "deleteplaylist": { "Cmd": "deleteplaylist delpls", - "Desc": "Deletes a saved playlist. Works only if you made it or if you are the bot owner.", + "Desc": "Deletes a saved playlist using its id. Works only if you made it or if you are the bot owner.", "Usage": [ - "{0}delpls animu-5" + "{0}delpls 5" ] }, "goto": { @@ -2991,7 +2991,7 @@ }, "editcustreact": { "cmd": "editcustreact ecr", - "desc": "Edits the custom reaction's response given it's ID.", + "desc": "Edits the custom reaction's response given its ID.", "usage": [ "{0}ecr 123 I'm a magical girl" ] From 696a0eb2a7c0b7b7b4ad63b3fb52530e7da3df00 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 15 Oct 2017 09:39:46 +0200 Subject: [PATCH 013/192] Removed module projects because it can't work like that atm. Commented out package commands. --- ...055008_clear-and-loadedpackage.Designer.cs | 1925 +++++++++++++++++ .../20171013055008_clear-and-loadedpackage.cs | 129 ++ .../NadekoSqliteContextModelSnapshot.cs | 100 +- .../Administration/Common/Migration/0_9..cs | 195 -- .../Common/Migration/MigrationException.cs | 9 - .../Administration/MigrationCommands.cs | 381 ---- .../Modules/Administration/ModuleCommands.cs | 164 +- .../Modules/Gambling/AnimalRacingCommands.cs | 172 ++ .../Common/AnimalRacing/AnimalRace.cs | 161 ++ .../Common/AnimalRacing/AnimalRacingUser.cs | 32 + .../Exceptions/AlreadyJoinedException.cs | 9 + .../Exceptions/AlreadyStartedException.cs | 9 + .../Exceptions/AnimalRaceFullException.cs | 8 + .../Exceptions/NotEnoughFundsException.cs | 9 + .../Modules/Gambling/Common/Cards.cs | 234 ++ .../Common/CurrencyEvents/CurrencyEvent.cs | 12 + .../Common/CurrencyEvents/ReactionEvent.cs | 144 ++ .../Common/CurrencyEvents/SneakyEvent.cs | 99 + .../Common/WheelOfFortune/WheelOfFortune.cs | 45 + .../Gambling/CurrencyEventsCommands.cs | 91 + .../Modules/Gambling/DiceRollCommands.cs | 241 +++ .../Modules/Gambling/DrawCommands.cs | 106 + .../Modules/Gambling/FlipCoinCommands.cs | 133 ++ .../Modules/Gambling/FlowerShopCommands.cs | 366 ++++ NadekoBot.Core/Modules/Gambling/Gambling.cs | 295 +++ .../Gambling/Services/AnimalRaceService.cs | 21 + .../Services/CurrencyEventsService.cs | 66 + .../Modules/Gambling/Services/WaifuService.cs | 12 + .../Modules/Gambling/SlotCommands.cs | 239 ++ .../Modules/Gambling/WaifuClaimCommands.cs | 617 ++++++ .../Gambling/WheelOfFortuneCommands.cs | 81 + .../Modules/Games/AcropobiaCommands.cs | 148 ++ .../Modules/Games/CleverBotCommands.cs | 56 + .../Games/Common/Acrophobia/Acrophobia.cs | 177 ++ .../Games/Common/Acrophobia/AcrophobiaUser.cs | 28 + .../Common/ChatterBot/ChatterBotResponse.cs | 8 + .../Common/ChatterBot/ChatterBotSession.cs | 37 + .../Common/ChatterBot/CleverbotResponse.cs | 14 + .../Common/ChatterBot/IChatterBotSession.cs | 13 + .../ChatterBot/OfficialCleverbotSession.cs | 33 + .../Modules/Games/Common/Connect4/Connect4.cs | 364 ++++ .../Modules/Games/Common/GirlRating.cs | 73 + .../Exceptions/TermNotFoundException.cs | 11 + .../Modules/Games/Common/Hangman/Hangman.cs | 172 ++ .../Games/Common/Hangman/HangmanObject.cs | 8 + .../Modules/Games/Common/Hangman/Phase.cs | 14 + .../Modules/Games/Common/Hangman/TermPool.cs | 54 + .../Modules/Games/Common/Hangman/TermType.cs | 18 + .../Modules/Games/Common/Nunchi/Nunchi.cs | 181 ++ NadekoBot.Core/Modules/Games/Common/Poll.cs | 129 ++ .../Modules/Games/Common/TicTacToe.cs | 277 +++ .../Modules/Games/Common/Trivia/TriviaGame.cs | 266 +++ .../Games/Common/Trivia/TriviaQuestion.cs | 110 + .../Games/Common/Trivia/TriviaQuestionPool.cs | 64 + .../Modules/Games/Common/TypingArticle.cs | 8 + .../Modules/Games/Common/TypingGame.cs | 153 ++ .../Modules/Games/Connect4Commands.cs | 183 ++ NadekoBot.Core/Modules/Games/Games.cs | 209 ++ .../Modules/Games/HangmanCommands.cs | 135 ++ NadekoBot.Core/Modules/Games/LeetCommands.cs | 305 +++ .../Modules/Games/NunchiCommands.cs | 128 ++ .../Modules/Games/PlantAndPickCommands.cs | 144 ++ NadekoBot.Core/Modules/Games/PollCommands.cs | 60 + .../Games/Services/ChatterbotService.cs | 145 ++ .../Modules/Games/Services/GamesService.cs | 215 ++ .../Modules/Games/Services/PollService.cs | 71 + .../Modules/Games/SpeedTypingCommands.cs | 120 + .../Modules/Games/TicTacToeCommands.cs | 62 + .../Modules/Games/TriviaCommands.cs | 98 + .../Exceptions/NotInVoiceChannelException.cs | 9 + .../Common/Exceptions/QueueFullException.cs | 12 + .../Exceptions/SongNotFoundException.cs | 12 + .../Modules/Music/Common/MusicPlayer.cs | 670 ++++++ .../Modules/Music/Common/MusicQueue.cs | 215 ++ .../Modules/Music/Common/SongBuffer.cs | 95 + .../Modules/Music/Common/SongHandler.cs | 9 + .../Modules/Music/Common/SongInfo.cs | 79 + .../SongResolver/ISongResolverFactory.cs | 11 + .../SongResolver/SongResolverFactory.cs | 41 + .../Strategies/IResolverStrategy.cs | 9 + .../Strategies/LocalSongResolveStrategy.cs | 22 + .../Strategies/RadioResolveStrategy.cs | 138 ++ .../Strategies/SoundCloudResolveStrategy.cs | 27 + .../Strategies/YoutubeResolveStrategy.cs | 69 + .../Modules/Music/Extensions/Extensions.cs | 23 + NadekoBot.Core/Modules/Music/Music.cs | 901 ++++++++ .../Modules/Music/Services/MusicService.cs | 239 ++ .../Exceptions/TagBlacklistedException.cs | 5 + NadekoBot.Core/Modules/Nsfw/NSFW.cs | 354 +++ .../Modules/Pokemon/Common/PokeStats.cs | 15 + .../Modules/Pokemon/Common/PokemonType.cs | 32 + NadekoBot.Core/Modules/Pokemon/Pokemon.cs | 340 +++ .../Pokemon/Services/PokemonService.cs | 34 + .../Modules/Searches/AnimeSearchCommands.cs | 176 ++ .../Modules/Searches/Common/AnimeResult.cs | 20 + .../Modules/Searches/Common/DefineModel.cs | 39 + .../Exceptions/StreamNotFoundException.cs | 11 + .../Searches/Common/GoogleSearchResult.cs | 16 + .../Modules/Searches/Common/MagicItem.cs | 8 + .../Modules/Searches/Common/MangaResult.cs | 17 + .../Modules/Searches/Common/OmdbProvider.cs | 57 + .../Searches/Common/OverwatchApiModel.cs | 60 + .../Searches/Common/SearchImageCacher.cs | 223 ++ .../Modules/Searches/Common/SearchPokemon.cs | 55 + .../Searches/Common/StreamResponses.cs | 95 + .../Modules/Searches/Common/TimeModels.cs | 37 + .../Modules/Searches/Common/WeatherModels.cs | 66 + .../Searches/Common/WikipediaApiModel.cs | 18 + .../Modules/Searches/Common/WoWJoke.cs | 9 + .../Exceptions/TagBlacklistedException.cs | 12 + .../Modules/Searches/FeedCommands.cs | 110 + .../Modules/Searches/JokeCommands.cs | 62 + .../Modules/Searches/LoLCommands.cs | 68 + .../Modules/Searches/MemegenCommands.cs | 78 + .../Modules/Searches/OsuCommands.cs | 271 +++ .../Modules/Searches/OverwatchCommands.cs | 111 + .../Modules/Searches/PlaceCommands.cs | 81 + .../Modules/Searches/PokemonSearchCommands.cs | 70 + NadekoBot.Core/Modules/Searches/Searches.cs | 831 +++++++ .../Searches/Services/AnimeSearchService.cs | 74 + .../Modules/Searches/Services/FeedsService.cs | 214 ++ .../Searches/Services/SearchesService.cs | 251 +++ .../Services/StreamNotificationService.cs | 184 ++ .../Searches/StreamNotificationCommands.cs | 180 ++ .../Modules/Searches/TranslatorCommands.cs | 137 ++ .../Modules/Searches/XkcdCommands.cs | 85 + .../Modules/Utility/BotConfigCommands.cs | 46 + .../Modules/Utility/CalcCommands.cs | 67 + .../Modules/Utility/CommandMapCommands.cs | 133 ++ .../Exceptions/StreamRoleNotFoundException.cs | 11 + .../StreamRolePermissionException.cs | 11 + .../Utility/Common/Patreon/PatreonData.cs | 23 + .../Utility/Common/Patreon/PatreonPledge.cs | 62 + .../Utility/Common/Patreon/PatreonUser.cs | 64 + .../Modules/Utility/Common/RepeatRunner.cs | 107 + .../Utility/Common/StreamRoleListType.cs | 8 + .../Extensions/StreamRoleExtensions.cs | 27 + .../Modules/Utility/InfoCommands.cs | 147 ++ .../Utility/NadekoBot.Modules.Searches.csproj | 23 + .../Modules/Utility/PatreonCommands.cs | 81 + .../Modules/Utility/QuoteCommands.cs | 217 ++ .../Modules/Utility/RemindCommands.cs | 156 ++ .../Modules/Utility/RepeatCommands.cs | 236 ++ .../Utility/Services/CommandMapService.cs | 77 + .../Utility/Services/ConverterService.cs | 148 ++ .../Services/MessageRepeaterService.cs | 42 + .../Utility/Services/PatreonRewardsService.cs | 195 ++ .../Modules/Utility/Services/RemindService.cs | 105 + .../Utility/Services/StreamRoleService.cs | 305 +++ .../Utility/Services/VerboseErrorsService.cs | 86 + .../Modules/Utility/StreamRoleCommands.cs | 94 + .../Modules/Utility/UnitConversionCommands.cs | 87 + NadekoBot.Core/Modules/Utility/Utility.cs | 322 +++ .../Modules/Utility/VerboseErrorCommands.cs | 27 + NadekoBot.Core/Modules/Xp/Club.cs | 349 +++ .../Modules/Xp/Common/FullUserStats.cs | 26 + .../Modules/Xp/Common/LevelStats.cs | 43 + .../Modules/Xp/Extensions/Extensions.cs | 34 + .../Modules/Xp/Services/ClubService.cs | 322 +++ .../Modules/Xp/Services/UserCacheItem.cs | 21 + .../Modules/Xp/Services/XpService.cs | 780 +++++++ NadekoBot.Core/Modules/Xp/Xp.cs | 283 +++ NadekoBot.Core/NadekoBot.Core.csproj | 12 + .../Services/Database/IUnitOfWork.cs | 1 - .../Services/Database/Models/BotConfig.cs | 22 +- .../Services/Database/Models/ClashCaller.cs | 22 - .../Services/Database/Models/ClashWar.cs | 32 - .../Services/Database/NadekoContext.cs | 12 +- .../Repositories/IClashOfClansRepository.cs | 10 - .../Impl/ClashOfClansRepository.cs | 24 - .../Services/Database/UnitOfWork.cs | 3 - NadekoBot.Core/Services/NadekoBot.cs | 183 +- NadekoBot.Core/Services/ShardsCoordinator.cs | 8 +- NadekoBot.Modules.Games/Games.cs | 2 +- NadekoBot.sln | 72 - docs/guides/Upgrading Guide.md | 26 - docs/index.md | 1 - mkdocs.yml | 1 - src/NadekoBot/NadekoBot.csproj | 1 - src/NadekoBot/Program.cs | 3 +- 180 files changed, 21625 insertions(+), 1058 deletions(-) create mode 100644 NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs create mode 100644 NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs delete mode 100644 NadekoBot.Core/Modules/Administration/Common/Migration/0_9..cs delete mode 100644 NadekoBot.Core/Modules/Administration/Common/Migration/MigrationException.cs delete mode 100644 NadekoBot.Core/Modules/Administration/MigrationCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/Cards.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs create mode 100644 NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/DrawCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Gambling.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs create mode 100644 NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs create mode 100644 NadekoBot.Core/Modules/Gambling/SlotCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs create mode 100644 NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/AcropobiaCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/CleverBotCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Acrophobia/Acrophobia.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotSession.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/ChatterBot/CleverbotResponse.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/ChatterBot/IChatterBotSession.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Connect4/Connect4.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/GirlRating.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Hangman/HangmanObject.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Hangman/Phase.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Hangman/TermType.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Nunchi/Nunchi.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Poll.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/TicTacToe.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestion.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestionPool.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/TypingArticle.cs create mode 100644 NadekoBot.Core/Modules/Games/Common/TypingGame.cs create mode 100644 NadekoBot.Core/Modules/Games/Connect4Commands.cs create mode 100644 NadekoBot.Core/Modules/Games/Games.cs create mode 100644 NadekoBot.Core/Modules/Games/HangmanCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/LeetCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/NunchiCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/PollCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs create mode 100644 NadekoBot.Core/Modules/Games/Services/GamesService.cs create mode 100644 NadekoBot.Core/Modules/Games/Services/PollService.cs create mode 100644 NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/TicTacToeCommands.cs create mode 100644 NadekoBot.Core/Modules/Games/TriviaCommands.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/Exceptions/QueueFullException.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/Exceptions/SongNotFoundException.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/MusicQueue.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongBuffer.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongHandler.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongInfo.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs create mode 100644 NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs create mode 100644 NadekoBot.Core/Modules/Music/Extensions/Extensions.cs create mode 100644 NadekoBot.Core/Modules/Music/Music.cs create mode 100644 NadekoBot.Core/Modules/Music/Services/MusicService.cs create mode 100644 NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs create mode 100644 NadekoBot.Core/Modules/Nsfw/NSFW.cs create mode 100644 NadekoBot.Core/Modules/Pokemon/Common/PokeStats.cs create mode 100644 NadekoBot.Core/Modules/Pokemon/Common/PokemonType.cs create mode 100644 NadekoBot.Core/Modules/Pokemon/Pokemon.cs create mode 100644 NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs create mode 100644 NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/AnimeResult.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/DefineModel.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/GoogleSearchResult.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/MagicItem.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/MangaResult.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/OmdbProvider.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/OverwatchApiModel.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/SearchImageCacher.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/SearchPokemon.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/StreamResponses.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/TimeModels.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/WeatherModels.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/WikipediaApiModel.cs create mode 100644 NadekoBot.Core/Modules/Searches/Common/WoWJoke.cs create mode 100644 NadekoBot.Core/Modules/Searches/Exceptions/TagBlacklistedException.cs create mode 100644 NadekoBot.Core/Modules/Searches/FeedCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/JokeCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/LoLCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/MemegenCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/OsuCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/OverwatchCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/PlaceCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/PokemonSearchCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/Searches.cs create mode 100644 NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs create mode 100644 NadekoBot.Core/Modules/Searches/Services/FeedsService.cs create mode 100644 NadekoBot.Core/Modules/Searches/Services/SearchesService.cs create mode 100644 NadekoBot.Core/Modules/Searches/Services/StreamNotificationService.cs create mode 100644 NadekoBot.Core/Modules/Searches/StreamNotificationCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/TranslatorCommands.cs create mode 100644 NadekoBot.Core/Modules/Searches/XkcdCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/BotConfigCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/CalcCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/CommandMapCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonData.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonUser.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/RepeatRunner.cs create mode 100644 NadekoBot.Core/Modules/Utility/Common/StreamRoleListType.cs create mode 100644 NadekoBot.Core/Modules/Utility/Extensions/StreamRoleExtensions.cs create mode 100644 NadekoBot.Core/Modules/Utility/InfoCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/NadekoBot.Modules.Searches.csproj create mode 100644 NadekoBot.Core/Modules/Utility/PatreonCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/QuoteCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/RemindCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/RepeatCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/ConverterService.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/MessageRepeaterService.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/PatreonRewardsService.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/RemindService.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/StreamRoleService.cs create mode 100644 NadekoBot.Core/Modules/Utility/Services/VerboseErrorsService.cs create mode 100644 NadekoBot.Core/Modules/Utility/StreamRoleCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/UnitConversionCommands.cs create mode 100644 NadekoBot.Core/Modules/Utility/Utility.cs create mode 100644 NadekoBot.Core/Modules/Utility/VerboseErrorCommands.cs create mode 100644 NadekoBot.Core/Modules/Xp/Club.cs create mode 100644 NadekoBot.Core/Modules/Xp/Common/FullUserStats.cs create mode 100644 NadekoBot.Core/Modules/Xp/Common/LevelStats.cs create mode 100644 NadekoBot.Core/Modules/Xp/Extensions/Extensions.cs create mode 100644 NadekoBot.Core/Modules/Xp/Services/ClubService.cs create mode 100644 NadekoBot.Core/Modules/Xp/Services/UserCacheItem.cs create mode 100644 NadekoBot.Core/Modules/Xp/Services/XpService.cs create mode 100644 NadekoBot.Core/Modules/Xp/Xp.cs delete mode 100644 NadekoBot.Core/Services/Database/Models/ClashCaller.cs delete mode 100644 NadekoBot.Core/Services/Database/Models/ClashWar.cs delete mode 100644 NadekoBot.Core/Services/Database/Repositories/IClashOfClansRepository.cs delete mode 100644 NadekoBot.Core/Services/Database/Repositories/Impl/ClashOfClansRepository.cs delete mode 100644 docs/guides/Upgrading Guide.md diff --git a/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs new file mode 100644 index 00000000..94bdf200 --- /dev/null +++ b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs @@ -0,0 +1,1925 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; +using System; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + [Migration("20171013055008_clear-and-loadedpackage")] + partial class clearandloadedpackage + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.Property("UserThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AntiSpamSettingId"); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("MessageThreshold"); + + b.Property("MuteTime"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("BlacklistItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("BotConfigId1"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("BotConfigId1"); + + b.ToTable("BlockedCmdOrMdl"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BetflipMultiplier"); + + b.Property("Betroll100Multiplier"); + + b.Property("Betroll67Multiplier"); + + b.Property("Betroll91Multiplier"); + + b.Property("BufferSize"); + + b.Property("CurrencyDropAmount"); + + b.Property("CurrencyDropAmountMax"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("CustomReactionsStartWith"); + + b.Property("DMHelpString"); + + b.Property("DateAdded"); + + b.Property("DefaultPrefix"); + + b.Property("ErrorColor"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("Locale"); + + b.Property("MigrationVersion"); + + b.Property("MinimumBetAmount"); + + b.Property("OkColor"); + + b.Property("PermissionVersion"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.Property("TriviaCurrencyReward"); + + b.Property("XpMinutesTimeout") + .ValueGeneratedOnAdd() + .HasDefaultValue(5); + + b.Property("XpPerMessage") + .ValueGeneratedOnAdd() + .HasDefaultValue(3); + + b.HasKey("Id"); + + b.ToTable("BotConfig"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubApplicants"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubBans"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Discrim"); + + b.Property("ImageUrl"); + + b.Property("MinimumLevelReq"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20); + + b.Property("OwnerId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasAlternateKey("Name", "Discrim"); + + b.HasIndex("OwnerId") + .IsUnique(); + + b.ToTable("Clubs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Mapping"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandAlias"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("Price") + .IsUnique(); + + b.ToTable("CommandPrice"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("InternalTrigger"); + + b.Property("Modifier"); + + b.Property("UnitType"); + + b.HasKey("Id"); + + b.ToTable("ConversionUnits"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Currency"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoDeleteTrigger"); + + b.Property("ContainsAnywhere"); + + b.Property("DateAdded"); + + b.Property("DmResponse"); + + b.Property("GuildId"); + + b.Property("IsRegex"); + + b.Property("OwnerOnly"); + + b.Property("Response"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.ToTable("CustomReactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AvatarId"); + + b.Property("ClubId"); + + b.Property("DateAdded"); + + b.Property("Discriminator"); + + b.Property("IsClubAdmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)); + + b.Property("LastXpGain"); + + b.Property("NotifyOnLevelUp"); + + b.Property("TotalXp"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.HasIndex("ClubId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Donators"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("EightBallResponses"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("ItemType"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId"); + + b.ToTable("ExcludedItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Url") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildConfigId", "Url"); + + b.ToTable("FeedSub"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildConfigId1"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.HasIndex("GuildConfigId1"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Word"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Type"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoAssignRoleId"); + + b.Property("AutoDeleteByeMessages"); + + b.Property("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DateAdded"); + + b.Property("DefaultMusicVolume"); + + b.Property("DeleteMessageOnCommand"); + + b.Property("DmGreetMessageText"); + + b.Property("ExclusiveSelfAssignedRoles"); + + b.Property("FilterInvites"); + + b.Property("FilterWords"); + + b.Property("GameVoiceChannel"); + + b.Property("GreetMessageChannelId"); + + b.Property("GuildId"); + + b.Property("Locale"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("Prefix"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("TimeZoneId"); + + b.Property("VerboseErrors"); + + b.Property("VerbosePermissions"); + + b.Property("VoicePlusTextEnabled"); + + b.Property("WarningsInitialized"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("LogSettingId"); + + b.HasIndex("RootPermissionId"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.Property("StartTimeOfDay"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GuildRepeater"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredVoicePresenceCHannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("LoadedPackages"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelCreated"); + + b.Property("ChannelCreatedId"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelDestroyedId"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("ChannelUpdatedId"); + + b.Property("DateAdded"); + + b.Property("IsLogging"); + + b.Property("LogOtherId"); + + b.Property("LogUserPresence"); + + b.Property("LogUserPresenceId"); + + b.Property("LogVoicePresence"); + + b.Property("LogVoicePresenceId"); + + b.Property("LogVoicePresenceTTSId"); + + b.Property("MessageDeleted"); + + b.Property("MessageDeletedId"); + + b.Property("MessageUpdated"); + + b.Property("MessageUpdatedId"); + + b.Property("UserBanned"); + + b.Property("UserBannedId"); + + b.Property("UserJoined"); + + b.Property("UserJoinedId"); + + b.Property("UserLeft"); + + b.Property("UserLeftId"); + + b.Property("UserMutedId"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUnbannedId"); + + b.Property("UserUpdated"); + + b.Property("UserUpdatedId"); + + b.Property("VoicePresenceChannelId"); + + b.HasKey("Id"); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Tag"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("NsfwBlacklitedTag"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NextId"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("NextId") + .IsUnique(); + + b.ToTable("Permission"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("Permissionv2"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("PlayingStatus"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("MusicPlaylistId"); + + b.Property("Provider"); + + b.Property("ProviderType"); + + b.Property("Query"); + + b.Property("Title"); + + b.Property("Uri"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("AuthorName") + .IsRequired(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("Keyword") + .IsRequired(); + + b.Property("Text") + .IsRequired(); + + b.HasKey("Id"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Icon"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("RaceAnimals"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("IsPrivate"); + + b.Property("Message"); + + b.Property("ServerId"); + + b.Property("UserId"); + + b.Property("When"); + + b.HasKey("Id"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AmountRewardedThisMonth"); + + b.Property("DateAdded"); + + b.Property("LastReward"); + + b.Property("PatreonUserId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("RewardedUsers"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("Name"); + + b.Property("Price"); + + b.Property("RoleId"); + + b.Property("RoleName"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("ShopEntry"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ShopEntryId"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("ShopEntryId"); + + b.ToTable("ShopEntryItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredRole"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ChannelId"); + + b.Property("ChannelName"); + + b.Property("CommandText"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("GuildName"); + + b.Property("Index"); + + b.Property("VoiceChannelId"); + + b.Property("VoiceChannelName"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("StartupCommand"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleBlacklistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AddRoleId"); + + b.Property("DateAdded"); + + b.Property("Enabled"); + + b.Property("FromRoleId"); + + b.Property("GuildConfigId"); + + b.Property("Keyword"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("StreamRoleSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleWhitelistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UnmuteAt"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnmuteTimer"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.Property("type"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("PokeGame"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AwardedXp"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); + + b.Property("NotifyOnLevelUp"); + + b.Property("UserId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "GuildId") + .IsUnique(); + + b.ToTable("UserXpStats"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.Property("VoiceChannelId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("VcRoleInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AffinityId"); + + b.Property("ClaimerId"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.Property("WaifuId"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Item"); + + b.Property("ItemEmoji"); + + b.Property("Price"); + + b.Property("WaifuInfoId"); + + b.HasKey("Id"); + + b.HasIndex("WaifuInfoId"); + + b.ToTable("WaifuItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NewId"); + + b.Property("OldId"); + + b.Property("UpdateType"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Forgiven"); + + b.Property("ForgivenBy"); + + b.Property("GuildId"); + + b.Property("Moderator"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("Warnings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Count"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Punishment"); + + b.Property("Time"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("WarningPunishment"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Level"); + + b.Property("RoleId"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); + + b.ToTable("XpRoleReward"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("NotifyMessage"); + + b.Property("ServerExcluded"); + + b.Property("XpRoleRewardExclusive"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("XpSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("Blacklist") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedCommands") + .HasForeignKey("BotConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedModules") + .HasForeignKey("BotConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("CommandPrices") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Users") + .HasForeignKey("ClubId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("EightBallResponses") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") + .WithMany() + .HasForeignKey("RootPermissionId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GuildRepeaters") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredVoicePresenceChannelIds") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("LoadedPackages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("NsfwBlacklistedTags") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") + .WithOne("Previous") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("Permissions") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RotatingStatusMessages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RaceAnimals") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") + .WithMany("Items") + .HasForeignKey("ShopEntryId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("StartupCommands") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs new file mode 100644 index 00000000..a120354b --- /dev/null +++ b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs @@ -0,0 +1,129 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; +using System.Collections.Generic; + +namespace NadekoBot.Migrations +{ + public partial class clearandloadedpackage : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ClashCallers"); + + migrationBuilder.DropTable( + name: "ModulePrefixes"); + + migrationBuilder.DropTable( + name: "ClashOfClans"); + + migrationBuilder.CreateTable( + name: "LoadedPackages", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + BotConfigId = table.Column(type: "INTEGER", nullable: true), + DateAdded = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_LoadedPackages", x => x.Id); + table.ForeignKey( + name: "FK_LoadedPackages_BotConfig_BotConfigId", + column: x => x.BotConfigId, + principalTable: "BotConfig", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_LoadedPackages_BotConfigId", + table: "LoadedPackages", + column: "BotConfigId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "LoadedPackages"); + + migrationBuilder.CreateTable( + name: "ClashOfClans", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + ChannelId = table.Column(nullable: false), + DateAdded = table.Column(nullable: true), + EnemyClan = table.Column(nullable: true), + GuildId = table.Column(nullable: false), + Size = table.Column(nullable: false), + StartedAt = table.Column(nullable: false), + WarState = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClashOfClans", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ModulePrefixes", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + BotConfigId = table.Column(nullable: true), + DateAdded = table.Column(nullable: true), + ModuleName = table.Column(nullable: true), + Prefix = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ModulePrefixes", x => x.Id); + table.ForeignKey( + name: "FK_ModulePrefixes_BotConfig_BotConfigId", + column: x => x.BotConfigId, + principalTable: "BotConfig", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "ClashCallers", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + BaseDestroyed = table.Column(nullable: false), + CallUser = table.Column(nullable: true), + ClashWarId = table.Column(nullable: false), + DateAdded = table.Column(nullable: true), + SequenceNumber = table.Column(nullable: true), + Stars = table.Column(nullable: false), + TimeAdded = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClashCallers", x => x.Id); + table.ForeignKey( + name: "FK_ClashCallers_ClashOfClans_ClashWarId", + column: x => x.ClashWarId, + principalTable: "ClashOfClans", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_ClashCallers_ClashWarId", + table: "ClashCallers", + column: "ClashWarId"); + + migrationBuilder.CreateIndex( + name: "IX_ModulePrefixes_BotConfigId", + table: "ModulePrefixes", + column: "BotConfigId"); + } + } +} diff --git a/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs index 5de0bc1b..292ec018 100644 --- a/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -200,56 +200,6 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("BaseDestroyed"); - - b.Property("CallUser"); - - b.Property("ClashWarId"); - - b.Property("DateAdded"); - - b.Property("SequenceNumber"); - - b.Property("Stars"); - - b.Property("TimeAdded"); - - b.HasKey("Id"); - - b.HasIndex("ClashWarId"); - - b.ToTable("ClashCallers"); - }); - - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ChannelId"); - - b.Property("DateAdded"); - - b.Property("EnemyClan"); - - b.Property("GuildId"); - - b.Property("Size"); - - b.Property("StartedAt"); - - b.Property("WarState"); - - b.HasKey("Id"); - - b.ToTable("ClashOfClans"); - }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -800,6 +750,24 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("LoadedPackages"); + }); + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") @@ -874,26 +842,6 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("BotConfigId"); - - b.Property("DateAdded"); - - b.Property("ModuleName"); - - b.Property("Prefix"); - - b.HasKey("Id"); - - b.HasIndex("BotConfigId"); - - b.ToTable("ModulePrefixes"); - }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") @@ -1633,14 +1581,6 @@ namespace NadekoBot.Migrations .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => - { - b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") - .WithMany("Bases") - .HasForeignKey("ClashWarId") - .OnDelete(DeleteBehavior.Cascade); - }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") @@ -1789,10 +1729,10 @@ namespace NadekoBot.Migrations .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => { b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") - .WithMany("ModulePrefixes") + .WithMany("LoadedPackages") .HasForeignKey("BotConfigId"); }); diff --git a/NadekoBot.Core/Modules/Administration/Common/Migration/0_9..cs b/NadekoBot.Core/Modules/Administration/Common/Migration/0_9..cs deleted file mode 100644 index b7e2bc0a..00000000 --- a/NadekoBot.Core/Modules/Administration/Common/Migration/0_9..cs +++ /dev/null @@ -1,195 +0,0 @@ -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; - -namespace NadekoBot.Modules.Administration.Common.Migration -{ - public class CommandPrefixes0_9 - { - public string Administration { get; set; } - public string Searches { get; set; } - public string NSFW { get; set; } - public string Conversations { get; set; } - public string ClashOfClans { get; set; } - public string Help { get; set; } - public string Music { get; set; } - public string Trello { get; set; } - public string Games { get; set; } - public string Gambling { get; set; } - public string Permissions { get; set; } - public string Programming { get; set; } - public string Pokemon { get; set; } - public string Utility { get; set; } - } - - public class Config0_9 - { - public bool DontJoinServers { get; set; } - public bool ForwardMessages { get; set; } - public bool ForwardToAllOwners { get; set; } - public bool IsRotatingStatus { get; set; } - public int BufferSize { get; set; } - public List RaceAnimals { get; set; } - public string RemindMessageFormat { get; set; } - public Dictionary> CustomReactions { get; set; } - public List RotatingStatuses { get; set; } - public CommandPrefixes0_9 CommandPrefixes { get; set; } - public List ServerBlacklist { get; set; } - public List ChannelBlacklist { get; set; } - public List UserBlacklist { get; set; } - public List _8BallResponses { get; set; } - public string CurrencySign { get; set; } - public string CurrencyName { get; set; } - public string DMHelpString { get; set; } - public string HelpString { get; set; } - } - - /// - /// Holds a permission list - /// - public class Permissions - { - /// - /// Name of the parent object whose permissions these are - /// - public string Name { get; set; } - /// - /// Module name with allowed/disallowed - /// - public ConcurrentDictionary Modules { get; set; } - /// - /// Command name with allowed/disallowed - /// - public ConcurrentDictionary Commands { get; set; } - /// - /// Should the bot filter invites to other discord servers (and ref links in the future) - /// - public bool FilterInvites { get; set; } - /// - /// Should the bot filter words which are specified in the Words hashset - /// - public bool FilterWords { get; set; } - - public Permissions(string name) - { - Name = name; - Modules = new ConcurrentDictionary(); - Commands = new ConcurrentDictionary(); - FilterInvites = false; - FilterWords = false; - } - - public void CopyFrom(Permissions other) - { - Modules.Clear(); - foreach (var mp in other.Modules) - Modules.AddOrUpdate(mp.Key, mp.Value, (s, b) => mp.Value); - Commands.Clear(); - foreach (var cp in other.Commands) - Commands.AddOrUpdate(cp.Key, cp.Value, (s, b) => cp.Value); - FilterInvites = other.FilterInvites; - FilterWords = other.FilterWords; - } - - public override string ToString() - { - var toReturn = ""; - var bannedModules = Modules.Where(kvp => kvp.Value == false); - var bannedModulesArray = bannedModules as KeyValuePair[] ?? bannedModules.ToArray(); - if (bannedModulesArray.Any()) - { - toReturn += "`Banned Modules:`\n"; - toReturn = bannedModulesArray.Aggregate(toReturn, (current, m) => current + $"\t`[x] {m.Key}`\n"); - } - var bannedCommands = Commands.Where(kvp => kvp.Value == false); - var bannedCommandsArr = bannedCommands as KeyValuePair[] ?? bannedCommands.ToArray(); - if (bannedCommandsArr.Any()) - { - toReturn += "`Banned Commands:`\n"; - toReturn = bannedCommandsArr.Aggregate(toReturn, (current, c) => current + $"\t`[x] {c.Key}`\n"); - } - return toReturn; - } - } - - public class ServerPermissions0_9 - { - /// - /// The guy who can edit the permissions - /// - public string PermissionsControllerRole { get; set; } - /// - /// Does it print the error when a restriction occurs - /// - public bool Verbose { get; set; } - /// - /// The id of the thing (user/server/channel) - /// - public ulong Id { get; set; } //a string because of the role name. - /// - /// Permission object bound to the id of something/role name - /// - public Permissions Permissions { get; set; } - /// - /// Banned words, usually profanities, like word "java" - /// - public HashSet Words { get; set; } - - public Dictionary UserPermissions { get; set; } - public Dictionary ChannelPermissions { get; set; } - public Dictionary RolePermissions { get; set; } - /// - /// Dictionary of command names with their respective cooldowns - /// - public ConcurrentDictionary CommandCooldowns { get; set; } - - public ServerPermissions0_9(ulong id, string name) - { - Id = id; - PermissionsControllerRole = "Nadeko"; - Verbose = true; - - Permissions = new Permissions(name); - Permissions.Modules.TryAdd("NSFW", false); - UserPermissions = new Dictionary(); - ChannelPermissions = new Dictionary(); - RolePermissions = new Dictionary(); - CommandCooldowns = new ConcurrentDictionary(); - Words = new HashSet(); - } - } - - public class ServerSpecificConfig - { - public bool VoicePlusTextEnabled { get; set; } - public bool SendPrivateMessageOnMention { get; set; } - public ulong? LogChannel { get; set; } = null; - public ulong? LogPresenceChannel { get; set; } = null; - public HashSet LogserverIgnoreChannels { get; set; } - public ConcurrentDictionary VoiceChannelLog { get; set; } - public HashSet ListOfSelfAssignableRoles { get; set; } - public ulong AutoAssignedRole { get; set; } - public ConcurrentDictionary GenerateCurrencyChannels { get; set; } - public bool AutoDeleteMessagesOnCommand { get; set; } - public bool ExclusiveSelfAssignedRoles { get; set; } - public float DefaultMusicVolume { get; set; } - public HashSet ObservingStreams { get; set; } - } - - public class StreamNotificationConfig0_9 - { - public string Username { get; set; } - public StreamType Type { get; set; } - public ulong ServerId { get; set; } - public ulong ChannelId { get; set; } - public bool LastStatus { get; set; } - - public enum StreamType - { - Twitch, - Beam, - Hitbox, - YoutubeGaming - } - } -} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Administration/Common/Migration/MigrationException.cs b/NadekoBot.Core/Modules/Administration/Common/Migration/MigrationException.cs deleted file mode 100644 index 639ff5bc..00000000 --- a/NadekoBot.Core/Modules/Administration/Common/Migration/MigrationException.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace NadekoBot.Modules.Administration.Common.Migration -{ - public class MigrationException : Exception - { - - } -} diff --git a/NadekoBot.Core/Modules/Administration/MigrationCommands.cs b/NadekoBot.Core/Modules/Administration/MigrationCommands.cs deleted file mode 100644 index 2e1b2092..00000000 --- a/NadekoBot.Core/Modules/Administration/MigrationCommands.cs +++ /dev/null @@ -1,381 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Discord.Commands; -using NadekoBot.Core.Services; -using NadekoBot.Core.Services.Database.Models; -using Newtonsoft.Json; -using System.Collections.Concurrent; -using NadekoBot.Extensions; -using NadekoBot.Core.Services.Database; -using Microsoft.Data.Sqlite; -using NadekoBot.Common.Attributes; -using NadekoBot.Common.Collections; -using NadekoBot.Modules.Administration.Common.Migration; - -namespace NadekoBot.Modules.Administration -{ - public partial class Administration - { - [Group] - public class MigrationCommands : NadekoSubmodule - { - private const int CURRENT_VERSION = 1; - private readonly DbService _db; - - public MigrationCommands(DbService db) - { - _db = db; - } - - [NadekoCommand, Usage, Description, Aliases] - [OwnerOnly] - public async Task MigrateData() - { - var version = 0; - using (var uow = _db.UnitOfWork) - { - version = uow.BotConfig.GetOrCreate().MigrationVersion; - } - try - { - for (var i = version; i < CURRENT_VERSION; i++) - { - switch (i) - { - case 0: - Migrate0_9To1_0(); - break; - } - } - await ReplyConfirmLocalized("migration_done").ConfigureAwait(false); - } - catch (Exception ex) - { - _log.Error(ex); - await ReplyErrorLocalized("migration_error").ConfigureAwait(false); - } - } - - private void Migrate0_9To1_0() - { - using (var uow = _db.UnitOfWork) - { - var botConfig = uow.BotConfig.GetOrCreate(); - MigrateConfig0_9(uow, botConfig); - MigratePermissions0_9(uow); - MigrateServerSpecificConfigs0_9(uow); - MigrateDb0_9(uow); - - //NOW save it - _log.Warn("Writing to disc"); - uow.Complete(); - botConfig.MigrationVersion = 1; - } - } - - private void MigrateDb0_9(IUnitOfWork uow) - { - var db = new SqliteConnection("Data Source=data/nadekobot.sqlite"); - - if (!File.Exists("data/nadekobot.sqlite")) - { - _log.Warn("No data from the old database will be migrated."); - return; - } - db.Open(); - - var com = db.CreateCommand(); - var i = 0; - try - { - com.CommandText = "SELECT * FROM Announcement"; - - var reader = com.ExecuteReader(); - while (reader.Read()) - { - var gid = (ulong)(long)reader["ServerId"]; - var greet = (long)reader["Greet"] == 1; - var greetDM = (long)reader["GreetPM"] == 1; - var greetChannel = (ulong)(long)reader["GreetChannelId"]; - var greetMsg = (string)reader["GreetText"]; - var bye = (long)reader["Bye"] == 1; - var byeChannel = (ulong)(long)reader["ByeChannelId"]; - var byeMsg = (string)reader["ByeText"]; - var gc = uow.GuildConfigs.For(gid, set => set); - - if (greetDM) - gc.SendDmGreetMessage = greet; - else - gc.SendChannelGreetMessage = greet; - gc.GreetMessageChannelId = greetChannel; - gc.ChannelGreetMessageText = greetMsg; - - gc.SendChannelByeMessage = bye; - gc.ByeMessageChannelId = byeChannel; - gc.ChannelByeMessageText = byeMsg; - - _log.Info(++i); - } - } - catch { - _log.Warn("Greet/bye messages won't be migrated"); - } - var com2 = db.CreateCommand(); - com2.CommandText = "SELECT * FROM CurrencyState GROUP BY UserId"; - - i = 0; - try - { - var reader2 = com2.ExecuteReader(); - while (reader2.Read()) - { - _log.Info(++i); - var curr = new Currency() - { - Amount = (long)reader2["Value"], - UserId = (ulong)(long)reader2["UserId"] - }; - uow.Currency.Add(curr); - } - } - catch - { - _log.Warn("Currency won't be migrated"); - } - db.Close(); - try { File.Move("data/nadekobot.sqlite", "data/DELETE_ME_nadekobot.sqlite"); } catch { } - } - - private void MigrateServerSpecificConfigs0_9(IUnitOfWork uow) - { - const string specificConfigsPath = "data/ServerSpecificConfigs.json"; - - if (!File.Exists(specificConfigsPath)) - { - _log.Warn($"No data from {specificConfigsPath} will be migrated."); - return; - } - - var configs = new ConcurrentDictionary(); - try - { - configs = JsonConvert - .DeserializeObject>( - File.ReadAllText(specificConfigsPath), new JsonSerializerSettings() - { - Error = (s, e) => - { - if (e.ErrorContext.Member.ToString() == "GenerateCurrencyChannels") - { - e.ErrorContext.Handled = true; - } - } - }); - } - catch (Exception ex) - { - _log.Warn(ex, "ServerSpecificConfig deserialization failed"); - return; - } - var i = 0; - var selfAssRoles = new ConcurrentHashSet(); - configs - .Select(p => new { data = p.Value, gconfig = uow.GuildConfigs.For(p.Key) }) - .AsParallel() - .ForAll(config => - { - try - { - var guildConfig = config.gconfig; - var data = config.data; - - guildConfig.AutoAssignRoleId = data.AutoAssignedRole; - guildConfig.DeleteMessageOnCommand = data.AutoDeleteMessagesOnCommand; - guildConfig.DefaultMusicVolume = data.DefaultMusicVolume; - guildConfig.ExclusiveSelfAssignedRoles = data.ExclusiveSelfAssignedRoles; - guildConfig.GenerateCurrencyChannelIds = new HashSet(data.GenerateCurrencyChannels.Select(gc => new GCChannelId() { ChannelId = gc.Key })); - selfAssRoles.AddRange(data.ListOfSelfAssignableRoles.Select(r => new SelfAssignedRole() { GuildId = guildConfig.GuildId, RoleId = r }).ToArray()); - guildConfig.LogSetting.IgnoredChannels = new HashSet(data.LogserverIgnoreChannels.Select(id => new IgnoredLogChannel() { ChannelId = id })); - - guildConfig.LogSetting.LogUserPresenceId = data.LogPresenceChannel; - - - guildConfig.FollowedStreams = new HashSet(data.ObservingStreams.Select(x => - { - FollowedStream.FollowedStreamType type = FollowedStream.FollowedStreamType.Twitch; - switch (x.Type) - { - case StreamNotificationConfig0_9.StreamType.Twitch: - type = FollowedStream.FollowedStreamType.Twitch; - break; - case StreamNotificationConfig0_9.StreamType.Beam: - type = FollowedStream.FollowedStreamType.Mixer; - break; - case StreamNotificationConfig0_9.StreamType.Hitbox: - type = FollowedStream.FollowedStreamType.Smashcast; - break; - default: - break; - } - - return new FollowedStream() - { - ChannelId = x.ChannelId, - GuildId = guildConfig.GuildId, - Username = x.Username.ToLowerInvariant(), - Type = type - }; - })); - guildConfig.VoicePlusTextEnabled = data.VoicePlusTextEnabled; - _log.Info("Migrating SpecificConfig for {0} done ({1})", guildConfig.GuildId, ++i); - } - catch (Exception ex) - { - _log.Error(ex); - } - }); - uow.SelfAssignedRoles.AddRange(selfAssRoles.ToArray()); - try { File.Move("data/ServerSpecificConfigs.json", "data/DELETE_ME_ServerSpecificCOnfigs.json"); } catch { } - } - - private void MigratePermissions0_9(IUnitOfWork uow) - { - var permissionsDict = new ConcurrentDictionary(); - if (!Directory.Exists("data/permissions/")) - { - _log.Warn("No data from permissions will be migrated."); - return; - } - foreach (var file in Directory.EnumerateFiles("data/permissions/")) - { - try - { - var strippedFileName = Path.GetFileNameWithoutExtension(file); - if (string.IsNullOrWhiteSpace(strippedFileName)) continue; - var id = ulong.Parse(strippedFileName); - var data = JsonConvert.DeserializeObject(File.ReadAllText(file)); - permissionsDict.TryAdd(id, data); - } - catch - { - // ignored - } - } - var i = 0; - permissionsDict - .Select(p => new { data = p.Value, gconfig = uow.GuildConfigs.For(p.Key) }) - .AsParallel() - .ForAll(perms => - { - try - { - var data = perms.data; - var gconfig = perms.gconfig; - - gconfig.PermissionRole = data.PermissionsControllerRole; - gconfig.VerbosePermissions = data.Verbose; - gconfig.FilteredWords = new HashSet(data.Words.Select(w => w.ToLowerInvariant()) - .Distinct() - .Select(w => new FilteredWord() { Word = w })); - gconfig.FilterWords = data.Permissions.FilterWords; - gconfig.FilterInvites = data.Permissions.FilterInvites; - - gconfig.FilterInvitesChannelIds = new HashSet(); - gconfig.FilterInvitesChannelIds.AddRange(data.ChannelPermissions.Where(kvp => kvp.Value.FilterInvites) - .Select(cp => new FilterChannelId() - { - ChannelId = cp.Key - })); - - gconfig.FilterWordsChannelIds = new HashSet(); - gconfig.FilterWordsChannelIds.AddRange(data.ChannelPermissions.Where(kvp => kvp.Value.FilterWords) - .Select(cp => new FilterChannelId() - { - ChannelId = cp.Key - })); - - gconfig.CommandCooldowns = new HashSet(data.CommandCooldowns - .Where(cc => !string.IsNullOrWhiteSpace(cc.Key) && cc.Value > 0) - .Select(cc => new CommandCooldown() - { - CommandName = cc.Key, - Seconds = cc.Value - })); - _log.Info("Migrating data from permissions folder for {0} done ({1})", gconfig.GuildId, ++i); - } - catch (Exception ex) - { - _log.Error(ex); - } - }); - - try { Directory.Move("data/permissions", "data/DELETE_ME_permissions"); } catch { } - - } - - private void MigrateConfig0_9(IUnitOfWork uow, BotConfig botConfig) - { - Config0_9 oldConfig; - const string configPath = "data/config.json"; - try - { - oldConfig = JsonConvert.DeserializeObject(File.ReadAllText(configPath)); - } - catch (FileNotFoundException) - { - _log.Warn("config.json not found"); - return; - } - catch (Exception) - { - _log.Error("Unknown error while deserializing file config.json, pls check its integrity, aborting migration"); - throw new MigrationException(); - } - - //Basic - botConfig.ForwardMessages = oldConfig.ForwardMessages; - botConfig.ForwardToAllOwners = oldConfig.ForwardToAllOwners; - botConfig.BufferSize = (ulong)oldConfig.BufferSize; - botConfig.RemindMessageFormat = oldConfig.RemindMessageFormat; - botConfig.CurrencySign = oldConfig.CurrencySign; - botConfig.CurrencyName = oldConfig.CurrencyName; - botConfig.DMHelpString = oldConfig.DMHelpString; - botConfig.HelpString = oldConfig.HelpString; - - //messages - botConfig.RotatingStatuses = oldConfig.IsRotatingStatus; - var messages = new List(); - - oldConfig.RotatingStatuses.ForEach(i => messages.Add(new PlayingStatus { Status = i })); - botConfig.RotatingStatusMessages = messages; - - //Blacklist - var blacklist = new HashSet(oldConfig.ServerBlacklist.Select(server => new BlacklistItem() { ItemId = server, Type = BlacklistType.Server })); - blacklist.AddRange(oldConfig.ChannelBlacklist.Select(channel => new BlacklistItem() { ItemId = channel, Type = BlacklistType.Channel })); - blacklist.AddRange(oldConfig.UserBlacklist.Select(user => new BlacklistItem() { ItemId = user, Type = BlacklistType.User })); - botConfig.Blacklist = blacklist; - - //Eightball - botConfig.EightBallResponses = new HashSet(oldConfig._8BallResponses.Select(response => new EightBallResponse() { Text = response })); - - //customreactions - uow.CustomReactions.AddRange(oldConfig.CustomReactions.SelectMany(cr => - { - return cr.Value.Select(res => new CustomReaction() - { - GuildId = null, - IsRegex = false, - OwnerOnly = false, - Response = res, - Trigger = cr.Key.ToLowerInvariant(), - }); - }).ToArray()); - - try { File.Move(configPath, "./data/DELETE_ME_config.json"); } catch { } - } - } - } -} diff --git a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs index 71c3b835..251d218c 100644 --- a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs @@ -1,91 +1,91 @@ -using Discord.Commands; -using NadekoBot.Common.Attributes; -using NadekoBot.Modules.Administration.Services; -using NadekoBot.Extensions; -using System; -using System.IO; -using System.Reflection; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Linq; +//using Discord.Commands; +//using NadekoBot.Common.Attributes; +//using NadekoBot.Modules.Administration.Services; +//using NadekoBot.Extensions; +//using System; +//using System.IO; +//using System.Reflection; +//using System.Text.RegularExpressions; +//using System.Threading.Tasks; +//using System.Linq; -namespace NadekoBot.Modules.Administration -{ - public partial class Administration - { - [Group] - public class PackagesCommands : NadekoSubmodule - { - private readonly NadekoBot _bot; +//namespace NadekoBot.Modules.Administration +//{ +// public partial class Administration +// { +// [Group] +// public class PackagesCommands : NadekoSubmodule +// { +// private readonly NadekoBot _bot; - public PackagesCommands(NadekoBot bot) - { - _bot = bot; - } +// public PackagesCommands(NadekoBot bot) +// { +// _bot = bot; +// } - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - public async Task PackageList() - { - _service.ReloadAvailablePackages(); - await Context.Channel.SendConfirmAsync( - string.Join( - "\n", - _service.Packages - .Select(x => _bot.LoadedPackages.Contains(x) - ? "✅ " + x - : x))); - } +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// public async Task PackageList() +// { +// _service.ReloadAvailablePackages(); +// await Context.Channel.SendConfirmAsync( +// string.Join( +// "\n", +// _service.Packages +// .Select(x => _bot.LoadedPackages.Contains(x) +// ? "【✘】" + x +// : "【 】" + x))); +// } - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task PackageUnload(string name) - { - if (name.Contains(":") || name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) - return; - name = name.ToTitleCase(); - var package = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, - "modules", - $"NadekoBot.Modules.{name}", - $"NadekoBot.Modules.{name}.dll")); +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// [OwnerOnly] +// public async Task PackageUnload(string name) +// { +// if (name.Contains(":") || name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) +// return; +// name = name.ToTitleCase(); +// var package = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, +// "modules", +// $"NadekoBot.Modules.{name}", +// $"NadekoBot.Modules.{name}.dll")); - await _bot.UnloadPackage(name).ConfigureAwait(false); - await ReplyAsync(":ok:"); - } +// await _bot.UnloadPackage(name).ConfigureAwait(false); +// await ReplyAsync(":ok:"); +// } - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task PackageLoad(string name) - { - if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) - return; - name = name.ToTitleCase(); +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// [OwnerOnly] +// public async Task PackageLoad(string name) +// { +// if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) +// return; +// name = name.ToTitleCase(); - if (await _bot.LoadPackage(name)) - await ReplyAsync(":ok:"); - else - await ReplyAsync(":x:"); - } +// if (await _bot.LoadPackage(name)) +// await ReplyAsync(":ok:"); +// else +// await ReplyAsync(":x:"); +// } - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task PackageReload(string name) - { - if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) - return; - name = name.ToTitleCase(); +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// [OwnerOnly] +// public async Task PackageReload(string name) +// { +// if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) +// return; +// name = name.ToTitleCase(); - if (await _bot.UnloadPackage(name)) - { - await _bot.LoadPackage(name); - await ReplyAsync(":ok:"); - } - else - await ReplyAsync(":x:"); - } - } - } -} +// if (await _bot.UnloadPackage(name)) +// { +// await _bot.LoadPackage(name); +// await ReplyAsync(":ok:"); +// } +// else +// await ReplyAsync(":x:"); +// } +// } +// } +//} diff --git a/NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs b/NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs new file mode 100644 index 00000000..b5c130bf --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs @@ -0,0 +1,172 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; +using NadekoBot.Modules.Gambling.Common.AnimalRacing; +using NadekoBot.Modules.Gambling.Services; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class AnimalRacingCommands : NadekoSubmodule + { + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + private readonly DiscordSocketClient _client; + + public AnimalRacingCommands(IBotConfigProvider bc, CurrencyService cs, DiscordSocketClient client) + { + _bc = bc; + _cs = cs; + _client = client; + } + + private IUserMessage raceMessage = null; + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public Task Race() + { + var ar = new AnimalRace(_cs, _bc.BotConfig.RaceAnimals.Shuffle().ToArray()); + if (!_service.AnimalRaces.TryAdd(Context.Guild.Id, ar)) + return Context.Channel.SendErrorAsync(GetText("animal_race"), GetText("animal_race_already_started")); + + ar.Initialize(); + + var count = 0; + Task _client_MessageReceived(SocketMessage arg) + { + var _ = Task.Run(() => { + try + { + if (arg.Channel.Id == Context.Channel.Id) + { + if (ar.CurrentPhase == AnimalRace.Phase.Running && ++count % 9 == 0) + { + raceMessage = null; + } + } + } + catch { } + }); + return Task.CompletedTask; + } + + Task Ar_OnEnded(AnimalRace race) + { + _client.MessageReceived -= _client_MessageReceived; + _service.AnimalRaces.TryRemove(Context.Guild.Id, out _); + var winner = race.FinishedUsers[0]; + if (race.FinishedUsers[0].Bet > 0) + { + return Context.Channel.SendConfirmAsync(GetText("animal_race"), + GetText("animal_race_won_money", Format.Bold(winner.Username), + winner.Animal.Icon, (race.FinishedUsers[0].Bet * (race.Users.Length - 1)) + _bc.BotConfig.CurrencySign)); + } + else + { + return Context.Channel.SendConfirmAsync(GetText("animal_race"), + GetText("animal_race_won", Format.Bold(winner.Username), winner.Animal.Icon)); + } + } + + ar.OnStartingFailed += Ar_OnStartingFailed; + ar.OnStateUpdate += Ar_OnStateUpdate; + ar.OnEnded += Ar_OnEnded; + ar.OnStarted += Ar_OnStarted; + _client.MessageReceived += _client_MessageReceived; + + return Context.Channel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_starting"), + footer: GetText("animal_race_join_instr", Prefix)); + } + + private Task Ar_OnStarted(AnimalRace race) + { + if(race.Users.Length == race.MaxUsers) + return Context.Channel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_full")); + else + return Context.Channel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_starting_with_x", race.Users.Length)); + } + + private async Task Ar_OnStateUpdate(AnimalRace race) + { + var text = $@"|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚| +{String.Join("\n", race.Users.Select(p => + { + var index = race.FinishedUsers.IndexOf(p); + var extra = (index == -1 ? "" : $"#{index + 1} {(index == 0 ? "🏆" : "")}"); + return $"{(int)(p.Progress / 60f * 100),-2}%|{new string('‣', p.Progress) + p.Animal.Icon + extra}"; + }))} +|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚|"; + + var msg = raceMessage; + + if (msg == null) + raceMessage = await Context.Channel.SendConfirmAsync(text) + .ConfigureAwait(false); + else + await msg.ModifyAsync(x => x.Embed = new EmbedBuilder() + .WithTitle(GetText("animal_race")) + .WithDescription(text) + .WithOkColor() + .Build()) + .ConfigureAwait(false); + } + + private Task Ar_OnStartingFailed(AnimalRace race) + { + _service.AnimalRaces.TryRemove(Context.Guild.Id, out _); + return ReplyErrorLocalized("animal_race_failed"); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task JoinRace(int amount = 0) + { + if (!_service.AnimalRaces.TryGetValue(Context.Guild.Id, out var ar)) + { + await ReplyErrorLocalized("race_not_exist").ConfigureAwait(false); + return; + } + try + { + var user = await ar.JoinRace(Context.User.Id, Context.User.ToString(), amount) + .ConfigureAwait(false); + if (amount > 0) + await Context.Channel.SendConfirmAsync(GetText("animal_race_join_bet", Context.User.Mention, user.Animal.Icon, amount + _bc.BotConfig.CurrencySign)).ConfigureAwait(false); + else + await Context.Channel.SendConfirmAsync(GetText("animal_race_join", Context.User.Mention, user.Animal.Icon)).ConfigureAwait(false); + } + catch (ArgumentOutOfRangeException) + { + //ignore if user inputed an invalid amount + } + catch (AlreadyJoinedException) + { + // just ignore this + } + catch (AlreadyStartedException) + { + //ignore + } + catch (AnimalRaceFullException) + { + await Context.Channel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_full")) + .ConfigureAwait(false); + } + catch (NotEnoughFundsException) + { + await Context.Channel.SendErrorAsync(GetText("not_enough", _bc.BotConfig.CurrencySign)).ConfigureAwait(false); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs new file mode 100644 index 00000000..0edbb918 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs @@ -0,0 +1,161 @@ +using NadekoBot.Common; +using NadekoBot.Extensions; +using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common.AnimalRacing +{ + public class AnimalRace : IDisposable + { + public enum Phase + { + WaitingForPlayers, + Running, + Ended, + } + + private const int _startingDelayMiliseconds = 20_000; + + public Phase CurrentPhase = Phase.WaitingForPlayers; + + public event Func OnStarted = delegate { return Task.CompletedTask; }; + public event Func OnStartingFailed = delegate { return Task.CompletedTask; }; + public event Func OnStateUpdate = delegate { return Task.CompletedTask; }; + public event Func OnEnded = delegate { return Task.CompletedTask; }; + + public ImmutableArray Users => _users.ToImmutableArray(); + public List FinishedUsers { get; } = new List(); + + private readonly SemaphoreSlim _locker = new SemaphoreSlim(1, 1); + private readonly HashSet _users = new HashSet(); + private readonly CurrencyService _currency; + private readonly Queue _animalsQueue; + public int MaxUsers { get; } + + public AnimalRace(CurrencyService currency, RaceAnimal[] availableAnimals) + { + this._currency = currency; + this._animalsQueue = new Queue(availableAnimals); + this.MaxUsers = availableAnimals.Length; + + if (this._animalsQueue.Count == 0) + CurrentPhase = Phase.Ended; + } + + public void Initialize() //lame name + { + var _t = Task.Run(async () => + { + await Task.Delay(_startingDelayMiliseconds).ConfigureAwait(false); + + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (CurrentPhase != Phase.WaitingForPlayers) + return; + + await Start().ConfigureAwait(false); + } + finally { _locker.Release(); } + }); + } + + public async Task JoinRace(ulong userId, string userName, int bet = 0) + { + if (bet < 0) + throw new ArgumentOutOfRangeException(nameof(bet)); + + var user = new AnimalRacingUser(userName, userId, bet); + + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (_users.Count == MaxUsers) + throw new AnimalRaceFullException(); + + if (CurrentPhase != Phase.WaitingForPlayers) + throw new AlreadyStartedException(); + + if (!await _currency.RemoveAsync(userId, "BetRace", bet).ConfigureAwait(false)) + throw new NotEnoughFundsException(); + + if (_users.Contains(user)) + throw new AlreadyJoinedException(); + + var animal = _animalsQueue.Dequeue(); + user.Animal = animal; + _users.Add(user); + + if (_animalsQueue.Count == 0) //start if no more spots left + await Start().ConfigureAwait(false); + + return user; + } + finally { _locker.Release(); } + } + + private async Task Start() + { + CurrentPhase = Phase.Running; + if (_users.Count <= 1) + { + foreach (var user in _users) + { + if(user.Bet > 0) + await _currency.AddAsync(user.UserId, "Race refund", user.Bet).ConfigureAwait(false); + } + + var _sf = OnStartingFailed?.Invoke(this); + CurrentPhase = Phase.Ended; + return; + } + + var _ = OnStarted?.Invoke(this); + var _t = Task.Run(async () => + { + var rng = new NadekoRandom(); + while (!_users.All(x => x.Progress >= 60)) + { + foreach (var user in _users) + { + user.Progress += rng.Next(1, 11); + if (user.Progress >= 60) + user.Progress = 60; + } + + var finished = _users.Where(x => x.Progress >= 60 && !FinishedUsers.Contains(x)) + .Shuffle(); + + FinishedUsers.AddRange(finished); + + var _ignore = OnStateUpdate?.Invoke(this); + await Task.Delay(2500).ConfigureAwait(false); + } + + if (FinishedUsers[0].Bet > 0) + await _currency.AddAsync(FinishedUsers[0].UserId, "Won a Race", FinishedUsers[0].Bet * (_users.Count - 1)) + .ConfigureAwait(false); + + var _ended = OnEnded?.Invoke(this); + }); + } + + public void Dispose() + { + CurrentPhase = Phase.Ended; + OnStarted = null; + OnEnded = null; + OnStartingFailed = null; + OnStateUpdate = null; + _locker.Dispose(); + _users.Clear(); + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs new file mode 100644 index 00000000..38d45ba5 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs @@ -0,0 +1,32 @@ +using NadekoBot.Core.Services.Database.Models; + +namespace NadekoBot.Modules.Gambling.Common.AnimalRacing +{ + public class AnimalRacingUser + { + public int Bet { get; } + public string Username { get; } + public ulong UserId { get; } + public RaceAnimal Animal { get; set; } + public int Progress { get; set; } + + public AnimalRacingUser(string username, ulong userId, int bet) + { + this.Bet = bet; + this.Username = username; + this.UserId = userId; + } + + public override bool Equals(object obj) + { + return obj is AnimalRacingUser x + ? x.UserId == this.UserId + : false; + } + + public override int GetHashCode() + { + return this.UserId.GetHashCode(); + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs new file mode 100644 index 00000000..56469bf8 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs @@ -0,0 +1,9 @@ +using System; + +namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions +{ + public class AlreadyJoinedException : Exception + { + + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs new file mode 100644 index 00000000..ab54a87a --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs @@ -0,0 +1,9 @@ +using System; + +namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions +{ + public class AlreadyStartedException : Exception + { + + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs new file mode 100644 index 00000000..9c3e8f69 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs @@ -0,0 +1,8 @@ +using System; + +namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions +{ + public class AnimalRaceFullException : Exception + { + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs new file mode 100644 index 00000000..1fb01093 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs @@ -0,0 +1,9 @@ +using System; + +namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions +{ + public class NotEnoughFundsException : Exception + { + + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/Cards.cs b/NadekoBot.Core/Modules/Gambling/Common/Cards.cs new file mode 100644 index 00000000..41c39834 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/Cards.cs @@ -0,0 +1,234 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using NadekoBot.Common; +using NadekoBot.Extensions; + +namespace NadekoBot.Modules.Gambling.Common +{ + public class Cards + { + private static readonly Dictionary cardNames = new Dictionary() { + { 1, "Ace" }, + { 2, "Two" }, + { 3, "Three" }, + { 4, "Four" }, + { 5, "Five" }, + { 6, "Six" }, + { 7, "Seven" }, + { 8, "Eight" }, + { 9, "Nine" }, + { 10, "Ten" }, + { 11, "Jack" }, + { 12, "Queen" }, + { 13, "King" } + }; + private static Dictionary, bool>> handValues; + + + public enum CardSuit + { + Spades = 1, + Hearts = 2, + Diamonds = 3, + Clubs = 4 + } + + public class Card : IComparable + { + public CardSuit Suit { get; } + public int Number { get; } + + public string Name + { + get + { + var str = ""; + + if (Number <= 10 && Number > 1) + { + str += "_" + Number; + } + else { + str += GetName().ToLower(); + } + return str + "_of_" + Suit.ToString().ToLower(); + } + } + + public Card(CardSuit s, int cardNum) + { + this.Suit = s; + this.Number = cardNum; + } + + public string GetName() => cardNames[Number]; + + public override string ToString() => cardNames[Number] + " Of " + Suit; + + public int CompareTo(object obj) + { + if (!(obj is Card)) return 0; + var c = (Card)obj; + return this.Number - c.Number; + } + } + + private List cardPool; + public List CardPool + { + get { return cardPool; } + set { cardPool = value; } + } + + /// + /// Creates a new instance of the BlackJackGame, this allows you to create multiple games running at one time. + /// + public Cards() + { + cardPool = new List(52); + RefillPool(); + InitHandValues(); + } + /// + /// Restart the game of blackjack. It will only refill the pool for now. Probably wont be used, unless you want to have only 1 bjg running at one time, + /// then you will restart the same game every time. + /// + public void Restart() => RefillPool(); + + /// + /// Removes all cards from the pool and refills the pool with all of the possible cards. NOTE: I think this is too expensive. + /// We should probably make it so it copies another premade list with all the cards, or something. + /// + private void RefillPool() + { + cardPool.Clear(); + //foreach suit + for (var j = 1; j < 14; j++) + { + // and number + for (var i = 1; i < 5; i++) + { + //generate a card of that suit and number and add it to the pool + + // the pool will go from ace of spades,hears,diamonds,clubs all the way to the king of spades. hearts, ... + cardPool.Add(new Card((CardSuit)i, j)); + } + } + } + private Random r = new NadekoRandom(); + /// + /// Take a card from the pool, you either take it from the top if the deck is shuffled, or from a random place if the deck is in the default order. + /// + /// A card from the pool + public Card DrawACard() + { + if (CardPool.Count == 0) + Restart(); + //you can either do this if your deck is not shuffled + + var num = r.Next(0, cardPool.Count); + var c = cardPool[num]; + cardPool.RemoveAt(num); + return c; + + // if you want to shuffle when you fill, then take the first one + /* + Card c = cardPool[0]; + cardPool.RemoveAt(0); + return c; + */ + } + /// + /// Shuffles the deck. Use this if you want to take cards from the top of the deck, instead of randomly. See DrawACard method. + /// + private void Shuffle() + { + if (cardPool.Count <= 1) return; + var orderedPool = cardPool.Shuffle(); + cardPool = cardPool as List ?? orderedPool.ToList(); + } + public override string ToString() => string.Concat(cardPool.Select(c => c.ToString())) + Environment.NewLine; + + private static void InitHandValues() + { + Func, bool> hasPair = + cards => cards.GroupBy(card => card.Number) + .Count(group => group.Count() == 2) == 1; + Func, bool> isPair = + cards => cards.GroupBy(card => card.Number) + .Count(group => group.Count() == 3) == 0 + && hasPair(cards); + + Func, bool> isTwoPair = + cards => cards.GroupBy(card => card.Number) + .Count(group => group.Count() == 2) == 2; + + Func, bool> isStraight = + cards => + { + if (cards.GroupBy(card => card.Number).Count() != cards.Count()) + return false; + var toReturn = (cards.Max(card => (int)card.Number) + - cards.Min(card => (int)card.Number) == 4); + if (toReturn || cards.All(c => c.Number != 1)) return toReturn; + + var newCards = cards.Select(c => c.Number == 1 ? new Card(c.Suit, 14) : c); + return (newCards.Max(card => (int)card.Number) + - newCards.Min(card => (int)card.Number) == 4); + }; + + Func, bool> hasThreeOfKind = + cards => cards.GroupBy(card => card.Number) + .Any(group => group.Count() == 3); + + Func, bool> isThreeOfKind = + cards => hasThreeOfKind(cards) && !hasPair(cards); + + Func, bool> isFlush = + cards => cards.GroupBy(card => card.Suit).Count() == 1; + + Func, bool> isFourOfKind = + cards => cards.GroupBy(card => card.Number) + .Any(group => group.Count() == 4); + + Func, bool> isFullHouse = + cards => hasPair(cards) && hasThreeOfKind(cards); + + Func, bool> hasStraightFlush = + cards => isFlush(cards) && isStraight(cards); + + Func, bool> isRoyalFlush = + cards => cards.Min(card => card.Number) == 1 && + cards.Max(card => card.Number) == 13 + && hasStraightFlush(cards); + + Func, bool> isStraightFlush = + cards => hasStraightFlush(cards) && !isRoyalFlush(cards); + + handValues = new Dictionary, bool>> + { + { "Royal Flush", isRoyalFlush }, + { "Straight Flush", isStraightFlush }, + { "Four Of A Kind", isFourOfKind }, + { "Full House", isFullHouse }, + { "Flush", isFlush }, + { "Straight", isStraight }, + { "Three Of A Kind", isThreeOfKind }, + { "Two Pairs", isTwoPair }, + { "A Pair", isPair } + }; + } + + public static string GetHandValue(List cards) + { + if (handValues == null) + InitHandValues(); + foreach (var kvp in handValues.Where(x => x.Value(cards))) + { + return kvp.Key; + } + return "High card " + (cards.FirstOrDefault(c => c.Number == 1)?.GetName() ?? cards.Max().GetName()); + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs new file mode 100644 index 00000000..92dc6e7a --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs @@ -0,0 +1,12 @@ +using Discord; +using Discord.Commands; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common +{ + public abstract class CurrencyEvent + { + public abstract Task Stop(); + public abstract Task Start(IUserMessage msg, ICommandContext channel); + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs new file mode 100644 index 00000000..1c13dd9b --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs @@ -0,0 +1,144 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common.Collections; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NLog; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common +{ + public class ReactionEvent : CurrencyEvent + { + private readonly ConcurrentHashSet _reactionAwardedUsers = new ConcurrentHashSet(); + private readonly BotConfig _bc; + private readonly Logger _log; + private readonly DiscordSocketClient _client; + private readonly CurrencyService _cs; + private readonly SocketSelfUser _botUser; + + private IUserMessage StartingMessage { get; set; } + + private CancellationTokenSource Source { get; } + private CancellationToken CancelToken { get; } + + private readonly ConcurrentQueue _toGiveTo = new ConcurrentQueue(); + private readonly int _amount; + + public ReactionEvent(BotConfig bc, DiscordSocketClient client, CurrencyService cs, int amount) + { + _bc = bc; + _log = LogManager.GetCurrentClassLogger(); + _client = client; + _cs = cs; + _botUser = client.CurrentUser; + _amount = amount; + Source = new CancellationTokenSource(); + CancelToken = Source.Token; + + var _ = Task.Run(async () => + { + var users = new List(); + while (!CancelToken.IsCancellationRequested) + { + await Task.Delay(1000).ConfigureAwait(false); + while (_toGiveTo.TryDequeue(out var usrId)) + { + users.Add(usrId); + } + + if (users.Count > 0) + { + await _cs.AddToManyAsync("Reaction Event", _amount, users.ToArray()).ConfigureAwait(false); + } + + users.Clear(); + } + }, CancelToken); + } + + public override async Task Stop() + { + if (StartingMessage != null) + await StartingMessage.DeleteAsync().ConfigureAwait(false); + + if (!Source.IsCancellationRequested) + Source.Cancel(); + + _client.MessageDeleted -= MessageDeletedEventHandler; + } + + private Task MessageDeletedEventHandler(Cacheable msg, ISocketMessageChannel channel) + { + if (StartingMessage?.Id == msg.Id) + { + _log.Warn("Stopping flower reaction event because message is deleted."); + var __ = Task.Run(Stop); + } + + return Task.CompletedTask; + } + + public override async Task Start(IUserMessage umsg, ICommandContext context) + { + StartingMessage = umsg; + _client.MessageDeleted += MessageDeletedEventHandler; + + IEmote iemote; + if (Emote.TryParse(_bc.CurrencySign, out var emote)) + { + iemote = emote; + } + else + iemote = new Emoji(_bc.CurrencySign); + try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } + catch + { + try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } + catch + { + try { await StartingMessage.DeleteAsync().ConfigureAwait(false); } + catch { return; } + } + } + using (StartingMessage.OnReaction(_client, (r) => + { + try + { + if (r.UserId == _botUser.Id) + return; + + if (r.Emote.Name == iemote.Name && r.User.IsSpecified && ((DateTime.UtcNow - r.User.Value.CreatedAt).TotalDays > 5) && _reactionAwardedUsers.Add(r.User.Value.Id)) + { + _toGiveTo.Enqueue(r.UserId); + } + } + catch + { + // ignored + } + })) + { + try + { + await Task.Delay(TimeSpan.FromHours(24), CancelToken).ConfigureAwait(false); + } + catch (OperationCanceledException) + { + + } + if (CancelToken.IsCancellationRequested) + return; + + _log.Warn("Stopping flower reaction event because it expired."); + await Stop(); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs new file mode 100644 index 00000000..07ec808e --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs @@ -0,0 +1,99 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common; +using NadekoBot.Common.Collections; +using NadekoBot.Core.Services; +using System; +using System.Linq; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common.CurrencyEvents +{ + public class SneakyEvent : CurrencyEvent + { + public event Action OnEnded; + public string Code { get; private set; } = string.Empty; + private readonly ConcurrentHashSet _sneakyGameAwardedUsers = new ConcurrentHashSet(); + + private readonly char[] _sneakyGameStatusChars = Enumerable.Range(48, 10) + .Concat(Enumerable.Range(65, 26)) + .Concat(Enumerable.Range(97, 26)) + .Select(x => (char)x) + .ToArray(); + + private readonly CurrencyService _cs; + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + private readonly int _length; + + public SneakyEvent(CurrencyService cs, DiscordSocketClient client, + IBotConfigProvider bc, int len) + { + _cs = cs; + _client = client; + _bc = bc; + _length = len; + } + + public override async Task Start(IUserMessage msg, ICommandContext channel) + { + GenerateCode(); + + //start the event + _client.MessageReceived += SneakyGameMessageReceivedEventHandler; + await _client.SetGameAsync($"type {Code} for " + _bc.BotConfig.CurrencyPluralName) + .ConfigureAwait(false); + await Task.Delay(_length * 1000).ConfigureAwait(false); + await Stop().ConfigureAwait(false); + } + + private void GenerateCode() + { + var rng = new NadekoRandom(); + + for (var i = 0; i < 5; i++) + { + Code += _sneakyGameStatusChars[rng.Next(0, _sneakyGameStatusChars.Length)]; + } + } + + public override async Task Stop() + { + try + { + _client.MessageReceived -= SneakyGameMessageReceivedEventHandler; + Code = string.Empty; + _sneakyGameAwardedUsers.Clear(); + await _client.SetGameAsync(null).ConfigureAwait(false); + } + catch { } + finally + { + + OnEnded?.Invoke(); + } + } + + private Task SneakyGameMessageReceivedEventHandler(SocketMessage arg) + { + if (arg.Content == Code && + _sneakyGameAwardedUsers.Add(arg.Author.Id)) + { + var _ = Task.Run(async () => + { + await _cs.AddAsync(arg.Author, "Sneaky Game Event", 100, false) + .ConfigureAwait(false); + + try { await arg.DeleteAsync(new RequestOptions() { RetryMode = RetryMode.AlwaysFail }).ConfigureAwait(false); } + catch + { + // ignored + } + }); + } + + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs b/NadekoBot.Core/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs new file mode 100644 index 00000000..f99a969a --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs @@ -0,0 +1,45 @@ +using NadekoBot.Common; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common.WheelOfFortune +{ + public class WheelOfFortune + { + private static readonly NadekoRandom _rng = new NadekoRandom(); + + private static readonly ImmutableArray _emojis = new string[] { + "⬆", + "↖", + "⬅", + "↙", + "⬇", + "↘", + "➡", + "↗" }.ToImmutableArray(); + + public static readonly ImmutableArray Multipliers = new float[] { + 1.7f, + 1.5f, + 0.2f, + 0.1f, + 0.3f, + 0.5f, + 1.2f, + 2.4f, + }.ToImmutableArray(); + + public int Result { get; } + public string Emoji => _emojis[Result]; + public float Multiplier => Multipliers[Result]; + + public WheelOfFortune() + { + this.Result = _rng.Next(0, 8); + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs b/NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs new file mode 100644 index 00000000..0c54165d --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs @@ -0,0 +1,91 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System.Threading.Tasks; +using Discord.WebSocket; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Modules.Gambling.Services; +using NadekoBot.Modules.Gambling.Common.CurrencyEvents; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class CurrencyEventsCommands : NadekoSubmodule + { + public enum CurrencyEvent + { + Reaction, + SneakyGameStatus + } + + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + + public CurrencyEventsCommands(DiscordSocketClient client, IBotConfigProvider bc, CurrencyService cs) + { + _client = client; + _bc = bc; + _cs = cs; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task StartEvent(CurrencyEvent e, int arg = -1) + { + switch (e) + { + case CurrencyEvent.Reaction: + await ReactionEvent(Context, arg).ConfigureAwait(false); + break; + case CurrencyEvent.SneakyGameStatus: + await SneakyGameStatusEvent(Context, arg).ConfigureAwait(false); + break; + } + } + + private async Task SneakyGameStatusEvent(ICommandContext context, int num) + { + if (num < 10 || num > 600) + num = 60; + + var ev = new SneakyEvent(_cs, _client, _bc, num); + if (!await _service.StartSneakyEvent(ev, context.Message, context)) + return; + try + { + var title = GetText("sneakygamestatus_title"); + var desc = GetText("sneakygamestatus_desc", + Format.Bold(100.ToString()) + _bc.BotConfig.CurrencySign, + Format.Bold(num.ToString())); + await context.Channel.SendConfirmAsync(title, desc) + .ConfigureAwait(false); + } + catch + { + // ignored + } + } + + public async Task ReactionEvent(ICommandContext context, int amount) + { + if (amount <= 0) + amount = 100; + + var title = GetText("reaction_title"); + var desc = GetText("reaction_desc", _bc.BotConfig.CurrencySign, Format.Bold(amount.ToString()) + _bc.BotConfig.CurrencySign); + var footer = GetText("reaction_footer", 24); + var re = new ReactionEvent(_bc.BotConfig, _client, _cs, amount); + var msg = await context.Channel.SendConfirmAsync(title, + desc, footer: footer) + .ConfigureAwait(false); + await re.Start(msg, context); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs b/NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs new file mode 100644 index 00000000..0374ce95 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs @@ -0,0 +1,241 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using Image = ImageSharp.Image; +using ImageSharp; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class DriceRollCommands : NadekoSubmodule + { + private readonly Regex dndRegex = new Regex(@"^(?\d+)d(?\d+)(?:\+(?\d+))?(?:\-(?\d+))?$", RegexOptions.Compiled); + private readonly Regex fudgeRegex = new Regex(@"^(?\d+)d(?:F|f)$", RegexOptions.Compiled); + + private readonly char[] _fateRolls = { '-', ' ', '+' }; + private readonly IImagesService _images; + + public DriceRollCommands(IImagesService images) + { + _images = images; + } + + + [NadekoCommand, Usage, Description, Aliases] + public async Task Roll() + { + var rng = new NadekoRandom(); + var gen = rng.Next(1, 101); + + var num1 = gen / 10; + var num2 = gen % 10; + var imageStream = await Task.Run(() => + { + var ms = new MemoryStream(); + new[] { GetDice(num1), GetDice(num2) }.Merge().SaveAsPng(ms); + ms.Position = 0; + return ms; + }).ConfigureAwait(false); + + await Context.Channel.SendFileAsync(imageStream, + "dice.png", + Context.User.Mention + " " + GetText("dice_rolled", Format.Code(gen.ToString()))).ConfigureAwait(false); + } + + public enum RollOrderType + { + Ordered, + Unordered + } + + [NadekoCommand, Usage, Description, Aliases] + [Priority(1)] + public async Task Roll(int num) + { + await InternalRoll(num, true).ConfigureAwait(false); + } + + + [NadekoCommand, Usage, Description, Aliases] + [Priority(1)] + public async Task Rolluo(int num = 1) + { + await InternalRoll(num, false).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [Priority(0)] + public async Task Roll(string arg) + { + await InternallDndRoll(arg, true).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [Priority(0)] + public async Task Rolluo(string arg) + { + await InternallDndRoll(arg, false).ConfigureAwait(false); + } + + private async Task InternalRoll(int num, bool ordered) + { + if (num < 1 || num > 30) + { + await ReplyErrorLocalized("dice_invalid_number", 1, 30).ConfigureAwait(false); + return; + } + + var rng = new NadekoRandom(); + + var dice = new List>(num); + var values = new List(num); + for (var i = 0; i < num; i++) + { + var randomNumber = rng.Next(1, 7); + var toInsert = dice.Count; + if (ordered) + { + if (randomNumber == 6 || dice.Count == 0) + toInsert = 0; + else if (randomNumber != 1) + for (var j = 0; j < dice.Count; j++) + { + if (values[j] < randomNumber) + { + toInsert = j; + break; + } + } + } + else + { + toInsert = dice.Count; + } + dice.Insert(toInsert, GetDice(randomNumber)); + values.Insert(toInsert, randomNumber); + } + + var bitmap = dice.Merge(); + var ms = new MemoryStream(); + bitmap.SaveAsPng(ms); + ms.Position = 0; + await Context.Channel.SendFileAsync(ms, "dice.png", + Context.User.Mention + " " + + GetText("dice_rolled_num", Format.Bold(values.Count.ToString())) + + " " + GetText("total_average", + Format.Bold(values.Sum().ToString()), + Format.Bold((values.Sum() / (1.0f * values.Count)).ToString("N2")))).ConfigureAwait(false); + } + + private async Task InternallDndRoll(string arg, bool ordered) + { + Match match; + int n1; + int n2; + if ((match = fudgeRegex.Match(arg)).Length != 0 && + int.TryParse(match.Groups["n1"].ToString(), out n1) && + n1 > 0 && n1 < 500) + { + var rng = new NadekoRandom(); + + var rolls = new List(); + + for (int i = 0; i < n1; i++) + { + rolls.Add(_fateRolls[rng.Next(0, _fateRolls.Length)]); + } + var embed = new EmbedBuilder().WithOkColor().WithDescription(Context.User.Mention + " " + GetText("dice_rolled_num", Format.Bold(n1.ToString()))) + .AddField(efb => efb.WithName(Format.Bold("Result")) + .WithValue(string.Join(" ", rolls.Select(c => Format.Code($"[{c}]"))))); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + else if ((match = dndRegex.Match(arg)).Length != 0) + { + var rng = new NadekoRandom(); + if (int.TryParse(match.Groups["n1"].ToString(), out n1) && + int.TryParse(match.Groups["n2"].ToString(), out n2) && + n1 <= 50 && n2 <= 100000 && n1 > 0 && n2 > 0) + { + var add = 0; + var sub = 0; + int.TryParse(match.Groups["add"].Value, out add); + int.TryParse(match.Groups["sub"].Value, out sub); + + var arr = new int[n1]; + for (int i = 0; i < n1; i++) + { + arr[i] = rng.Next(1, n2 + 1); + } + + var sum = arr.Sum(); + var embed = new EmbedBuilder().WithOkColor().WithDescription(Context.User.Mention + " " +GetText("dice_rolled_num", n1) + $"`1 - {n2}`") + .AddField(efb => efb.WithName(Format.Bold("Rolls")) + .WithValue(string.Join(" ", (ordered ? arr.OrderBy(x => x).AsEnumerable() : arr).Select(x => Format.Code(x.ToString()))))) + .AddField(efb => efb.WithName(Format.Bold("Sum")) + .WithValue(sum + " + " + add + " - " + sub + " = " + (sum + add - sub))); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + } + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task NRoll([Remainder] string range) + { + int rolled; + if (range.Contains("-")) + { + var arr = range.Split('-') + .Take(2) + .Select(int.Parse) + .ToArray(); + if (arr[0] > arr[1]) + { + await ReplyErrorLocalized("second_larger_than_first").ConfigureAwait(false); + return; + } + rolled = new NadekoRandom().Next(arr[0], arr[1] + 1); + } + else + { + rolled = new NadekoRandom().Next(0, int.Parse(range) + 1); + } + + await ReplyConfirmLocalized("dice_rolled", Format.Bold(rolled.ToString())).ConfigureAwait(false); + } + + private Image GetDice(int num) + { + if (num < 0 || num > 10) + throw new ArgumentOutOfRangeException(nameof(num)); + + if (num == 10) + { + var images = _images.Dice; + using (var imgOneStream = images[1].ToStream()) + using (var imgZeroStream = images[0].ToStream()) + { + var imgOne = Image.Load(imgOneStream); + var imgZero = Image.Load(imgZeroStream); + + return new[] { imgOne, imgZero }.Merge(); + } + } + using (var die = _images.Dice[num].ToStream()) + { + return Image.Load(die); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/DrawCommands.cs b/NadekoBot.Core/Modules/Gambling/DrawCommands.cs new file mode 100644 index 00000000..72bff0f2 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/DrawCommands.cs @@ -0,0 +1,106 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Common; +using Image = ImageSharp.Image; +using ImageSharp; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class DrawCommands : NadekoSubmodule + { + private static readonly ConcurrentDictionary _allDecks = new ConcurrentDictionary(); + private const string _cardsPath = "data/images/cards"; + + + private async Task<(Stream ImageStream, string ToSend)> InternalDraw(int num, ulong? guildId = null) + { + if (num < 1 || num > 10) + throw new ArgumentOutOfRangeException(nameof(num)); + + Cards cards = guildId == null ? new Cards() : _allDecks.GetOrAdd(Context.Guild, (s) => new Cards()); + var images = new List>(); + var cardObjects = new List(); + for (var i = 0; i < num; i++) + { + if (cards.CardPool.Count == 0 && i != 0) + { + try + { + await ReplyErrorLocalized("no_more_cards").ConfigureAwait(false); + } + catch + { + // ignored + } + break; + } + var currentCard = cards.DrawACard(); + cardObjects.Add(currentCard); + using (var stream = File.OpenRead(Path.Combine(_cardsPath, currentCard.ToString().ToLowerInvariant() + ".jpg").Replace(' ', '_'))) + images.Add(Image.Load(stream)); + } + MemoryStream bitmapStream = new MemoryStream(); + images.Merge().SaveAsPng(bitmapStream); + bitmapStream.Position = 0; + + var toSend = $"{Context.User.Mention}"; + if (cardObjects.Count == 5) + toSend += $" drew `{Cards.GetHandValue(cardObjects)}`"; + + return (bitmapStream, toSend); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Draw(int num = 1) + { + if (num < 1) + num = 1; + if (num > 10) + num = 10; + + var data = await InternalDraw(num, Context.Guild.Id).ConfigureAwait(false); + await Context.Channel.SendFileAsync(data.ImageStream, num + " cards.jpg", data.ToSend).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task DrawNew(int num = 1) + { + if (num < 1) + num = 1; + if (num > 10) + num = 10; + + var data = await InternalDraw(num).ConfigureAwait(false); + await Context.Channel.SendFileAsync(data.ImageStream, num + " cards.jpg", data.ToSend).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task DeckShuffle() + { + //var channel = (ITextChannel)Context.Channel; + + _allDecks.AddOrUpdate(Context.Guild, + (g) => new Cards(), + (g, c) => + { + c.Restart(); + return c; + }); + + await ReplyConfirmLocalized("deck_reshuffled").ConfigureAwait(false); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs b/NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs new file mode 100644 index 00000000..d43bea7e --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs @@ -0,0 +1,133 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using Image = ImageSharp.Image; +using ImageSharp; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class FlipCoinCommands : NadekoSubmodule + { + private readonly IImagesService _images; + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + + private readonly NadekoRandom rng = new NadekoRandom(); + + public FlipCoinCommands(IImagesService images, CurrencyService cs, IBotConfigProvider bc) + { + _images = images; + _bc = bc; + _cs = cs; + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Flip(int count = 1) + { + if (count == 1) + { + if (rng.Next(0, 2) == 1) + { + using (var heads = _images.Heads.ToStream()) + { + await Context.Channel.SendFileAsync(heads, "heads.jpg", Context.User.Mention + " " + GetText("flipped", Format.Bold(GetText("heads")))).ConfigureAwait(false); + } + } + else + { + using (var tails = _images.Tails.ToStream()) + { + await Context.Channel.SendFileAsync(tails, "tails.jpg", Context.User.Mention + " " + GetText("flipped", Format.Bold(GetText("tails")))).ConfigureAwait(false); + } + } + return; + } + if (count > 10 || count < 1) + { + await ReplyErrorLocalized("flip_invalid", 10).ConfigureAwait(false); + return; + } + var imgs = new Image[count]; + for (var i = 0; i < count; i++) + { + using (var heads = _images.Heads.ToStream()) + using (var tails = _images.Tails.ToStream()) + { + if (rng.Next(0, 10) < 5) + { + imgs[i] = Image.Load(heads); + } + else + { + imgs[i] = Image.Load(tails); + } + } + } + await Context.Channel.SendFileAsync(imgs.Merge().ToStream(), $"{count} coins.png").ConfigureAwait(false); + } + + public enum BetFlipGuess + { + H = 1, + Head = 1, + Heads = 1, + T = 2, + Tail = 2, + Tails = 2 + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Betflip(int amount, BetFlipGuess guess) + { + if (amount < _bc.BotConfig.MinimumBetAmount) + { + await ReplyErrorLocalized("min_bet_limit", _bc.BotConfig.MinimumBetAmount + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + var removed = await _cs.RemoveAsync(Context.User, "Betflip Gamble", amount, false).ConfigureAwait(false); + if (!removed) + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencyPluralName).ConfigureAwait(false); + return; + } + BetFlipGuess result; + IEnumerable imageToSend; + if (rng.Next(0, 2) == 1) + { + imageToSend = _images.Heads; + result = BetFlipGuess.Heads; + } + else + { + imageToSend = _images.Tails; + result = BetFlipGuess.Tails; + } + + string str; + if (guess == result) + { + var toWin = (int)Math.Round(amount * _bc.BotConfig.BetflipMultiplier); + str = Context.User.Mention + " " + GetText("flip_guess", toWin + _bc.BotConfig.CurrencySign); + await _cs.AddAsync(Context.User, "Betflip Gamble", toWin, false).ConfigureAwait(false); + } + else + { + str = Context.User.Mention + " " + GetText("better_luck"); + } + using (var toSend = imageToSend.ToStream()) + { + await Context.Channel.SendFileAsync(toSend, "result.png", str).ConfigureAwait(false); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs b/NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs new file mode 100644 index 00000000..dc506ed2 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs @@ -0,0 +1,366 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using Microsoft.EntityFrameworkCore; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using NadekoBot.Common.Collections; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class FlowerShopCommands : NadekoSubmodule + { + private readonly IBotConfigProvider _bc; + private readonly DbService _db; + private readonly CurrencyService _cs; + private readonly DiscordSocketClient _client; + + public enum Role + { + Role + } + + public enum List + { + List + } + + public FlowerShopCommands(IBotConfigProvider bc, DbService db, CurrencyService cs, DiscordSocketClient client) + { + _db = db; + _bc = bc; + _cs = cs; + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Shop(int page = 1) + { + if (--page < 0) + return; + List entries; + using (var uow = _db.UnitOfWork) + { + entries = new IndexedCollection(uow.GuildConfigs.For(Context.Guild.Id, + set => set.Include(x => x.ShopEntries) + .ThenInclude(x => x.Items)).ShopEntries); + } + + await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => + { + var theseEntries = entries.Skip(curPage * 9).Take(9).ToArray(); + + if (!theseEntries.Any()) + return new EmbedBuilder().WithErrorColor() + .WithDescription(GetText("shop_none")); + var embed = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("shop", _bc.BotConfig.CurrencySign)); + + for (int i = 0; i < theseEntries.Length; i++) + { + var entry = theseEntries[i]; + embed.AddField(efb => efb.WithName($"#{curPage * 9 + i + 1} - {entry.Price}{_bc.BotConfig.CurrencySign}").WithValue(EntryToString(entry)).WithIsInline(true)); + } + return embed; + }, entries.Count / 9, true); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Buy(int index, [Remainder]string message = null) + { + index -= 1; + if (index < 0) + return; + ShopEntry entry; + using (var uow = _db.UnitOfWork) + { + var config = uow.GuildConfigs.For(Context.Guild.Id, set => set + .Include(x => x.ShopEntries) + .ThenInclude(x => x.Items)); + var entries = new IndexedCollection(config.ShopEntries); + entry = entries.ElementAtOrDefault(index); + uow.Complete(); + } + + if (entry == null) + { + await ReplyErrorLocalized("shop_item_not_found").ConfigureAwait(false); + return; + } + + if (entry.Type == ShopEntryType.Role) + { + var guser = (IGuildUser)Context.User; + var role = Context.Guild.GetRole(entry.RoleId); + + if (role == null) + { + await ReplyErrorLocalized("shop_role_not_found").ConfigureAwait(false); + return; + } + + if (await _cs.RemoveAsync(Context.User.Id, $"Shop purchase - {entry.Type}", entry.Price)) + { + try + { + await guser.AddRoleAsync(role).ConfigureAwait(false); + } + catch (Exception ex) + { + _log.Warn(ex); + await _cs.AddAsync(Context.User.Id, $"Shop error refund", entry.Price); + await ReplyErrorLocalized("shop_role_purchase_error").ConfigureAwait(false); + return; + } + await _cs.AddAsync(entry.AuthorId, $"Shop sell item - {entry.Type}", GetProfitAmount(entry.Price)); + await ReplyConfirmLocalized("shop_role_purchase", Format.Bold(role.Name)).ConfigureAwait(false); + return; + } + else + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + } + else if (entry.Type == ShopEntryType.List) + { + if (entry.Items.Count == 0) + { + await ReplyErrorLocalized("out_of_stock").ConfigureAwait(false); + return; + } + + var item = entry.Items.ToArray()[new NadekoRandom().Next(0, entry.Items.Count)]; + + if (await _cs.RemoveAsync(Context.User.Id, $"Shop purchase - {entry.Type}", entry.Price)) + { + int removed; + using (var uow = _db.UnitOfWork) + { + var x = uow._context.Set().Remove(item); + + removed = uow.Complete(); + } + try + { + await (await Context.User.GetOrCreateDMChannelAsync()) + .EmbedAsync(new EmbedBuilder().WithOkColor() + .WithTitle(GetText("shop_purchase", Context.Guild.Name)) + .AddField(efb => efb.WithName(GetText("item")).WithValue(item.Text).WithIsInline(false)) + .AddField(efb => efb.WithName(GetText("price")).WithValue(entry.Price.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("name")).WithValue(entry.Name).WithIsInline(true))) + .ConfigureAwait(false); + + await _cs.AddAsync(entry.AuthorId, + $"Shop sell item - {entry.Name}", + GetProfitAmount(entry.Price)).ConfigureAwait(false); + } + catch + { + using (var uow = _db.UnitOfWork) + { + uow._context.Set().Add(item); + uow.Complete(); + + await _cs.AddAsync(Context.User.Id, + $"Shop error refund - {entry.Name}", + entry.Price, + uow).ConfigureAwait(false); + } + await ReplyErrorLocalized("shop_buy_error").ConfigureAwait(false); + return; + } + await ReplyConfirmLocalized("shop_item_purchase").ConfigureAwait(false); + } + else + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + } + + } + + private long GetProfitAmount(int price) => + (int)(Math.Ceiling(0.90 * price)); + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.Administrator)] + [RequireBotPermission(GuildPermission.ManageRoles)] + public async Task ShopAdd(Role _, int price, [Remainder] IRole role) + { + var entry = new ShopEntry() + { + Name = "-", + Price = price, + Type = ShopEntryType.Role, + AuthorId = Context.User.Id, + RoleId = role.Id, + RoleName = role.Name + }; + using (var uow = _db.UnitOfWork) + { + var entries = new IndexedCollection(uow.GuildConfigs.For(Context.Guild.Id, + set => set.Include(x => x.ShopEntries) + .ThenInclude(x => x.Items)).ShopEntries) + { + entry + }; + uow.GuildConfigs.For(Context.Guild.Id, set => set).ShopEntries = entries; + uow.Complete(); + } + await Context.Channel.EmbedAsync(EntryToEmbed(entry) + .WithTitle(GetText("shop_item_add"))); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.Administrator)] + public async Task ShopAdd(List _, int price, [Remainder]string name) + { + var entry = new ShopEntry() + { + Name = name.TrimTo(100), + Price = price, + Type = ShopEntryType.List, + AuthorId = Context.User.Id, + Items = new HashSet(), + }; + using (var uow = _db.UnitOfWork) + { + var entries = new IndexedCollection(uow.GuildConfigs.For(Context.Guild.Id, + set => set.Include(x => x.ShopEntries) + .ThenInclude(x => x.Items)).ShopEntries) + { + entry + }; + uow.GuildConfigs.For(Context.Guild.Id, set => set).ShopEntries = entries; + uow.Complete(); + } + await Context.Channel.EmbedAsync(EntryToEmbed(entry) + .WithTitle(GetText("shop_item_add"))); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.Administrator)] + public async Task ShopListAdd(int index, [Remainder] string itemText) + { + index -= 1; + if (index < 0) + return; + var item = new ShopEntryItem() + { + Text = itemText + }; + ShopEntry entry; + bool rightType = false; + bool added = false; + using (var uow = _db.UnitOfWork) + { + var entries = new IndexedCollection(uow.GuildConfigs.For(Context.Guild.Id, + set => set.Include(x => x.ShopEntries) + .ThenInclude(x => x.Items)).ShopEntries); + entry = entries.ElementAtOrDefault(index); + if (entry != null && (rightType = (entry.Type == ShopEntryType.List))) + { + if (added = entry.Items.Add(item)) + { + uow.Complete(); + } + } + } + if (entry == null) + await ReplyErrorLocalized("shop_item_not_found").ConfigureAwait(false); + else if (!rightType) + await ReplyErrorLocalized("shop_item_wrong_type").ConfigureAwait(false); + else if (added == false) + await ReplyErrorLocalized("shop_list_item_not_unique").ConfigureAwait(false); + else + await ReplyConfirmLocalized("shop_list_item_added").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.Administrator)] + public async Task ShopRemove(int index) + { + index -= 1; + if (index < 0) + return; + ShopEntry removed; + using (var uow = _db.UnitOfWork) + { + var config = uow.GuildConfigs.For(Context.Guild.Id, set => set + .Include(x => x.ShopEntries) + .ThenInclude(x => x.Items)); + + var entries = new IndexedCollection(config.ShopEntries); + removed = entries.ElementAtOrDefault(index); + if (removed != null) + { + entries.Remove(removed); + + config.ShopEntries = entries; + uow.Complete(); + } + } + + if (removed == null) + await ReplyErrorLocalized("shop_item_not_found").ConfigureAwait(false); + else + await Context.Channel.EmbedAsync(EntryToEmbed(removed) + .WithTitle(GetText("shop_item_rm"))); + } + + public EmbedBuilder EntryToEmbed(ShopEntry entry) + { + var embed = new EmbedBuilder().WithOkColor(); + + if (entry.Type == ShopEntryType.Role) + return embed.AddField(efb => efb.WithName(GetText("name")).WithValue(GetText("shop_role", Format.Bold(Context.Guild.GetRole(entry.RoleId)?.Name ?? "MISSING_ROLE"))).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("price")).WithValue(entry.Price.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("type")).WithValue(entry.Type.ToString()).WithIsInline(true)); + else if (entry.Type == ShopEntryType.List) + return embed.AddField(efb => efb.WithName(GetText("name")).WithValue(entry.Name).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("price")).WithValue(entry.Price.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("type")).WithValue(GetText("random_unique_item")).WithIsInline(true)); + //else if (entry.Type == ShopEntryType.Infinite_List) + // return embed.AddField(efb => efb.WithName(GetText("name")).WithValue(GetText("shop_role", Format.Bold(entry.RoleName))).WithIsInline(true)) + // .AddField(efb => efb.WithName(GetText("price")).WithValue(entry.Price.ToString()).WithIsInline(true)) + // .AddField(efb => efb.WithName(GetText("type")).WithValue(entry.Type.ToString()).WithIsInline(true)); + else return null; + } + + public string EntryToString(ShopEntry entry) + { + if (entry.Type == ShopEntryType.Role) + { + return GetText("shop_role", Format.Bold(Context.Guild.GetRole(entry.RoleId)?.Name ?? "MISSING_ROLE")); + } + else if (entry.Type == ShopEntryType.List) + { + return GetText("unique_items_left", entry.Items.Count) + "\n" + entry.Name; + } + //else if (entry.Type == ShopEntryType.Infinite_List) + //{ + + //} + return ""; + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/Gambling.cs b/NadekoBot.Core/Modules/Gambling/Gambling.cs new file mode 100644 index 00000000..f4cab4c0 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Gambling.cs @@ -0,0 +1,295 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using System.Collections.Generic; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling : NadekoTopLevelModule + { + private readonly IBotConfigProvider _bc; + private readonly DbService _db; + private readonly CurrencyService _currency; + + private string CurrencyName => _bc.BotConfig.CurrencyName; + private string CurrencyPluralName => _bc.BotConfig.CurrencyPluralName; + private string CurrencySign => _bc.BotConfig.CurrencySign; + + public Gambling(IBotConfigProvider bc, DbService db, CurrencyService currency) + { + _bc = bc; + _db = db; + _currency = currency; + } + + public long GetCurrency(ulong id) + { + using (var uow = _db.UnitOfWork) + { + return uow.Currency.GetUserCurrency(id); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Raffle([Remainder] IRole role = null) + { + role = role ?? Context.Guild.EveryoneRole; + + var members = (await role.GetMembersAsync()).Where(u => u.Status != UserStatus.Offline); + var membersArray = members as IUser[] ?? members.ToArray(); + if (membersArray.Length == 0) + { + + } + var usr = membersArray[new NadekoRandom().Next(0, membersArray.Length)]; + await Context.Channel.SendConfirmAsync("🎟 "+ GetText("raffled_user"), $"**{usr.Username}#{usr.Discriminator}**", footer: $"ID: {usr.Id}").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [Priority(1)] + public async Task Cash([Remainder] IUser user = null) + { + if(user == null) + await ConfirmLocalized("has", Format.Bold(Context.User.ToString()), $"{GetCurrency(Context.User.Id)} {CurrencySign}").ConfigureAwait(false); + else + await ReplyConfirmLocalized("has", Format.Bold(user.ToString()), $"{GetCurrency(user.Id)} {CurrencySign}").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [Priority(0)] + public async Task Cash(ulong userId) + { + await ReplyConfirmLocalized("has", Format.Code(userId.ToString()), $"{GetCurrency(userId)} {CurrencySign}").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Give(long amount, [Remainder] IGuildUser receiver) + { + if (amount <= 0 || Context.User.Id == receiver.Id) + return; + var success = await _currency.RemoveAsync((IGuildUser)Context.User, $"Gift to {receiver.Username} ({receiver.Id}).", amount, false).ConfigureAwait(false); + if (!success) + { + await ReplyErrorLocalized("not_enough", CurrencyPluralName).ConfigureAwait(false); + return; + } + await _currency.AddAsync(receiver, $"Gift from {Context.User.Username} ({Context.User.Id}).", amount, true).ConfigureAwait(false); + await ReplyConfirmLocalized("gifted", amount + CurrencySign, Format.Bold(receiver.ToString())) + .ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + [Priority(0)] + public Task Award(int amount, [Remainder] IGuildUser usr) => + Award(amount, usr.Id); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + [Priority(1)] + public async Task Award(int amount, ulong usrId) + { + if (amount <= 0) + return; + + await _currency.AddAsync(usrId, $"Awarded by bot owner. ({Context.User.Username}/{Context.User.Id})", amount).ConfigureAwait(false); + await ReplyConfirmLocalized("awarded", amount + CurrencySign, $"<@{usrId}>").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + [Priority(2)] + public async Task Award(int amount, [Remainder] IRole role) + { + var users = (await Context.Guild.GetUsersAsync()) + .Where(u => u.GetRoles().Contains(role)) + .ToList(); + await Task.WhenAll(users.Select(u => _currency.AddAsync(u.Id, + $"Awarded by bot owner to **{role.Name}** role. ({Context.User.Username}/{Context.User.Id})", + amount))) + .ConfigureAwait(false); + + await ReplyConfirmLocalized("mass_award", + amount + CurrencySign, + Format.Bold(users.Count.ToString()), + Format.Bold(role.Name)).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Take(long amount, [Remainder] IGuildUser user) + { + if (amount <= 0) + return; + + if (await _currency.RemoveAsync(user, $"Taken by bot owner.({Context.User.Username}/{Context.User.Id})", amount, true).ConfigureAwait(false)) + await ReplyConfirmLocalized("take", amount+CurrencySign, Format.Bold(user.ToString())).ConfigureAwait(false); + else + await ReplyErrorLocalized("take_fail", amount + CurrencySign, Format.Bold(user.ToString()), CurrencyPluralName).ConfigureAwait(false); + } + + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task Take(long amount, [Remainder] ulong usrId) + { + if (amount <= 0) + return; + + if (await _currency.RemoveAsync(usrId, $"Taken by bot owner.({Context.User.Username}/{Context.User.Id})", amount).ConfigureAwait(false)) + await ReplyConfirmLocalized("take", amount + CurrencySign, $"<@{usrId}>").ConfigureAwait(false); + else + await ReplyErrorLocalized("take_fail", amount + CurrencySign, Format.Code(usrId.ToString()), CurrencyPluralName).ConfigureAwait(false); + } + + //[NadekoCommand, Usage, Description, Aliases] + //[OwnerOnly] + //public Task BrTest(int tests = 1000) + //{ + // var t = Task.Run(async () => + // { + // if (tests <= 0) + // return; + // //multi vs how many times it occured + // var dict = new Dictionary(); + // var generator = new NadekoRandom(); + // for (int i = 0; i < tests; i++) + // { + // var rng = generator.Next(0, 101); + // var mult = 0; + // if (rng < 67) + // { + // mult = 0; + // } + // else if (rng < 91) + // { + // mult = 2; + // } + // else if (rng < 100) + // { + // mult = 4; + // } + // else + // mult = 10; + + // if (dict.ContainsKey(mult)) + // dict[mult] += 1; + // else + // dict.Add(mult, 1); + // } + + // var sb = new StringBuilder(); + // const int bet = 1; + // int payout = 0; + // foreach (var key in dict.Keys.OrderByDescending(x => x)) + // { + // sb.AppendLine($"x{key} occured {dict[key]} times. {dict[key] * 1.0f / tests * 100}%"); + // payout += key * dict[key]; + // } + // try + // { + // await Context.Channel.SendConfirmAsync("BetRoll Test Results", sb.ToString(), + // footer: $"Total Bet: {tests * bet} | Payout: {payout * bet} | {payout * 1.0f / tests * 100}%"); + // } + // catch { } + + // }); + // return Task.CompletedTask; + //} + + [NadekoCommand, Usage, Description, Aliases] + public async Task BetRoll(long amount) + { + if (amount < 1) + return; + + if (!await _currency.RemoveAsync(Context.User, "Betroll Gamble", amount, false).ConfigureAwait(false)) + { + await ReplyErrorLocalized("not_enough", CurrencyPluralName).ConfigureAwait(false); + return; + } + + var rnd = new NadekoRandom().Next(0, 101); + var str = Context.User.Mention + Format.Code(GetText("roll", rnd)); + if (rnd < 67) + { + str += GetText("better_luck"); + } + else + { + if (rnd < 91) + { + str += GetText("br_win", (amount * _bc.BotConfig.Betroll67Multiplier) + CurrencySign, 66); + await _currency.AddAsync(Context.User, "Betroll Gamble", + (int) (amount * _bc.BotConfig.Betroll67Multiplier), false).ConfigureAwait(false); + } + else if (rnd < 100) + { + str += GetText("br_win", (amount * _bc.BotConfig.Betroll91Multiplier) + CurrencySign, 90); + await _currency.AddAsync(Context.User, "Betroll Gamble", + (int) (amount * _bc.BotConfig.Betroll91Multiplier), false).ConfigureAwait(false); + } + else + { + str += GetText("br_win", (amount * _bc.BotConfig.Betroll100Multiplier) + CurrencySign, 100) + " 👑"; + await _currency.AddAsync(Context.User, "Betroll Gamble", + (int) (amount * _bc.BotConfig.Betroll100Multiplier), false).ConfigureAwait(false); + } + } + await Context.Channel.SendConfirmAsync(str).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Leaderboard(int page = 1) + { + if (page < 1) + return; + + List richest; + using (var uow = _db.UnitOfWork) + { + richest = uow.Currency.GetTopRichest(9, 9 * (page - 1)).ToList(); + } + + var embed = new EmbedBuilder() + .WithOkColor() + .WithTitle(CurrencySign + + " " + GetText("leaderboard")) + .WithFooter(efb => efb.WithText(GetText("page", page))); + + if (!richest.Any()) + { + embed.WithDescription(GetText("no_users_found")); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + return; + } + + for (var i = 0; i < richest.Count; i++) + { + var x = richest[i]; + var usr = await Context.Guild.GetUserAsync(x.UserId).ConfigureAwait(false); + var usrStr = usr == null + ? x.UserId.ToString() + : usr.Username?.TrimTo(20, true); + + var j = i; + embed.AddField(efb => efb.WithName("#" + (9 * (page - 1) + j + 1) + " " + usrStr) + .WithValue(x.Amount.ToString() + " " + CurrencySign) + .WithIsInline(true)); + } + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs b/NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs new file mode 100644 index 00000000..6ad6b6b4 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs @@ -0,0 +1,21 @@ +using System.Threading.Tasks; +using NadekoBot.Core.Services; +using System.Collections.Concurrent; +using NadekoBot.Modules.Gambling.Common.AnimalRacing; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class AnimalRaceService : INService, IUnloadableService + { + public ConcurrentDictionary AnimalRaces { get; } = new ConcurrentDictionary(); + + public Task Unload() + { + foreach (var kvp in AnimalRaces) + { + try { kvp.Value.Dispose(); } catch { } + } + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs b/NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs new file mode 100644 index 00000000..3dcd34e9 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs @@ -0,0 +1,66 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Modules.Gambling.Common.CurrencyEvents; +using NadekoBot.Core.Services; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class CurrencyEventsService : INService, IUnloadableService + { + public ConcurrentDictionary> ReactionEvents { get; } + + public SneakyEvent SneakyEvent { get; private set; } = null; + private SemaphoreSlim _sneakyLock = new SemaphoreSlim(1, 1); + + public CurrencyEventsService() + { + ReactionEvents = new ConcurrentDictionary>(); + } + + public async Task StartSneakyEvent(SneakyEvent ev, IUserMessage msg, ICommandContext ctx) + { + await _sneakyLock.WaitAsync().ConfigureAwait(false); + try + { + if (SneakyEvent != null) + return false; + + SneakyEvent = ev; + ev.OnEnded += () => SneakyEvent = null; + var _ = SneakyEvent.Start(msg, ctx).ConfigureAwait(false); + } + finally + { + _sneakyLock.Release(); + } + return true; + } + + public async Task Unload() + { + foreach (var kvp in ReactionEvents) + { + foreach (var ev in kvp.Value) + { + try { await ev.Stop().ConfigureAwait(false); } catch { } + } + } + ReactionEvents.Clear(); + + await _sneakyLock.WaitAsync().ConfigureAwait(false); + try + { + await SneakyEvent.Stop().ConfigureAwait(false); + } + finally + { + _sneakyLock.Release(); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs b/NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs new file mode 100644 index 00000000..2fbc4f26 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs @@ -0,0 +1,12 @@ +using NadekoBot.Core.Services; +using System; +using System.Collections.Concurrent; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class WaifuService : INService + { + public ConcurrentDictionary DivorceCooldowns { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AffinityCooldowns { get; } = new ConcurrentDictionary(); + } +} diff --git a/NadekoBot.Core/Modules/Gambling/SlotCommands.cs b/NadekoBot.Core/Modules/Gambling/SlotCommands.cs new file mode 100644 index 00000000..39f3cf9e --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/SlotCommands.cs @@ -0,0 +1,239 @@ +using Discord; +using Discord.Commands; +using ImageSharp; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using SixLabors.Primitives; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class SlotCommands : NadekoSubmodule + { + private static int _totalBet; + private static int _totalPaidOut; + + private static readonly HashSet _runningUsers = new HashSet(); + private readonly IBotConfigProvider _bc; + + private const int _alphaCutOut = byte.MaxValue / 3; + + //here is a payout chart + //https://lh6.googleusercontent.com/-i1hjAJy_kN4/UswKxmhrbPI/AAAAAAAAB1U/82wq_4ZZc-Y/DE6B0895-6FC1-48BE-AC4F-14D1B91AB75B.jpg + //thanks to judge for helping me with this + + private readonly IImagesService _images; + private readonly CurrencyService _cs; + + public SlotCommands(IImagesService images, IBotConfigProvider bc, CurrencyService cs) + { + _images = images; + _bc = bc; + _cs = cs; + } + + public class SlotMachine + { + public const int MaxValue = 5; + + static readonly List> _winningCombos = new List>() + { + //three flowers + (arr) => arr.All(a=>a==MaxValue) ? 30 : 0, + //three of the same + (arr) => !arr.Any(a => a != arr[0]) ? 10 : 0, + //two flowers + (arr) => arr.Count(a => a == MaxValue) == 2 ? 4 : 0, + //one flower + (arr) => arr.Any(a => a == MaxValue) ? 1 : 0, + }; + + public static SlotResult Pull() + { + var numbers = new int[3]; + for (var i = 0; i < numbers.Length; i++) + { + numbers[i] = new NadekoRandom().Next(0, MaxValue + 1); + } + var multi = 0; + foreach (var t in _winningCombos) + { + multi = t(numbers); + if (multi != 0) + break; + } + + return new SlotResult(numbers, multi); + } + + public struct SlotResult + { + public int[] Numbers { get; } + public int Multiplier { get; } + public SlotResult(int[] nums, int multi) + { + Numbers = nums; + Multiplier = multi; + } + } + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task SlotStats() + { + //i remembered to not be a moron + var paid = _totalPaidOut; + var bet = _totalBet; + + if (bet <= 0) + bet = 1; + + var embed = new EmbedBuilder() + .WithOkColor() + .WithTitle("Slot Stats") + .AddField(efb => efb.WithName("Total Bet").WithValue(bet.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName("Paid Out").WithValue(paid.ToString()).WithIsInline(true)) + .WithFooter(efb => efb.WithText($"Payout Rate: {paid * 1.0 / bet * 100:f4}%")); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task SlotTest(int tests = 1000) + { + if (tests <= 0) + return; + //multi vs how many times it occured + var dict = new Dictionary(); + for (int i = 0; i < tests; i++) + { + var res = SlotMachine.Pull(); + if (dict.ContainsKey(res.Multiplier)) + dict[res.Multiplier] += 1; + else + dict.Add(res.Multiplier, 1); + } + + var sb = new StringBuilder(); + const int bet = 1; + int payout = 0; + foreach (var key in dict.Keys.OrderByDescending(x => x)) + { + sb.AppendLine($"x{key} occured {dict[key]} times. {dict[key] * 1.0f / tests * 100}%"); + payout += key * dict[key]; + } + await Context.Channel.SendConfirmAsync("Slot Test Results", sb.ToString(), + footer: $"Total Bet: {tests * bet} | Payout: {payout * bet} | {payout * 1.0f / tests * 100}%"); + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Slot(int amount = 0) + { + if (!_runningUsers.Add(Context.User.Id)) + return; + try + { + if (amount < 1) + { + await ReplyErrorLocalized("min_bet_limit", 1 + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + const int maxAmount = 9999; + if (amount > maxAmount) + { + GetText("slot_maxbet", maxAmount + _bc.BotConfig.CurrencySign); + await ReplyErrorLocalized("max_bet_limit", maxAmount + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + + if (!await _cs.RemoveAsync(Context.User, "Slot Machine", amount, false)) + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + Interlocked.Add(ref _totalBet, amount); + using (var bgFileStream = _images.SlotBackground.ToStream()) + { + var bgImage = ImageSharp.Image.Load(bgFileStream); + + var result = SlotMachine.Pull(); + int[] numbers = result.Numbers; + + for (int i = 0; i < 3; i++) + { + using (var file = _images.SlotEmojis[numbers[i]].ToStream()) + using (var randomImage = ImageSharp.Image.Load(file)) + { + bgImage.DrawImage(randomImage, 100, default, new Point(95 + 142 * i, 330)); + } + } + + var won = amount * result.Multiplier; + var printWon = won; + var n = 0; + do + { + var digit = printWon % 10; + using (var fs = _images.SlotNumbers[digit].ToStream()) + using (var img = ImageSharp.Image.Load(fs)) + { + bgImage.DrawImage(img, 100, default, new Point(230 - n * 16, 462)); + } + n++; + } while ((printWon /= 10) != 0); + + var printAmount = amount; + n = 0; + do + { + var digit = printAmount % 10; + using (var fs = _images.SlotNumbers[digit].ToStream()) + using (var img = ImageSharp.Image.Load(fs)) + { + bgImage.DrawImage(img, 100, default, new Point(395 - n * 16, 462)); + } + n++; + } while ((printAmount /= 10) != 0); + + var msg = GetText("better_luck"); + if (result.Multiplier != 0) + { + await _cs.AddAsync(Context.User, $"Slot Machine x{result.Multiplier}", amount * result.Multiplier, false); + Interlocked.Add(ref _totalPaidOut, amount * result.Multiplier); + if (result.Multiplier == 1) + msg = GetText("slot_single", _bc.BotConfig.CurrencySign, 1); + else if (result.Multiplier == 4) + msg = GetText("slot_two", _bc.BotConfig.CurrencySign, 4); + else if (result.Multiplier == 10) + msg = GetText("slot_three", 10); + else if (result.Multiplier == 30) + msg = GetText("slot_jackpot", 30); + } + + await Context.Channel.SendFileAsync(bgImage.ToStream(), "result.png", Context.User.Mention + " " + msg + $"\n`{GetText("slot_bet")}:`{amount} `{GetText("slot_won")}:` {amount * result.Multiplier}{_bc.BotConfig.CurrencySign}").ConfigureAwait(false); + } + } + finally + { + var _ = Task.Run(async () => + { + await Task.Delay(1500); + _runningUsers.Remove(Context.User.Id); + }); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs b/NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs new file mode 100644 index 00000000..630a1652 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs @@ -0,0 +1,617 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Services; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + public enum ClaimTitles + { + Lonely, + Devoted, + Rookie, + Schemer, + Dilettante, + Intermediate, + Seducer, + Expert, + Veteran, + Incubis, + Harem_King, + Harem_God, + } + + public enum AffinityTitles + { + Pure, + Faithful, + Defiled, + Cheater, + Tainted, + Corrupted, + Lewd, + Sloot, + Depraved, + Harlot + } + + [Group] + public class WaifuClaimCommands : NadekoSubmodule + { + enum WaifuClaimResult + { + Success, + NotEnoughFunds, + InsufficientAmount + } + + public WaifuClaimCommands(IBotConfigProvider bc, CurrencyService cs, DbService db) + { + _bc = bc; + _cs = cs; + _db = db; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task WaifuClaim(int amount, [Remainder]IUser target) + { + if (amount < 50) + { + await ReplyErrorLocalized("waifu_isnt_cheap", 50 + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + + if (target.Id == Context.User.Id) + { + await ReplyErrorLocalized("waifu_not_yourself").ConfigureAwait(false); + return; + } + + WaifuClaimResult result; + WaifuInfo w; + bool isAffinity; + using (var uow = _db.UnitOfWork) + { + w = uow.Waifus.ByWaifuUserId(target.Id); + isAffinity = (w?.Affinity?.UserId == Context.User.Id); + if (w == null) + { + var claimer = uow.DiscordUsers.GetOrCreate(Context.User); + var waifu = uow.DiscordUsers.GetOrCreate(target); + if (!await _cs.RemoveAsync(Context.User.Id, "Claimed Waifu", amount, uow).ConfigureAwait(false)) + { + result = WaifuClaimResult.NotEnoughFunds; + } + else + { + uow.Waifus.Add(w = new WaifuInfo() + { + Waifu = waifu, + Claimer = claimer, + Affinity = null, + Price = amount + }); + uow._context.WaifuUpdates.Add(new WaifuUpdate() + { + User = waifu, + Old = null, + New = claimer, + UpdateType = WaifuUpdateType.Claimed + }); + result = WaifuClaimResult.Success; + } + } + else if (isAffinity && amount > w.Price * 0.88f) + { + if (!await _cs.RemoveAsync(Context.User.Id, "Claimed Waifu", amount, uow).ConfigureAwait(false)) + { + result = WaifuClaimResult.NotEnoughFunds; + } + else + { + var oldClaimer = w.Claimer; + w.Claimer = uow.DiscordUsers.GetOrCreate(Context.User); + w.Price = amount + (amount / 4); + result = WaifuClaimResult.Success; + + uow._context.WaifuUpdates.Add(new WaifuUpdate() + { + User = w.Waifu, + Old = oldClaimer, + New = w.Claimer, + UpdateType = WaifuUpdateType.Claimed + }); + } + } + else if (amount >= w.Price * 1.1f) // if no affinity + { + if (!await _cs.RemoveAsync(Context.User.Id, "Claimed Waifu", amount, uow).ConfigureAwait(false)) + { + result = WaifuClaimResult.NotEnoughFunds; + } + else + { + var oldClaimer = w.Claimer; + w.Claimer = uow.DiscordUsers.GetOrCreate(Context.User); + w.Price = amount; + result = WaifuClaimResult.Success; + + uow._context.WaifuUpdates.Add(new WaifuUpdate() + { + User = w.Waifu, + Old = oldClaimer, + New = w.Claimer, + UpdateType = WaifuUpdateType.Claimed + }); + } + } + else + result = WaifuClaimResult.InsufficientAmount; + + + await uow.CompleteAsync().ConfigureAwait(false); + } + + if (result == WaifuClaimResult.InsufficientAmount) + { + await ReplyErrorLocalized("waifu_not_enough", Math.Ceiling(w.Price * (isAffinity ? 0.88f : 1.1f))).ConfigureAwait(false); + return; + } + if (result == WaifuClaimResult.NotEnoughFunds) + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + var msg = GetText("waifu_claimed", + Format.Bold(target.ToString()), + amount + _bc.BotConfig.CurrencySign); + if (w.Affinity?.UserId == Context.User.Id) + msg += "\n" + GetText("waifu_fulfilled", target, w.Price + _bc.BotConfig.CurrencySign); + else + msg = " " + msg; + await Context.Channel.SendConfirmAsync(Context.User.Mention + msg).ConfigureAwait(false); + } + + public enum DivorceResult + { + Success, + SucessWithPenalty, + NotYourWife, + Cooldown + } + + + private static readonly TimeSpan _divorceLimit = TimeSpan.FromHours(6); + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(0)] + public Task Divorce([Remainder]IGuildUser target) => Divorce(target.Id); + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public async Task Divorce([Remainder]ulong targetId) + { + if (targetId == Context.User.Id) + return; + + DivorceResult result; + var difference = TimeSpan.Zero; + var amount = 0; + WaifuInfo w = null; + using (var uow = _db.UnitOfWork) + { + w = uow.Waifus.ByWaifuUserId(targetId); + var now = DateTime.UtcNow; + if (w?.Claimer == null || w.Claimer.UserId != Context.User.Id) + result = DivorceResult.NotYourWife; + else if (_service.DivorceCooldowns.AddOrUpdate(Context.User.Id, + now, + (key, old) => ((difference = now.Subtract(old)) > _divorceLimit) ? now : old) != now) + { + result = DivorceResult.Cooldown; + } + else + { + amount = w.Price / 2; + + if (w.Affinity?.UserId == Context.User.Id) + { + await _cs.AddAsync(w.Waifu.UserId, "Waifu Compensation", amount, uow).ConfigureAwait(false); + w.Price = (int)Math.Floor(w.Price * 0.75f); + result = DivorceResult.SucessWithPenalty; + } + else + { + await _cs.AddAsync(Context.User.Id, "Waifu Refund", amount, uow).ConfigureAwait(false); + + result = DivorceResult.Success; + } + var oldClaimer = w.Claimer; + w.Claimer = null; + + uow._context.WaifuUpdates.Add(new WaifuUpdate() + { + User = w.Waifu, + Old = oldClaimer, + New = null, + UpdateType = WaifuUpdateType.Claimed + }); + } + + await uow.CompleteAsync().ConfigureAwait(false); + } + + if (result == DivorceResult.SucessWithPenalty) + { + await ReplyConfirmLocalized("waifu_divorced_like", Format.Bold(w.Waifu.ToString()), amount + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + } + else if (result == DivorceResult.Success) + { + await ReplyConfirmLocalized("waifu_divorced_notlike", amount + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + } + else if (result == DivorceResult.NotYourWife) + { + await ReplyErrorLocalized("waifu_not_yours").ConfigureAwait(false); + } + else + { + var remaining = _divorceLimit.Subtract(difference); + await ReplyErrorLocalized("waifu_recent_divorce", + Format.Bold(((int)remaining.TotalHours).ToString()), + Format.Bold(remaining.Minutes.ToString())).ConfigureAwait(false); + } + } + + private static readonly TimeSpan _affinityLimit = TimeSpan.FromMinutes(30); + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + private readonly DbService _db; + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task WaifuClaimerAffinity([Remainder]IGuildUser u = null) + { + if (u?.Id == Context.User.Id) + { + await ReplyErrorLocalized("waifu_egomaniac").ConfigureAwait(false); + return; + } + DiscordUser oldAff = null; + var sucess = false; + var cooldown = false; + var difference = TimeSpan.Zero; + using (var uow = _db.UnitOfWork) + { + var w = uow.Waifus.ByWaifuUserId(Context.User.Id); + var newAff = u == null ? null : uow.DiscordUsers.GetOrCreate(u); + var now = DateTime.UtcNow; + if (w?.Affinity?.UserId == u?.Id) + { + } + else if (_service.AffinityCooldowns.AddOrUpdate(Context.User.Id, + now, + (key, old) => ((difference = now.Subtract(old)) > _affinityLimit) ? now : old) != now) + { + cooldown = true; + } + else if (w == null) + { + var thisUser = uow.DiscordUsers.GetOrCreate(Context.User); + uow.Waifus.Add(new WaifuInfo() + { + Affinity = newAff, + Waifu = thisUser, + Price = 1, + Claimer = null + }); + sucess = true; + + uow._context.WaifuUpdates.Add(new WaifuUpdate() + { + User = thisUser, + Old = null, + New = newAff, + UpdateType = WaifuUpdateType.AffinityChanged + }); + } + else + { + if (w.Affinity != null) + oldAff = w.Affinity; + w.Affinity = newAff; + sucess = true; + + uow._context.WaifuUpdates.Add(new WaifuUpdate() + { + User = w.Waifu, + Old = oldAff, + New = newAff, + UpdateType = WaifuUpdateType.AffinityChanged + }); + } + + await uow.CompleteAsync().ConfigureAwait(false); + } + if (!sucess) + { + if (cooldown) + { + var remaining = _affinityLimit.Subtract(difference); + await ReplyErrorLocalized("waifu_affinity_cooldown", + Format.Bold(((int)remaining.TotalHours).ToString()), + Format.Bold(remaining.Minutes.ToString())).ConfigureAwait(false); + } + else + { + await ReplyErrorLocalized("waifu_affinity_already").ConfigureAwait(false); + } + return; + } + if (u == null) + { + await ReplyConfirmLocalized("waifu_affinity_reset").ConfigureAwait(false); + } + else if (oldAff == null) + { + await ReplyConfirmLocalized("waifu_affinity_set", Format.Bold(u.ToString())).ConfigureAwait(false); + } + else + { + await ReplyConfirmLocalized("waifu_affinity_changed", Format.Bold(oldAff.ToString()), Format.Bold(u.ToString())).ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task WaifuLeaderboard(int page = 1) + { + page--; + + if (page < 0) + return; + + IList waifus; + using (var uow = _db.UnitOfWork) + { + waifus = uow.Waifus.GetTop(9, page * 9); + } + + if (waifus.Count == 0) + { + await ReplyConfirmLocalized("waifus_none").ConfigureAwait(false); + return; + } + + var embed = new EmbedBuilder() + .WithTitle(GetText("waifus_top_waifus")) + .WithOkColor(); + + for (var i = 0; i < waifus.Count; i++) + { + var w = waifus[i]; + + var j = i; + embed.AddField(efb => efb.WithName("#" + ((page * 9) + j + 1) + " - " + w.Price + _bc.BotConfig.CurrencySign).WithValue(w.ToString()).WithIsInline(false)); + } + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task WaifuInfo([Remainder]IGuildUser target = null) + { + if (target == null) + target = (IGuildUser)Context.User; + WaifuInfo w; + IList claims; + int divorces; + using (var uow = _db.UnitOfWork) + { + w = uow.Waifus.ByWaifuUserId(target.Id); + claims = uow.Waifus.ByClaimerUserId(target.Id); + divorces = uow._context.WaifuUpdates.Count(x => x.Old != null && + x.Old.UserId == target.Id && + x.UpdateType == WaifuUpdateType.Claimed && + x.New == null); + if (w == null) + { + uow.Waifus.Add(w = new WaifuInfo() + { + Affinity = null, + Claimer = null, + Price = 1, + Waifu = uow.DiscordUsers.GetOrCreate(target), + }); + } + + w.Waifu.Username = target.Username; + w.Waifu.Discriminator = target.Discriminator; + await uow.CompleteAsync().ConfigureAwait(false); + } + + var claimInfo = GetClaimTitle(target.Id); + var affInfo = GetAffinityTitle(target.Id); + + var rng = new NadekoRandom(); + + var nobody = GetText("nobody"); + var embed = new EmbedBuilder() + .WithOkColor() + .WithTitle("Waifu " + w.Waifu + " - \"the " + claimInfo.Title + "\"") + .AddField(efb => efb.WithName(GetText("price")).WithValue(w.Price.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("claimed_by")).WithValue(w.Claimer?.ToString() ?? nobody).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("likes")).WithValue(w.Affinity?.ToString() ?? nobody).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("changes_of_heart")).WithValue($"{affInfo.Count} - \"the {affInfo.Title}\"").WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("divorces")).WithValue(divorces.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("gifts")).WithValue(!w.Items.Any() ? "-" : string.Join("\n", w.Items.OrderBy(x => x.Price).GroupBy(x => x.ItemEmoji).Select(x => $"{x.Key} x{x.Count()}"))).WithIsInline(false)) + .AddField(efb => efb.WithName($"Waifus ({claims.Count})").WithValue(claims.Count == 0 ? nobody : string.Join("\n", claims.OrderBy(x => rng.Next()).Take(30).Select(x => x.Waifu))).WithIsInline(false)); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public async Task WaifuGift() + { + var embed = new EmbedBuilder() + .WithTitle(GetText("waifu_gift_shop")) + .WithOkColor(); + + Enum.GetValues(typeof(WaifuItem.ItemName)) + .Cast() + .Select(x => WaifuItem.GetItem(x)) + .ForEach(x => embed.AddField(f => f.WithName(x.ItemEmoji + " " + x.Item).WithValue(x.Price).WithIsInline(true))); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(0)] + public async Task WaifuGift(WaifuItem.ItemName item, [Remainder] IUser waifu) + { + if (waifu.Id == Context.User.Id) + return; + + var itemObj = WaifuItem.GetItem(item); + + using (var uow = _db.UnitOfWork) + { + var w = uow.Waifus.ByWaifuUserId(waifu.Id); + + //try to buy the item first + + if (!await _cs.RemoveAsync(Context.User.Id, "Bought waifu item", itemObj.Price, uow)) + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + if (w == null) + { + uow.Waifus.Add(w = new WaifuInfo() + { + Affinity = null, + Claimer = null, + Price = 1, + Waifu = uow.DiscordUsers.GetOrCreate(waifu), + }); + + w.Waifu.Username = waifu.Username; + w.Waifu.Discriminator = waifu.Discriminator; + } + w.Items.Add(itemObj); + if (w.Claimer?.UserId == Context.User.Id) + { + w.Price += itemObj.Price; + } + else + w.Price += itemObj.Price / 2; + + await uow.CompleteAsync().ConfigureAwait(false); + } + + await ReplyConfirmLocalized("waifu_gift", Format.Bold(item.ToString() + " " +itemObj.ItemEmoji), Format.Bold(waifu.ToString())).ConfigureAwait(false); + } + + + public struct WaifuProfileTitle + { + public int Count { get; } + public string Title { get; } + + public WaifuProfileTitle(int count, string title) + { + Count = count; + Title = title; + } + } + + private WaifuProfileTitle GetClaimTitle(ulong userId) + { + int count; + using (var uow = _db.UnitOfWork) + { + count = uow.Waifus.ByClaimerUserId(userId).Count; + } + + ClaimTitles title; + if (count == 0) + title = ClaimTitles.Lonely; + else if (count == 1) + title = ClaimTitles.Devoted; + else if (count < 4) + title = ClaimTitles.Rookie; + else if (count < 6) + title = ClaimTitles.Schemer; + else if (count < 8) + title = ClaimTitles.Dilettante; + else if (count < 10) + title = ClaimTitles.Intermediate; + else if (count < 12) + title = ClaimTitles.Seducer; + else if (count < 15) + title = ClaimTitles.Expert; + else if (count < 17) + title = ClaimTitles.Veteran; + else if (count < 25) + title = ClaimTitles.Incubis; + else if (count < 50) + title = ClaimTitles.Harem_King; + else + title = ClaimTitles.Harem_God; + + return new WaifuProfileTitle(count, title.ToString().Replace('_', ' ')); + } + + private WaifuProfileTitle GetAffinityTitle(ulong userId) + { + int count; + using (var uow = _db.UnitOfWork) + { + count = uow._context.WaifuUpdates + .Where(w => w.User.UserId == userId && w.UpdateType == WaifuUpdateType.AffinityChanged && w.New != null) + .GroupBy(x => x.New) + .Count(); + } + + AffinityTitles title; + if (count < 1) + title = AffinityTitles.Pure; + else if (count < 2) + title = AffinityTitles.Faithful; + else if (count < 4) + title = AffinityTitles.Defiled; + else if (count < 7) + title = AffinityTitles.Cheater; + else if (count < 9) + title = AffinityTitles.Tainted; + else if (count < 11) + title = AffinityTitles.Corrupted; + else if (count < 13) + title = AffinityTitles.Lewd; + else if (count < 15) + title = AffinityTitles.Sloot; + else if (count < 17) + title = AffinityTitles.Depraved; + else + title = AffinityTitles.Harlot; + + return new WaifuProfileTitle(count, title.ToString().Replace('_', ' ')); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs b/NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs new file mode 100644 index 00000000..ecbf4489 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs @@ -0,0 +1,81 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Common.Attributes; +using NadekoBot.Extensions; +using NadekoBot.Modules.Gambling.Common.WheelOfFortune; +using NadekoBot.Core.Services; +using System.Threading.Tasks; +using Wof = NadekoBot.Modules.Gambling.Common.WheelOfFortune.WheelOfFortune; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + public class WheelOfFortuneCommands : NadekoSubmodule + { + private readonly CurrencyService _cs; + private readonly IBotConfigProvider _bc; + + public WheelOfFortuneCommands(CurrencyService cs, IBotConfigProvider bc) + { + _cs = cs; + _bc = bc; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task WheelOfFortune(int bet) + { + const int minBet = 10; + if (bet < minBet) + { + await ReplyErrorLocalized("min_bet_limit", minBet + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + + if (!await _cs.RemoveAsync(Context.User.Id, "Wheel Of Fortune - bet", bet).ConfigureAwait(false)) + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + + var wof = new WheelOfFortune(); + + var amount = (int)(bet * wof.Multiplier); + + if (amount > 0) + await _cs.AddAsync(Context.User.Id, "Wheel Of Fortune - won", amount).ConfigureAwait(false); + + await Context.Channel.SendConfirmAsync( +Format.Bold($@"{Context.User.ToString()} won: {amount + _bc.BotConfig.CurrencySign} + + 『{Wof.Multipliers[1]}』 『{Wof.Multipliers[0]}』 『{Wof.Multipliers[7]}』 + +『{Wof.Multipliers[2]}』 {wof.Emoji} 『{Wof.Multipliers[6]}』 + + 『{Wof.Multipliers[3]}』 『{Wof.Multipliers[4]}』 『{Wof.Multipliers[5]}』")).ConfigureAwait(false); + } + + //[NadekoCommand, Usage, Description, Aliases] + //[RequireContext(ContextType.Guild)] + //public async Task WofTest(int length = 1000) + //{ + // var mults = new Dictionary(); + // for (int i = 0; i < length; i++) + // { + // var x = new Wof(); + // if (mults.ContainsKey(x.Multiplier)) + // ++mults[x.Multiplier]; + // else + // mults.Add(x.Multiplier, 1); + // } + + // var payout = mults.Sum(x => x.Key * x.Value); + // await Context.Channel.SendMessageAsync($"Total bet: {length}\n" + + // $"Paid out: {payout}\n" + + // $"Total Payout: {payout / length:F3}x") + // .ConfigureAwait(false); + //} + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/AcropobiaCommands.cs b/NadekoBot.Core/Modules/Games/AcropobiaCommands.cs new file mode 100644 index 00000000..7b98c638 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/AcropobiaCommands.cs @@ -0,0 +1,148 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Common.Acrophobia; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class AcropobiaCommands : NadekoSubmodule + { + private readonly DiscordSocketClient _client; + + public AcropobiaCommands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Acro(int submissionTime = 30) + { + if (submissionTime < 10 || submissionTime > 120) + return; + var channel = (ITextChannel)Context.Channel; + + var game = new Acrophobia(submissionTime); + if (_service.AcrophobiaGames.TryAdd(channel.Id, game)) + { + try + { + game.OnStarted += Game_OnStarted; + game.OnEnded += Game_OnEnded; + game.OnVotingStarted += Game_OnVotingStarted; + game.OnUserVoted += Game_OnUserVoted; + _client.MessageReceived += _client_MessageReceived; + await game.Run().ConfigureAwait(false); + } + finally + { + _client.MessageReceived -= _client_MessageReceived; + _service.AcrophobiaGames.TryRemove(channel.Id, out game); + game.Dispose(); + } + } + else + { + await ReplyErrorLocalized("acro_running").ConfigureAwait(false); + } + + Task _client_MessageReceived(SocketMessage msg) + { + if (msg.Channel.Id != Context.Channel.Id) + return Task.CompletedTask; + + var _ = Task.Run(async () => + { + try + { + var success = await game.UserInput(msg.Author.Id, msg.Author.ToString(), msg.Content) + .ConfigureAwait(false); + if (success) + await msg.DeleteAsync().ConfigureAwait(false); + } + catch { } + }); + + return Task.CompletedTask; + } + } + + private Task Game_OnStarted(Acrophobia game) + { + var embed = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("acrophobia")) + .WithDescription(GetText("acro_started", Format.Bold(string.Join(".", game.StartingLetters)))) + .WithFooter(efb => efb.WithText(GetText("acro_started_footer", game.SubmissionPhaseLength))); + + return Context.Channel.EmbedAsync(embed); + } + + private Task Game_OnUserVoted(string user) + { + return Context.Channel.SendConfirmAsync( + GetText("acrophobia"), + GetText("acro_vote_cast", Format.Bold(user))); + } + + private async Task Game_OnVotingStarted(Acrophobia game, ImmutableArray> submissions) + { + if (submissions.Length == 0) + { + await Context.Channel.SendErrorAsync(GetText("acrophobia"), GetText("acro_ended_no_sub")); + return; + } + if (submissions.Length == 1) + { + await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithDescription( + GetText("acro_winner_only", + Format.Bold(submissions.First().Key.UserName))) + .WithFooter(efb => efb.WithText(submissions.First().Key.Input))) + .ConfigureAwait(false); + return; + } + + + var i = 0; + var embed = new EmbedBuilder() + .WithOkColor() + .WithTitle(GetText("acrophobia") + " - " + GetText("submissions_closed")) + .WithDescription(GetText("acro_nym_was", Format.Bold(string.Join(".", game.StartingLetters)) + "\n" + +$@"-- +{submissions.Aggregate("", (agg, cur) => agg + $"`{++i}.` **{cur.Key.Input}**\n")} +--")) + .WithFooter(efb => efb.WithText(GetText("acro_vote"))); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + private async Task Game_OnEnded(Acrophobia game, ImmutableArray> votes) + { + if (!votes.Any() || votes.All(x => x.Value == 0)) + { + await Context.Channel.SendErrorAsync(GetText("acrophobia"), GetText("acro_no_votes_cast")).ConfigureAwait(false); + return; + } + var table = votes.OrderByDescending(v => v.Value); + var winner = table.First(); + var embed = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("acrophobia")) + .WithDescription(GetText("acro_winner", Format.Bold(winner.Key.UserName), + Format.Bold(winner.Value.ToString()))) + .WithFooter(efb => efb.WithText(winner.Key.Input)); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/CleverBotCommands.cs b/NadekoBot.Core/Modules/Games/CleverBotCommands.cs new file mode 100644 index 00000000..093b7530 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/CleverBotCommands.cs @@ -0,0 +1,56 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Core.Services; +using System; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Services; +using NadekoBot.Modules.Games.Common.ChatterBot; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class ChatterBotCommands : NadekoSubmodule + { + private readonly DbService _db; + + public ChatterBotCommands(DbService db) + { + _db = db; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.ManageMessages)] + public async Task Cleverbot() + { + var channel = (ITextChannel)Context.Channel; + + if (_service.ChatterBotGuilds.TryRemove(channel.Guild.Id, out _)) + { + using (var uow = _db.UnitOfWork) + { + uow.GuildConfigs.SetCleverbotEnabled(Context.Guild.Id, false); + await uow.CompleteAsync().ConfigureAwait(false); + } + await ReplyConfirmLocalized("cleverbot_disabled").ConfigureAwait(false); + return; + } + + _service.ChatterBotGuilds.TryAdd(channel.Guild.Id, new Lazy(() => _service.CreateSession(), true)); + + using (var uow = _db.UnitOfWork) + { + uow.GuildConfigs.SetCleverbotEnabled(Context.Guild.Id, true); + await uow.CompleteAsync().ConfigureAwait(false); + } + + await ReplyConfirmLocalized("cleverbot_enabled").ConfigureAwait(false); + } + } + + + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/Common/Acrophobia/Acrophobia.cs b/NadekoBot.Core/Modules/Games/Common/Acrophobia/Acrophobia.cs new file mode 100644 index 00000000..daeaf8a6 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Acrophobia/Acrophobia.cs @@ -0,0 +1,177 @@ +using NadekoBot.Common; +using NadekoBot.Extensions; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.Acrophobia +{ + /// + /// Platform-agnostic acrophobia game + /// + public class Acrophobia : IDisposable + { + private const int VotingPhaseLength = 30; + + public enum Phase + { + Submission, + Voting, + Ended + } + + public enum UserInputResult + { + Submitted, + SubmissionFailed, + Voted, + VotingFailed, + Failed + } + + public int SubmissionPhaseLength { get; } + + public Phase CurrentPhase { get; private set; } = Phase.Submission; + public ImmutableArray StartingLetters { get; private set; } + + private readonly Dictionary submissions = new Dictionary(); + private readonly SemaphoreSlim locker = new SemaphoreSlim(1, 1); + private readonly NadekoRandom _rng; + + public event Func OnStarted = delegate { return Task.CompletedTask; }; + public event Func>, Task> OnVotingStarted = delegate { return Task.CompletedTask; }; + public event Func OnUserVoted = delegate { return Task.CompletedTask; }; + public event Func>, Task> OnEnded = delegate { return Task.CompletedTask; }; + + private readonly HashSet _usersWhoVoted = new HashSet(); + + public Acrophobia(int submissionPhaseLength = 30) + { + _rng = new NadekoRandom(); + SubmissionPhaseLength = submissionPhaseLength; + InitializeStartingLetters(); + } + + public async Task Run() + { + await OnStarted(this).ConfigureAwait(false); + await Task.Delay(SubmissionPhaseLength * 1000); + await locker.WaitAsync().ConfigureAwait(false); + try + { + if (submissions.Count == 0) + { + CurrentPhase = Phase.Ended; + await OnVotingStarted(this, ImmutableArray.Create>()).ConfigureAwait(false); + return; + } + if (submissions.Count == 1) + { + CurrentPhase = Phase.Ended; + await OnVotingStarted(this, submissions.ToArray().ToImmutableArray()).ConfigureAwait(false); + return; + } + + CurrentPhase = Phase.Voting; + + await OnVotingStarted(this, submissions.ToArray().ToImmutableArray()).ConfigureAwait(false); + } + finally { locker.Release(); } + + await Task.Delay(VotingPhaseLength * 1000); + await locker.WaitAsync().ConfigureAwait(false); + try + { + CurrentPhase = Phase.Ended; + await OnEnded(this, submissions.ToArray().ToImmutableArray()).ConfigureAwait(false) ; + } + finally { locker.Release(); } + } + + private void InitializeStartingLetters() + { + var wordCount = _rng.Next(3, 6); + + var lettersArr = new char[wordCount]; + + for (int i = 0; i < wordCount; i++) + { + var randChar = (char)_rng.Next(65, 91); + lettersArr[i] = randChar == 'X' ? (char)_rng.Next(65, 88) : randChar; + } + StartingLetters = lettersArr.ToImmutableArray(); + } + + public async Task UserInput(ulong userId, string userName, string input) + { + var user = new AcrophobiaUser(userId, userName, input.ToLowerInvariant().ToTitleCase()); + + await locker.WaitAsync(); + try + { + switch (CurrentPhase) + { + case Phase.Submission: + if (submissions.ContainsKey(user) || !IsValidAnswer(input)) + break; + + submissions.Add(user, 0); + return true; + case Phase.Voting: + AcrophobiaUser toVoteFor; + if (!int.TryParse(input, out var index) + || --index < 0 + || index >= submissions.Count + || (toVoteFor = submissions.ToArray()[index].Key).UserId == user.UserId + || !_usersWhoVoted.Add(userId)) + break; + ++submissions[toVoteFor]; + var _ = Task.Run(() => OnUserVoted(userName)); + return true; + default: + break; + } + return false; + } + finally + { + locker.Release(); + } + } + + private bool IsValidAnswer(string input) + { + input = input.ToUpperInvariant(); + + var inputWords = input.Split(' '); + + if (inputWords.Length != StartingLetters.Length) // number of words must be the same as the number of the starting letters + return false; + + for (int i = 0; i < StartingLetters.Length; i++) + { + var letter = StartingLetters[i]; + + if (!inputWords[i].StartsWith(letter.ToString())) // all first letters must match + return false; + } + + return true; + } + + public void Dispose() + { + this.CurrentPhase = Phase.Ended; + OnStarted = null; + OnEnded = null; + OnUserVoted = null; + OnVotingStarted = null; + _usersWhoVoted.Clear(); + submissions.Clear(); + locker.Dispose(); + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs b/NadekoBot.Core/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs new file mode 100644 index 00000000..8801e700 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs @@ -0,0 +1,28 @@ +namespace NadekoBot.Modules.Games.Common.Acrophobia +{ + public class AcrophobiaUser + { + public string UserName { get; } + public ulong UserId { get; } + public string Input { get; } + + public AcrophobiaUser(ulong userId, string userName, string input) + { + this.UserName = userName; + this.UserId = userId; + this.Input = input; + } + + public override int GetHashCode() + { + return UserId.GetHashCode(); + } + + public override bool Equals(object obj) + { + return obj is AcrophobiaUser x + ? x.UserId == this.UserId + : false; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs new file mode 100644 index 00000000..acf5c3de --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs @@ -0,0 +1,8 @@ +namespace NadekoBot.Modules.Games.Common.ChatterBot +{ + public class ChatterBotResponse + { + public string Convo_id { get; set; } + public string BotSay { get; set; } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotSession.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotSession.cs new file mode 100644 index 00000000..347a705a --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotSession.cs @@ -0,0 +1,37 @@ +using System.Net.Http; +using System.Threading.Tasks; +using NadekoBot.Common; +using NadekoBot.Extensions; +using Newtonsoft.Json; + +namespace NadekoBot.Modules.Games.Common.ChatterBot +{ + public class ChatterBotSession : IChatterBotSession + { + private static NadekoRandom Rng { get; } = new NadekoRandom(); + + private readonly string _chatterBotId; + private int _botId = 6; + + public ChatterBotSession() + { + _chatterBotId = Rng.Next(0, 1000000).ToString().ToBase64(); + } + + private string apiEndpoint => "http://api.program-o.com/v2/chatbot/" + + $"?bot_id={_botId}&" + + "say={0}&" + + $"convo_id=nadekobot_{_chatterBotId}&" + + "format=json"; + + public async Task Think(string message) + { + using (var http = new HttpClient()) + { + var res = await http.GetStringAsync(string.Format(apiEndpoint, message)).ConfigureAwait(false); + var cbr = JsonConvert.DeserializeObject(res); + return cbr.BotSay.Replace("
", "\n"); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/ChatterBot/CleverbotResponse.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/CleverbotResponse.cs new file mode 100644 index 00000000..23e2b9e8 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/ChatterBot/CleverbotResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.ChatterBot +{ + public class CleverbotResponse + { + public string Cs { get; set; } + public string Output { get; set; } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/ChatterBot/IChatterBotSession.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/IChatterBotSession.cs new file mode 100644 index 00000000..14b749dc --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/ChatterBot/IChatterBotSession.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.ChatterBot +{ + public interface IChatterBotSession + { + Task Think(string input); + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs new file mode 100644 index 00000000..a970f135 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs @@ -0,0 +1,33 @@ +using Newtonsoft.Json; +using System.Net.Http; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.ChatterBot +{ + public class OfficialCleverbotSession : IChatterBotSession + { + private readonly string _apiKey; + private string _cs = null; + + private string queryString => $"https://www.cleverbot.com/getreply?key={_apiKey}" + + "&wrapper=nadekobot" + + "&input={0}" + + "&cs={1}"; + + public OfficialCleverbotSession(string apiKey) + { + this._apiKey = apiKey; + } + + public async Task Think(string input) + { + using (var http = new HttpClient()) + { + var dataString = await http.GetStringAsync(string.Format(queryString, input, _cs ?? "")).ConfigureAwait(false); + var data = JsonConvert.DeserializeObject(dataString); + _cs = data?.Cs; + return data?.Output; + } + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Connect4/Connect4.cs b/NadekoBot.Core/Modules/Games/Common/Connect4/Connect4.cs new file mode 100644 index 00000000..ae475e5e --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Connect4/Connect4.cs @@ -0,0 +1,364 @@ +using NadekoBot.Common; +using System; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.Connect4 +{ + public class Connect4Game : IDisposable + { + public enum Phase + { + Joining, // waiting for second player to join + P1Move, + P2Move, + Ended, + } + + public enum Field //temporary most likely + { + Empty, + P1, + P2, + } + + public enum Result + { + Draw, + CurrentPlayerWon, + OtherPlayerWon, + } + + public const int NumberOfColumns = 6; + public const int NumberOfRows = 7; + + public Phase CurrentPhase { get; private set; } = Phase.Joining; + + //state is bottom to top, left to right + private readonly Field[] _gameState = new Field[NumberOfRows * NumberOfColumns]; + private readonly (ulong UserId, string Username)?[] _players = new(ulong, string)?[2]; + + public ImmutableArray GameState => _gameState.ToImmutableArray(); + public ImmutableArray<(ulong UserId, string Username)?> Players => _players.ToImmutableArray(); + + public string CurrentPlayer => CurrentPhase == Phase.P1Move + ? _players[0].Value.Username + : _players[1].Value.Username; + + public string OtherPlayer => CurrentPhase == Phase.P2Move + ? _players[0].Value.Username + : _players[1].Value.Username; + + //public event Func OnGameStarted; + public event Func OnGameStateUpdated; + public event Func OnGameFailedToStart; + public event Func OnGameEnded; + + private readonly SemaphoreSlim _locker = new SemaphoreSlim(1, 1); + private readonly NadekoRandom _rng; + + private Timer _playerTimeoutTimer; + + /* [ ][ ][ ][ ][ ][ ] + * [ ][ ][ ][ ][ ][ ] + * [ ][ ][ ][ ][ ][ ] + * [ ][ ][ ][ ][ ][ ] + * [ ][ ][ ][ ][ ][ ] + * [ ][ ][ ][ ][ ][ ] + * [ ][ ][ ][ ][ ][ ] + */ + + public Connect4Game(ulong userId, string userName) + { + _players[0] = (userId, userName); + + _rng = new NadekoRandom(); + for (int i = 0; i < NumberOfColumns * NumberOfRows; i++) + { + _gameState[i] = Field.Empty; + } + } + + public void Initialize() + { + if (CurrentPhase != Phase.Joining) + return; + var _ = Task.Run(async () => + { + await Task.Delay(15000).ConfigureAwait(false); + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (_players[1] == null) + { + var __ = OnGameFailedToStart?.Invoke(this); + CurrentPhase = Phase.Ended; + return; + } + } + finally { _locker.Release(); } + }); + } + + public async Task Join(ulong userId, string userName) + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (CurrentPhase != Phase.Joining) //can't join if its not a joining phase + return false; + + if (_players[0].Value.UserId == userId) // same user can't join own game + return false; + + if (_rng.Next(0, 2) == 0) //rolling from 0-1, if number is 0, join as first player + { + _players[1] = _players[0]; + _players[0] = (userId, userName); + } + else //else join as a second player + _players[1] = (userId, userName); + + CurrentPhase = Phase.P1Move; //start the game + _playerTimeoutTimer = new Timer(async state => + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + EndGame(Result.OtherPlayerWon); + } + finally { _locker.Release(); } + }, null, TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30)); + var __ = OnGameStateUpdated?.Invoke(this); + + return true; + } + finally { _locker.Release(); } + } + + public async Task Input(ulong userId, string userName, int inputCol) + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + inputCol -= 1; + if (CurrentPhase == Phase.Ended || CurrentPhase == Phase.Joining) + return false; + + if (!((_players[0].Value.UserId == userId && CurrentPhase == Phase.P1Move) + || (_players[1].Value.UserId == userId && CurrentPhase == Phase.P2Move))) + return false; + + if (inputCol < 0 || inputCol > NumberOfColumns) //invalid input + return false; + + if (IsColumnFull(inputCol)) //can't play there event? + return false; + + var start = NumberOfRows * inputCol; + for (int i = start; i < start + NumberOfRows; i++) + { + if (_gameState[i] == Field.Empty) + { + _gameState[i] = GetPlayerPiece(userId); + break; + } + } + + //check winnning condition + // ok, i'll go from [0-2] in rows (and through all columns) and check upward if 4 are connected + + for (int i = 0; i < NumberOfRows - 3; i++) + { + if (CurrentPhase == Phase.Ended) + break; + + for (int j = 0; j < NumberOfColumns; j++) + { + if (CurrentPhase == Phase.Ended) + break; + + var first = _gameState[i + j * NumberOfRows]; + if (first != Field.Empty) + { + //Console.WriteLine(i + j * NumberOfRows); + for (int k = 1; k < 4; k++) + { + var next = _gameState[i + k + j * NumberOfRows]; + if (next == first) + { + //Console.WriteLine(i + k + j * NumberOfRows); + if (k == 3) + EndGame(Result.CurrentPlayerWon); + else + continue; + } + else break; + } + } + } + } + + // i'll go [0-1] in columns (and through all rows) and check to the right if 4 are connected + for (int i = 0; i < NumberOfColumns - 3; i++) + { + if (CurrentPhase == Phase.Ended) + break; + + for (int j = 0; j < NumberOfRows; j++) + { + if (CurrentPhase == Phase.Ended) + break; + + var first = _gameState[j + i * NumberOfRows]; + if (first != Field.Empty) + { + for (int k = 1; k < 4; k++) + { + var next = _gameState[j + (i + k) * NumberOfRows]; + if (next == first) + if (k == 3) + EndGame(Result.CurrentPlayerWon); + else + continue; + else break; + } + } + } + } + + //need to check diagonal now + for (int col = 0; col < NumberOfColumns; col++) + { + if (CurrentPhase == Phase.Ended) + break; + + for (int row = 0; row < NumberOfRows; row++) + { + if (CurrentPhase == Phase.Ended) + break; + + var first = _gameState[row + col * NumberOfRows]; + + if (first != Field.Empty) + { + var same = 1; + + //top left + for (int i = 1; i < 4; i++) + { + //while going top left, rows are increasing, columns are decreasing + var curRow = row + i; + var curCol = col - i; + + //check if current values are in range + if (curRow >= NumberOfRows || curRow < 0) + break; + if (curCol < 0 || curCol >= NumberOfColumns) + break; + + var cur = _gameState[curRow + curCol * NumberOfRows]; + if (cur == first) + same++; + else break; + } + + if (same == 4) + { + Console.WriteLine($"Won top left diagonal starting from {row + col * NumberOfRows}"); + EndGame(Result.CurrentPlayerWon); + break; + } + + same = 1; + + //top right + for (int i = 1; i < 4; i++) + { + //while going top right, rows are increasing, columns are increasing + var curRow = row + i; + var curCol = col + i; + + //check if current values are in range + if (curRow >= NumberOfRows || curRow < 0) + break; + if (curCol < 0 || curCol >= NumberOfColumns) + break; + + var cur = _gameState[curRow + curCol * NumberOfRows]; + if (cur == first) + same++; + else break; + } + + if (same == 4) + { + Console.WriteLine($"Won top right diagonal starting from {row + col * NumberOfRows}"); + EndGame(Result.CurrentPlayerWon); + break; + } + } + } + } + + //check draw? if it's even possible + if (_gameState.All(x => x != Field.Empty)) + { + EndGame(Result.Draw); + } + + if (CurrentPhase != Phase.Ended) + { + if (CurrentPhase == Phase.P1Move) + CurrentPhase = Phase.P2Move; + else + CurrentPhase = Phase.P1Move; + + ResetTimer(); + } + var _ = OnGameStateUpdated?.Invoke(this); + return true; + } + finally { _locker.Release(); } + } + + private void ResetTimer() + { + _playerTimeoutTimer.Change(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30)); + } + + private void EndGame(Result result) + { + if (CurrentPhase == Phase.Ended) + return; + var _ = OnGameEnded?.Invoke(this, result); + CurrentPhase = Phase.Ended; + } + + private Field GetPlayerPiece(ulong userId) => _players[0].Value.UserId == userId + ? Field.P1 + : Field.P2; + + //column is full if there are no empty fields + private bool IsColumnFull(int column) + { + var start = NumberOfRows * column; + for (int i = start; i < start + NumberOfRows; i++) + { + if (_gameState[i] == Field.Empty) + return false; + } + return true; + } + + public void Dispose() + { + OnGameFailedToStart = null; + OnGameStateUpdated = null; + OnGameEnded = null; + _playerTimeoutTimer?.Change(Timeout.Infinite, Timeout.Infinite); + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/GirlRating.cs b/NadekoBot.Core/Modules/Games/Common/GirlRating.cs new file mode 100644 index 00000000..6b7354f3 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/GirlRating.cs @@ -0,0 +1,73 @@ +using System; +using System.IO; +using System.Linq; +using System.Net.Http; +using ImageSharp; +using NadekoBot.Common; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NLog; +using SixLabors.Primitives; + +namespace NadekoBot.Modules.Games.Common +{ + public class GirlRating + { + private static readonly Logger _log = LogManager.GetCurrentClassLogger(); + + public double Crazy { get; } + public double Hot { get; } + public int Roll { get; } + public string Advice { get; } + public AsyncLazy Url { get; } + + public GirlRating(IImagesService _images, double crazy, double hot, int roll, string advice) + { + Crazy = crazy; + Hot = hot; + Roll = roll; + Advice = advice; // convenient to have it here, even though atm there are only few different ones. + + Url = new AsyncLazy(async () => + { + try + { + using (var ms = new MemoryStream(_images.WifeMatrix.ToArray(), false)) + using (var img = Image.Load(ms)) + { + const int minx = 35; + const int miny = 385; + const int length = 345; + + var pointx = (int)(minx + length * (Hot / 10)); + var pointy = (int)(miny - length * ((Crazy - 4) / 6)); + + using (var pointMs = new MemoryStream(_images.RategirlDot.ToArray(), false)) + using (var pointImg = Image.Load(pointMs)) + { + img.DrawImage(pointImg, 100, default(Size), new Point(pointx - 10, pointy - 10)); + } + + string url; + using (var http = new HttpClient()) + using (var imgStream = new MemoryStream()) + { + img.SaveAsPng(imgStream); + var byteContent = new ByteArrayContent(imgStream.ToArray()); + http.AddFakeHeaders(); + + var reponse = await http.PutAsync("https://transfer.sh/img.png", byteContent); + url = await reponse.Content.ReadAsStringAsync(); + } + return url; + } + } + catch (Exception ex) + { + _log.Warn(ex); + return null; + } + }); + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs new file mode 100644 index 00000000..01573bf1 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs @@ -0,0 +1,11 @@ +using System; + +namespace NadekoBot.Modules.Games.Common.Hangman.Exceptions +{ + public class TermNotFoundException : Exception + { + public TermNotFoundException() : base("Term of that type couldn't be found") + { + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs new file mode 100644 index 00000000..3e7be20f --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs @@ -0,0 +1,172 @@ +using NadekoBot.Extensions; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.Hangman +{ + public class Hangman : IDisposable + { + public string TermType { get; } + public TermPool TermPool { get; } + public HangmanObject Term { get; } + + public string ScrambledWord => "`" + String.Concat(Term.Word.Select(c => + { + if (c == ' ') + return " \u2000"; + if (!(char.IsLetter(c) || char.IsDigit(c))) + return $" {c}"; + + c = char.ToLowerInvariant(c); + return _previousGuesses.Contains(c) ? $" {c}" : " ◯"; + })) + "`"; + + private Phase _currentPhase = Phase.Active; + public Phase CurrentPhase + { + get => _currentPhase; + set + { + if (value == Phase.Ended) + _endingCompletionSource.TrySetResult(true); + + _currentPhase = value; + } + } + + private readonly SemaphoreSlim _locker = new SemaphoreSlim(1, 1); + + private readonly HashSet _recentUsers = new HashSet(); + + public uint Errors { get; private set; } = 0; + public uint MaxErrors { get; } = 6; + + public event Func OnGameEnded = delegate { return Task.CompletedTask; }; + public event Func OnLetterAlreadyUsed = delegate { return Task.CompletedTask; }; + public event Func OnGuessFailed = delegate { return Task.CompletedTask; }; + public event Func OnGuessSucceeded = delegate { return Task.CompletedTask; }; + + private readonly HashSet _previousGuesses = new HashSet(); + public ImmutableArray PreviousGuesses => _previousGuesses.ToImmutableArray(); + + private readonly TaskCompletionSource _endingCompletionSource = new TaskCompletionSource(); + + public Task EndedTask => _endingCompletionSource.Task; + + public Hangman(string type, TermPool tp = null) + { + this.TermType = type.Trim().ToLowerInvariant().ToTitleCase(); + this.TermPool = tp ?? new TermPool(); + this.Term = this.TermPool.GetTerm(type); + } + + private void AddError() + { + Errors++; + if (Errors > MaxErrors) + { + var _ = OnGameEnded(this, null); + CurrentPhase = Phase.Ended; + } + } + + public string GetHangman() => $@". ┌─────┐ +.┃...............┋ +.┃...............┋ +.┃{(Errors > 0 ? ".............😲" : "")} +.┃{(Errors > 1 ? "............./" : "")} {(Errors > 2 ? "|" : "")} {(Errors > 3 ? "\\" : "")} +.┃{(Errors > 4 ? "............../" : "")} {(Errors > 5 ? "\\" : "")} +/-\"; + + public async Task Input(ulong userId, string userName, string input) + { + if (CurrentPhase == Phase.Ended) + return; + + if (string.IsNullOrWhiteSpace(input)) + return; + + input = input.Trim().ToLowerInvariant(); + + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (CurrentPhase == Phase.Ended) + return; + + if (input.Length > 1) // tried to guess the whole word + { + if (input != Term.Word) // failed + return; + + var _ = OnGameEnded?.Invoke(this, userName); + CurrentPhase = Phase.Ended; + return; + } + + var ch = input[0]; + + if (!(char.IsLetterOrDigit(ch))) + return; + + if (!_recentUsers.Add(userId)) // don't let a single user spam guesses + return; + + if (!_previousGuesses.Add(ch)) // that latter was already guessed + { + var _ = OnLetterAlreadyUsed?.Invoke(this, userName, ch); + AddError(); + } + else if (!Term.Word.Contains(ch)) // guessed letter doesn't exist + { + var _ = OnGuessFailed?.Invoke(this, userName, ch); + AddError(); + } + else if (Term.Word.All(x => _previousGuesses.IsSupersetOf(Term.Word.ToLowerInvariant() + .Where(c => char.IsLetterOrDigit(c))))) + { + var _ = OnGameEnded.Invoke(this, userName); //if all letters are guessed + CurrentPhase = Phase.Ended; + } + else //guessed but not last letter + { + var _ = OnGuessSucceeded?.Invoke(this, userName, ch); + _recentUsers.Remove(userId); // he can guess again right away + return; + } + + var clearSpam = Task.Run(async () => + { + await Task.Delay(3000).ConfigureAwait(false); // remove the user from the spamlist after 5 seconds + _recentUsers.Remove(userId); + }); + } + finally { _locker.Release(); } + } + + public async Task Stop() + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + CurrentPhase = Phase.Ended; + } + finally { _locker.Release(); } + } + + public void Dispose() + { + OnGameEnded = null; + OnGuessFailed = null; + OnGuessSucceeded = null; + OnLetterAlreadyUsed = null; + _previousGuesses.Clear(); + _recentUsers.Clear(); + _locker.Dispose(); + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Hangman/HangmanObject.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/HangmanObject.cs new file mode 100644 index 00000000..4179e7bc --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/HangmanObject.cs @@ -0,0 +1,8 @@ +namespace NadekoBot.Modules.Games.Common.Hangman +{ + public class HangmanObject + { + public string Word { get; set; } + public string ImageUrl { get; set; } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Hangman/Phase.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/Phase.cs new file mode 100644 index 00000000..b23b856b --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/Phase.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.Hangman +{ + public enum Phase + { + Active, + Ended, + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs new file mode 100644 index 00000000..2cc98d15 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs @@ -0,0 +1,54 @@ +using NadekoBot.Common; +using NadekoBot.Modules.Games.Common.Hangman.Exceptions; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using NLog; + +namespace NadekoBot.Modules.Games.Common.Hangman +{ + public class TermPool + { + const string termsPath = "data/hangman3.json"; + private readonly Logger _log; + + public IReadOnlyDictionary Data { get; } = new Dictionary(); + public TermPool() + { + _log = LogManager.GetCurrentClassLogger(); + try + { + Data = JsonConvert.DeserializeObject>(File.ReadAllText(termsPath)); + Data = Data.ToDictionary( + x => x.Key.ToLowerInvariant(), + x => x.Value); + } + catch (Exception ex) + { + _log.Warn(ex); + } + } + + public HangmanObject GetTerm(string type) + { + type = type?.Trim().ToLowerInvariant(); + var rng = new NadekoRandom(); + + if (type == "random") + { + var keys = Data.Keys.ToArray(); + + type = Data.Keys.ToArray()[rng.Next(0, Data.Keys.Count())]; + } + if (!Data.TryGetValue(type, out var termTypes) || termTypes.Length == 0) + throw new TermNotFoundException(); + + var obj = termTypes[rng.Next(0, termTypes.Length)]; + + obj.Word = obj.Word.Trim().ToLowerInvariant(); + return obj; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Hangman/TermType.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/TermType.cs new file mode 100644 index 00000000..f3c09af6 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/TermType.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.Hangman +{ + [Flags] + public enum TermType + { + Countries = 0, + Movies = 1, + Animals = 2, + Things = 4, + Random = 8, + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Nunchi/Nunchi.cs b/NadekoBot.Core/Modules/Games/Common/Nunchi/Nunchi.cs new file mode 100644 index 00000000..1fd1cbcc --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Nunchi/Nunchi.cs @@ -0,0 +1,181 @@ +using NadekoBot.Common; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common.Nunchi +{ + public class Nunchi : IDisposable + { + public enum Phase + { + Joining, + Playing, + WaitingForNextRound, + Ended, + } + + public int CurrentNumber { get; private set; } = new NadekoRandom().Next(0, 100); + public Phase CurrentPhase { get; private set; } = Phase.Joining; + + public event Func OnGameStarted; + public event Func OnRoundStarted; + public event Func OnUserGuessed; + public event Func OnRoundEnded; // tuple of the user who failed + public event Func OnGameEnded; // name of the user who won + + private readonly SemaphoreSlim _locker = new SemaphoreSlim(1, 1); + + private HashSet<(ulong Id, string Name)> _participants = new HashSet<(ulong Id, string Name)>(); + private HashSet<(ulong Id, string Name)> _passed = new HashSet<(ulong Id, string Name)>(); + + public ImmutableArray<(ulong Id, string Name)> Participants => _participants.ToImmutableArray(); + public int ParticipantCount => _participants.Count; + + private const int _killTimeout = 20 * 1000; + private const int _nextRoundTimeout = 5 * 1000; + private Timer _killTimer; + + public Nunchi(ulong creatorId, string creatorName) + { + _participants.Add((creatorId, creatorName)); + } + + public async Task Join(ulong userId, string userName) + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (CurrentPhase != Phase.Joining) + return false; + + return _participants.Add((userId, userName)); + } + finally { _locker.Release(); } + } + + public async Task Initialize() + { + CurrentPhase = Phase.Joining; + await Task.Delay(30000).ConfigureAwait(false); + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (_participants.Count < 3) + { + CurrentPhase = Phase.Ended; + return false; + } + + _killTimer = new Timer(async state => + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (CurrentPhase != Phase.Playing) + return; + + //if some players took too long to type a number, boot them all out and start a new round + _participants = new HashSet<(ulong, string)>(_passed); + EndRound(); + } + finally { _locker.Release(); } + }, null, _killTimeout, _killTimeout); + + CurrentPhase = Phase.Playing; + var _ = OnGameStarted?.Invoke(this); + var __ = OnRoundStarted?.Invoke(this, CurrentNumber); + return true; + } + finally { _locker.Release(); } + } + + public async Task Input(ulong userId, string userName, int input) + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + if (CurrentPhase != Phase.Playing) + return; + + var userTuple = (Id: userId, Name: userName); + + // if the user is not a member of the race, + // or he already successfully typed the number + // ignore the input + if (!_participants.Contains(userTuple) || !_passed.Add(userTuple)) + return; + + //if the number is correct + if (CurrentNumber == input - 1) + { + //increment current number + ++CurrentNumber; + if (_passed.Count == _participants.Count - 1) + { + // if only n players are left, and n - 1 type the correct number, round is over + + // if only 2 players are left, game is over + if (_participants.Count == 2) + { + _killTimer.Change(Timeout.Infinite, Timeout.Infinite); + CurrentPhase = Phase.Ended; + var _ = OnGameEnded?.Invoke(this, userTuple.Name); + } + else // else just start the new round without the user who was the last + { + var failure = _participants.Except(_passed).First(); + EndRound(failure); + } + } + var __ = OnUserGuessed?.Invoke(this); + } + else + { + //if the user failed + + EndRound(userTuple); + } + } + finally { _locker.Release(); } + } + + private void EndRound((ulong, string)? failure = null) + { + _killTimer.Change(_killTimeout, _killTimeout); + CurrentNumber = new NadekoRandom().Next(0, 100); // reset the counter + _passed.Clear(); // reset all users who passed (new round starts) + if(failure != null) + _participants.Remove(failure.Value); // remove the dude who failed from the list of players + + var __ = OnRoundEnded?.Invoke(this, failure); + if (_participants.Count <= 1) // means we have a winner or everyone was booted out + { + _killTimer.Change(Timeout.Infinite, Timeout.Infinite); + CurrentPhase = Phase.Ended; + var _ = OnGameEnded?.Invoke(this, _participants.Count > 0 ? _participants.First().Name : null); + return; + } + CurrentPhase = Phase.WaitingForNextRound; + var throwawayDelay = Task.Run(async () => + { + await Task.Delay(_nextRoundTimeout).ConfigureAwait(false); + CurrentPhase = Phase.Playing; + var ___ = OnRoundStarted?.Invoke(this, CurrentNumber); + }); + + } + + public void Dispose() + { + OnGameEnded = null; + OnGameStarted = null; + OnRoundEnded = null; + OnRoundStarted = null; + OnUserGuessed = null; + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/Common/Poll.cs b/NadekoBot.Core/Modules/Games/Common/Poll.cs new file mode 100644 index 00000000..e1e3ee01 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Poll.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Core.Services.Impl; + +namespace NadekoBot.Modules.Games.Common +{ + public class Poll + { + private readonly IUserMessage _originalMessage; + private readonly IGuild _guild; + private readonly string[] answers; + private readonly ConcurrentDictionary _participants = new ConcurrentDictionary(); + private readonly string _question; + private readonly DiscordSocketClient _client; + private readonly NadekoStrings _strings; + private bool running = false; + + public event Action OnEnded = delegate { }; + + public Poll(DiscordSocketClient client, NadekoStrings strings, IUserMessage umsg, string question, IEnumerable enumerable) + { + _client = client; + _strings = strings; + + _originalMessage = umsg; + _guild = ((ITextChannel)umsg.Channel).Guild; + _question = question; + answers = enumerable as string[] ?? enumerable.ToArray(); + } + + public EmbedBuilder GetStats(string title) + { + var results = _participants.GroupBy(kvp => kvp.Value) + .ToDictionary(x => x.Key, x => x.Sum(kvp => 1)) + .OrderByDescending(kvp => kvp.Value) + .ToArray(); + + var eb = new EmbedBuilder().WithTitle(title); + + var sb = new StringBuilder() + .AppendLine(Format.Bold(_question)) + .AppendLine(); + + var totalVotesCast = 0; + if (results.Length == 0) + { + sb.AppendLine(GetText("no_votes_cast")); + } + else + { + for (int i = 0; i < results.Length; i++) + { + var result = results[i]; + sb.AppendLine(GetText("poll_result", + result.Key, + Format.Bold(answers[result.Key - 1]), + Format.Bold(result.Value.ToString()))); + totalVotesCast += result.Value; + } + } + + + eb.WithDescription(sb.ToString()) + .WithFooter(efb => efb.WithText(GetText("x_votes_cast", totalVotesCast))); + + return eb; + } + + public async Task StartPoll() + { + var msgToSend = GetText("poll_created", Format.Bold(_originalMessage.Author.Username)) + "\n\n" + Format.Bold(_question) + "\n"; + var num = 1; + msgToSend = answers.Aggregate(msgToSend, (current, answ) => current + $"`{num++}.` **{answ}**\n"); + msgToSend += "\n" + Format.Bold(GetText("poll_vote_public")); + + await _originalMessage.Channel.SendConfirmAsync(msgToSend).ConfigureAwait(false); + running = true; + } + + public async Task StopPoll() + { + running = false; + OnEnded(_guild.Id); + await _originalMessage.Channel.EmbedAsync(GetStats("POLL CLOSED")).ConfigureAwait(false); + } + + public async Task TryVote(IUserMessage msg) + { + // has to be a user message + if (msg == null || msg.Author.IsBot || !running) + return false; + + // has to be an integer + if (!int.TryParse(msg.Content, out int vote)) + return false; + if (vote < 1 || vote > answers.Length) + return false; + + IMessageChannel ch; + //if public, channel must be the same the poll started in + if (_originalMessage.Channel.Id != msg.Channel.Id) + return false; + ch = msg.Channel; + + //user can vote only once + if (_participants.TryAdd(msg.Author.Id, vote)) + { + var toDelete = await ch.SendConfirmAsync(GetText("poll_voted", Format.Bold(msg.Author.ToString()))).ConfigureAwait(false); + toDelete.DeleteAfter(5); + try { await msg.DeleteAsync().ConfigureAwait(false); } catch { } + return true; + } + return false; + } + + private string GetText(string key, params object[] replacements) + => _strings.GetText(key, + _guild.Id, + "Games".ToLowerInvariant(), + replacements); + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/TicTacToe.cs b/NadekoBot.Core/Modules/Games/Common/TicTacToe.cs new file mode 100644 index 00000000..32a3d993 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/TicTacToe.cs @@ -0,0 +1,277 @@ +using Discord; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Core.Services.Impl; +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common +{ + public class TicTacToe + { + enum Phase + { + Starting, + Started, + Ended + } + + private readonly ITextChannel _channel; + private readonly IGuildUser[] _users; + private readonly int?[,] _state; + private Phase _phase; + private int _curUserIndex; + private readonly SemaphoreSlim _moveLock; + + private IGuildUser _winner; + + private readonly string[] _numbers = { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:", ":nine:" }; + + public Action OnEnded; + + private IUserMessage _previousMessage; + private Timer _timeoutTimer; + private readonly NadekoStrings _strings; + private readonly DiscordSocketClient _client; + + public TicTacToe(NadekoStrings strings, DiscordSocketClient client, ITextChannel channel, IGuildUser firstUser) + { + _channel = channel; + _strings = strings; + _client = client; + + _users = new[] { firstUser, null }; + _state = new int?[,] { + { null, null, null }, + { null, null, null }, + { null, null, null }, + }; + + _phase = Phase.Starting; + _moveLock = new SemaphoreSlim(1, 1); + } + + private string GetText(string key, params object[] replacements) => + _strings.GetText(key, + _channel.GuildId, + typeof(Games).Name.ToLowerInvariant(), + replacements); + + public string GetState() + { + var sb = new StringBuilder(); + for (var i = 0; i < _state.GetLength(0); i++) + { + for (var j = 0; j < _state.GetLength(1); j++) + { + sb.Append(_state[i, j] == null ? _numbers[i * 3 + j] : GetIcon(_state[i, j])); + if (j < _state.GetLength(1) - 1) + sb.Append("┃"); + } + if (i < _state.GetLength(0) - 1) + sb.AppendLine("\n──────────"); + } + + return sb.ToString(); + } + + public EmbedBuilder GetEmbed(string title = null) + { + var embed = new EmbedBuilder() + .WithOkColor() + .WithDescription(Environment.NewLine + GetState()) + .WithAuthor(eab => eab.WithName(GetText("vs", _users[0], _users[1]))); + + if (!string.IsNullOrWhiteSpace(title)) + embed.WithTitle(title); + + if (_winner == null) + { + if (_phase == Phase.Ended) + embed.WithFooter(efb => efb.WithText(GetText("ttt_no_moves"))); + else + embed.WithFooter(efb => efb.WithText(GetText("ttt_users_move", _users[_curUserIndex]))); + } + else + embed.WithFooter(efb => efb.WithText(GetText("ttt_has_won", _winner))); + + return embed; + } + + private static string GetIcon(int? val) + { + switch (val) + { + case 0: + return "❌"; + case 1: + return "⭕"; + case 2: + return "❎"; + case 3: + return "🅾"; + default: + return "⬛"; + } + } + + public async Task Start(IGuildUser user) + { + if (_phase == Phase.Started || _phase == Phase.Ended) + { + await _channel.SendErrorAsync(user.Mention + GetText("ttt_already_running")).ConfigureAwait(false); + return; + } + else if (_users[0] == user) + { + await _channel.SendErrorAsync(user.Mention + GetText("ttt_against_yourself")).ConfigureAwait(false); + return; + } + + _users[1] = user; + + _phase = Phase.Started; + + _timeoutTimer = new Timer(async (_) => + { + await _moveLock.WaitAsync(); + try + { + if (_phase == Phase.Ended) + return; + + _phase = Phase.Ended; + if (_users[1] != null) + { + _winner = _users[_curUserIndex ^= 1]; + var del = _previousMessage?.DeleteAsync(); + try + { + await _channel.EmbedAsync(GetEmbed(GetText("ttt_time_expired"))).ConfigureAwait(false); + if (del != null) + await del.ConfigureAwait(false); + } + catch { } + } + + OnEnded?.Invoke(this); + } + catch { } + finally + { + _moveLock.Release(); + } + }, null, 15000, Timeout.Infinite); + + _client.MessageReceived += Client_MessageReceived; + + + _previousMessage = await _channel.EmbedAsync(GetEmbed(GetText("game_started"))).ConfigureAwait(false); + } + + private bool IsDraw() + { + for (var i = 0; i < 3; i++) + { + for (var j = 0; j < 3; j++) + { + if (_state[i, j] == null) + return false; + } + } + return true; + } + + private Task Client_MessageReceived(SocketMessage msg) + { + var _ = Task.Run(async () => + { + await _moveLock.WaitAsync().ConfigureAwait(false); + try + { + var curUser = _users[_curUserIndex]; + if (_phase == Phase.Ended || msg.Author?.Id != curUser.Id) + return; + + if (int.TryParse(msg.Content, out var index) && + --index >= 0 && + index <= 9 && + _state[index / 3, index % 3] == null) + { + _state[index / 3, index % 3] = _curUserIndex; + + // i'm lazy + if (_state[index / 3, 0] == _state[index / 3, 1] && _state[index / 3, 1] == _state[index / 3, 2]) + { + _state[index / 3, 0] = _curUserIndex + 2; + _state[index / 3, 1] = _curUserIndex + 2; + _state[index / 3, 2] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_state[0, index % 3] == _state[1, index % 3] && _state[1, index % 3] == _state[2, index % 3]) + { + _state[0, index % 3] = _curUserIndex + 2; + _state[1, index % 3] = _curUserIndex + 2; + _state[2, index % 3] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_curUserIndex == _state[0, 0] && _state[0, 0] == _state[1, 1] && _state[1, 1] == _state[2, 2]) + { + _state[0, 0] = _curUserIndex + 2; + _state[1, 1] = _curUserIndex + 2; + _state[2, 2] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_curUserIndex == _state[0, 2] && _state[0, 2] == _state[1, 1] && _state[1, 1] == _state[2, 0]) + { + _state[0, 2] = _curUserIndex + 2; + _state[1, 1] = _curUserIndex + 2; + _state[2, 0] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + var reason = ""; + + if (_phase == Phase.Ended) // if user won, stop receiving moves + { + reason = GetText("ttt_matched_three"); + _winner = _users[_curUserIndex]; + _client.MessageReceived -= Client_MessageReceived; + OnEnded?.Invoke(this); + } + else if (IsDraw()) + { + reason = GetText("ttt_a_draw"); + _phase = Phase.Ended; + _client.MessageReceived -= Client_MessageReceived; + OnEnded?.Invoke(this); + } + + var sendstate = Task.Run(async () => + { + var del1 = msg.DeleteAsync(); + var del2 = _previousMessage?.DeleteAsync(); + try { _previousMessage = await _channel.EmbedAsync(GetEmbed(reason)); } catch { } + try { await del1; } catch { } + try { if (del2 != null) await del2; } catch { } + }); + _curUserIndex ^= 1; + + _timeoutTimer.Change(15000, Timeout.Infinite); + } + } + finally + { + _moveLock.Release(); + } + }); + + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs new file mode 100644 index 00000000..e3e98b03 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs @@ -0,0 +1,266 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Discord; +using Discord.Net; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; +using NLog; + +namespace NadekoBot.Modules.Games.Common.Trivia +{ + public class TriviaGame + { + private readonly SemaphoreSlim _guessLock = new SemaphoreSlim(1, 1); + private readonly Logger _log; + private readonly NadekoStrings _strings; + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + + public IGuild Guild { get; } + public ITextChannel Channel { get; } + + private readonly int _questionDurationMiliseconds = 30000; + private readonly int _hintTimeoutMiliseconds = 6000; + public bool ShowHints { get; } + public bool IsPokemon { get; } + private CancellationTokenSource _triviaCancelSource; + + public TriviaQuestion CurrentQuestion { get; private set; } + public HashSet OldQuestions { get; } = new HashSet(); + + public ConcurrentDictionary Users { get; } = new ConcurrentDictionary(); + + public bool GameActive { get; private set; } + public bool ShouldStopGame { get; private set; } + + public int WinRequirement { get; } + + public TriviaGame(NadekoStrings strings, DiscordSocketClient client, IBotConfigProvider bc, + CurrencyService cs, IGuild guild, ITextChannel channel, + bool showHints, int winReq, bool isPokemon) + { + _log = LogManager.GetCurrentClassLogger(); + _strings = strings; + _client = client; + _bc = bc; + _cs = cs; + + ShowHints = showHints; + Guild = guild; + Channel = channel; + WinRequirement = winReq; + IsPokemon = isPokemon; + } + + private string GetText(string key, params object[] replacements) => + _strings.GetText(key, + Channel.GuildId, + typeof(Games).Name.ToLowerInvariant(), + replacements); + + public async Task StartGame() + { + while (!ShouldStopGame) + { + // reset the cancellation source + _triviaCancelSource = new CancellationTokenSource(); + + // load question + CurrentQuestion = TriviaQuestionPool.Instance.GetRandomQuestion(OldQuestions, IsPokemon); + if (string.IsNullOrWhiteSpace(CurrentQuestion?.Answer) || string.IsNullOrWhiteSpace(CurrentQuestion.Question)) + { + await Channel.SendErrorAsync(GetText("trivia_game"), GetText("failed_loading_question")).ConfigureAwait(false); + return; + } + OldQuestions.Add(CurrentQuestion); //add it to exclusion list so it doesn't show up again + + EmbedBuilder questionEmbed; + IUserMessage questionMessage; + try + { + questionEmbed = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("trivia_game")) + .AddField(eab => eab.WithName(GetText("category")).WithValue(CurrentQuestion.Category)) + .AddField(eab => eab.WithName(GetText("question")).WithValue(CurrentQuestion.Question)); + if (Uri.IsWellFormedUriString(CurrentQuestion.ImageUrl, UriKind.Absolute)) + questionEmbed.WithImageUrl(CurrentQuestion.ImageUrl); + + questionMessage = await Channel.EmbedAsync(questionEmbed).ConfigureAwait(false); + } + catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.NotFound || + ex.HttpCode == System.Net.HttpStatusCode.Forbidden || + ex.HttpCode == System.Net.HttpStatusCode.BadRequest) + { + return; + } + catch (Exception ex) + { + _log.Warn(ex); + await Task.Delay(2000).ConfigureAwait(false); + continue; + } + + //receive messages + try + { + _client.MessageReceived += PotentialGuess; + + //allow people to guess + GameActive = true; + try + { + //hint + await Task.Delay(_hintTimeoutMiliseconds, _triviaCancelSource.Token).ConfigureAwait(false); + if (ShowHints) + try + { + await questionMessage.ModifyAsync(m => m.Embed = questionEmbed.WithFooter(efb => efb.WithText(CurrentQuestion.GetHint())).Build()) + .ConfigureAwait(false); + } + catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.NotFound || ex.HttpCode == System.Net.HttpStatusCode.Forbidden) + { + break; + } + catch (Exception ex) { _log.Warn(ex); } + + //timeout + await Task.Delay(_questionDurationMiliseconds - _hintTimeoutMiliseconds, _triviaCancelSource.Token).ConfigureAwait(false); + + } + catch (TaskCanceledException) { } //means someone guessed the answer + } + finally + { + GameActive = false; + _client.MessageReceived -= PotentialGuess; + } + if (!_triviaCancelSource.IsCancellationRequested) + { + try + { + var embed = new EmbedBuilder().WithErrorColor() + .WithTitle(GetText("trivia_game")) + .WithDescription(GetText("trivia_times_up", Format.Bold(CurrentQuestion.Answer))); + if (Uri.IsWellFormedUriString(CurrentQuestion.AnswerImageUrl, UriKind.Absolute)) + embed.WithImageUrl(CurrentQuestion.AnswerImageUrl); + + await Channel.EmbedAsync(embed).ConfigureAwait(false); + } + catch (Exception ex) + { + _log.Warn(ex); + } + } + await Task.Delay(5000).ConfigureAwait(false); + } + } + + public async Task EnsureStopped() + { + ShouldStopGame = true; + + await Channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithAuthor(eab => eab.WithName("Trivia Game Ended")) + .WithTitle("Final Results") + .WithDescription(GetLeaderboard())).ConfigureAwait(false); + } + + public async Task StopGame() + { + var old = ShouldStopGame; + ShouldStopGame = true; + if (!old) + try { await Channel.SendConfirmAsync(GetText("trivia_game"), GetText("trivia_stopping")).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + } + + private Task PotentialGuess(SocketMessage imsg) + { + var _ = Task.Run(async () => + { + try + { + if (imsg.Author.IsBot) + return; + + var umsg = imsg as SocketUserMessage; + + var textChannel = umsg?.Channel as ITextChannel; + if (textChannel == null || textChannel.Guild != Guild) + return; + + var guildUser = (IGuildUser)umsg.Author; + + var guess = false; + await _guessLock.WaitAsync().ConfigureAwait(false); + try + { + if (GameActive && CurrentQuestion.IsAnswerCorrect(umsg.Content) && !_triviaCancelSource.IsCancellationRequested) + { + Users.AddOrUpdate(guildUser, 1, (gu, old) => ++old); + guess = true; + } + } + finally { _guessLock.Release(); } + if (!guess) return; + _triviaCancelSource.Cancel(); + + + if (Users[guildUser] == WinRequirement) + { + ShouldStopGame = true; + try + { + var embedS = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("trivia_game")) + .WithDescription(GetText("trivia_win", + guildUser.Mention, + Format.Bold(CurrentQuestion.Answer))); + if (Uri.IsWellFormedUriString(CurrentQuestion.AnswerImageUrl, UriKind.Absolute)) + embedS.WithImageUrl(CurrentQuestion.AnswerImageUrl); + await Channel.EmbedAsync(embedS).ConfigureAwait(false); + } + catch + { + // ignored + } + var reward = _bc.BotConfig.TriviaCurrencyReward; + if (reward > 0) + await _cs.AddAsync(guildUser, "Won trivia", reward, true).ConfigureAwait(false); + return; + } + var embed = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("trivia_game")) + .WithDescription(GetText("trivia_guess", guildUser.Mention, Format.Bold(CurrentQuestion.Answer))); + if (Uri.IsWellFormedUriString(CurrentQuestion.AnswerImageUrl, UriKind.Absolute)) + embed.WithImageUrl(CurrentQuestion.AnswerImageUrl); + await Channel.EmbedAsync(embed).ConfigureAwait(false); + } + catch (Exception ex) { _log.Warn(ex); } + }); + return Task.CompletedTask; + } + + public string GetLeaderboard() + { + if (Users.Count == 0) + return GetText("no_results"); + + var sb = new StringBuilder(); + + foreach (var kvp in Users.OrderByDescending(kvp => kvp.Value)) + { + sb.AppendLine(GetText("trivia_points", Format.Bold(kvp.Key.ToString()), kvp.Value).SnPl(kvp.Value)); + } + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestion.cs b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestion.cs new file mode 100644 index 00000000..3533aa9e --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestion.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using NadekoBot.Extensions; + +// THANKS @ShoMinamimoto for suggestions and coding help +namespace NadekoBot.Modules.Games.Common.Trivia +{ + public class TriviaQuestion + { + //represents the min size to judge levDistance with + private static readonly HashSet> strictness = new HashSet> { + new Tuple(9, 0), + new Tuple(14, 1), + new Tuple(19, 2), + new Tuple(22, 3), + }; + public static int maxStringLength = 22; + + public string Category { get; set; } + public string Question { get; set; } + public string ImageUrl { get; set; } + public string AnswerImageUrl { get; set; } + public string Answer { get; set; } + private string _cleanAnswer; + public string CleanAnswer => _cleanAnswer ?? (_cleanAnswer = Clean(Answer)); + + public TriviaQuestion(string q, string a, string c, string img = null, string answerImage = null) + { + this.Question = q; + this.Answer = a; + this.Category = c; + this.ImageUrl = img; + this.AnswerImageUrl = answerImage ?? img; + } + + public string GetHint() => Scramble(Answer); + + public bool IsAnswerCorrect(string guess) + { + if (Answer.Equals(guess)) + { + return true; + } + var cleanGuess = Clean(guess); + if (CleanAnswer.Equals(cleanGuess)) + { + return true; + } + + int levDistanceClean = CleanAnswer.LevenshteinDistance(cleanGuess); + int levDistanceNormal = Answer.LevenshteinDistance(guess); + return JudgeGuess(CleanAnswer.Length, cleanGuess.Length, levDistanceClean) + || JudgeGuess(Answer.Length, guess.Length, levDistanceNormal); + } + + private bool JudgeGuess(int guessLength, int answerLength, int levDistance) + { + foreach (Tuple level in strictness) + { + if (guessLength <= level.Item1 || answerLength <= level.Item1) + { + if (levDistance <= level.Item2) + return true; + else + return false; + } + } + return false; + } + + private string Clean(string str) + { + str = " " + str.ToLower() + " "; + str = Regex.Replace(str, "\\s+", " "); + str = Regex.Replace(str, "[^\\w\\d\\s]", ""); + //Here's where custom modification can be done + str = Regex.Replace(str, "\\s(a|an|the|of|in|for|to|as|at|be)\\s", " "); + //End custom mod and cleanup whitespace + str = Regex.Replace(str, "^\\s+", ""); + str = Regex.Replace(str, "\\s+$", ""); + //Trim the really long answers + str = str.Length <= maxStringLength ? str : str.Substring(0, maxStringLength); + return str; + } + + private static string Scramble(string word) + { + var letters = word.ToCharArray(); + var count = 0; + for (var i = 0; i < letters.Length; i++) + { + if (letters[i] == ' ') + continue; + + count++; + if (count <= letters.Length / 5) + continue; + + if (count % 3 == 0) + continue; + + if (letters[i] != ' ') + letters[i] = '_'; + } + return string.Join(" ", new string(letters).Replace(" ", " \u2000").AsEnumerable()); + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestionPool.cs b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestionPool.cs new file mode 100644 index 00000000..2307c209 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestionPool.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using NadekoBot.Common; +using NadekoBot.Extensions; +using Newtonsoft.Json; + +namespace NadekoBot.Modules.Games.Common.Trivia +{ + public class TriviaQuestionPool + { + public class PokemonNameId + { + public int Id { get; set; } + public string Name { get; set; } + } + + private static TriviaQuestionPool _instance; + public static TriviaQuestionPool Instance { get; } = _instance ?? (_instance = new TriviaQuestionPool()); + + private const string questionsFile = "data/trivia_questions.json"; + private const string pokemonMapPath = "data/pokemon/name-id_map4.json"; + private readonly int maxPokemonId; + + private Random rng { get; } = new NadekoRandom(); + + private TriviaQuestion[] pool { get; } + private ImmutableDictionary map { get; } + + static TriviaQuestionPool() { } + + private TriviaQuestionPool() + { + pool = JsonConvert.DeserializeObject(File.ReadAllText(questionsFile)); + map = JsonConvert.DeserializeObject(File.ReadAllText(pokemonMapPath)) + .ToDictionary(x => x.Id, x => x.Name) + .ToImmutableDictionary(); + + maxPokemonId = 721; //xd + } + + public TriviaQuestion GetRandomQuestion(HashSet exclude, bool isPokemon) + { + if (pool.Length == 0) + return null; + + if (isPokemon) + { + var num = rng.Next(1, maxPokemonId + 1); + return new TriviaQuestion("Who's That Pokémon?", + map[num].ToTitleCase(), + "Pokemon", + $@"http://nadekobot.me/images/pokemon/shadows/{num}.png", + $@"http://nadekobot.me/images/pokemon/real/{num}.png"); + } + TriviaQuestion randomQuestion; + while (exclude.Contains(randomQuestion = pool[rng.Next(0, pool.Length)])) ; + + return randomQuestion; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/TypingArticle.cs b/NadekoBot.Core/Modules/Games/Common/TypingArticle.cs new file mode 100644 index 00000000..2b69b577 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/TypingArticle.cs @@ -0,0 +1,8 @@ +namespace NadekoBot.Modules.Games.Common +{ + public class TypingArticle + { + public string Title { get; set; } + public string Text { get; set; } + } +} diff --git a/NadekoBot.Core/Modules/Games/Common/TypingGame.cs b/NadekoBot.Core/Modules/Games/Common/TypingGame.cs new file mode 100644 index 00000000..f2d2980a --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/TypingGame.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; +using NadekoBot.Common; +using NadekoBot.Extensions; +using NadekoBot.Modules.Games.Services; +using NLog; + +namespace NadekoBot.Modules.Games.Common +{ + public class TypingGame + { + public const float WORD_VALUE = 4.5f; + public ITextChannel Channel { get; } + public string CurrentSentence { get; private set; } + public bool IsActive { get; private set; } + private readonly Stopwatch sw; + private readonly List finishedUserIds; + private readonly DiscordSocketClient _client; + private readonly GamesService _games; + private readonly string _prefix; + + private Logger _log { get; } + + public TypingGame(GamesService games, DiscordSocketClient client, ITextChannel channel, string prefix) //kek@prefix + { + _log = LogManager.GetCurrentClassLogger(); + _games = games; + _client = client; + _prefix = prefix; + + this.Channel = channel; + IsActive = false; + sw = new Stopwatch(); + finishedUserIds = new List(); + } + + public async Task Stop() + { + if (!IsActive) return false; + _client.MessageReceived -= AnswerReceived; + finishedUserIds.Clear(); + IsActive = false; + sw.Stop(); + sw.Reset(); + try { await Channel.SendConfirmAsync("Typing contest stopped.").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + return true; + } + + public async Task Start() + { + if (IsActive) return; // can't start running game + IsActive = true; + CurrentSentence = GetRandomSentence(); + var i = (int)(CurrentSentence.Length / WORD_VALUE * 1.7f); + try + { + await Channel.SendConfirmAsync($@":clock2: Next contest will last for {i} seconds. Type the bolded text as fast as you can.").ConfigureAwait(false); + + + var msg = await Channel.SendMessageAsync("Starting new typing contest in **3**...").ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); + try + { + await msg.ModifyAsync(m => m.Content = "Starting new typing contest in **2**...").ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); + await msg.ModifyAsync(m => m.Content = "Starting new typing contest in **1**...").ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); + } + catch (Exception ex) { _log.Warn(ex); } + + await msg.ModifyAsync(m => m.Content = Format.Bold(Format.Sanitize(CurrentSentence.Replace(" ", " \x200B")).SanitizeMentions())).ConfigureAwait(false); + sw.Start(); + HandleAnswers(); + + while (i > 0) + { + await Task.Delay(1000).ConfigureAwait(false); + i--; + if (!IsActive) + return; + } + + } + catch { } + finally + { + await Stop().ConfigureAwait(false); + } + } + + public string GetRandomSentence() + { + if (_games.TypingArticles.Any()) + return _games.TypingArticles[new NadekoRandom().Next(0, _games.TypingArticles.Count)].Text; + else + return $"No typing articles found. Use {_prefix}typeadd command to add a new article for typing."; + + } + + private void HandleAnswers() + { + _client.MessageReceived += AnswerReceived; + } + + private Task AnswerReceived(SocketMessage imsg) + { + var _ = Task.Run(async () => + { + try + { + if (imsg.Author.IsBot) + return; + var msg = imsg as SocketUserMessage; + if (msg == null) + return; + + if (this.Channel == null || this.Channel.Id != msg.Channel.Id) return; + + var guess = msg.Content; + + var distance = CurrentSentence.LevenshteinDistance(guess); + var decision = Judge(distance, guess.Length); + if (decision && !finishedUserIds.Contains(msg.Author.Id)) + { + var elapsed = sw.Elapsed; + var wpm = CurrentSentence.Length / WORD_VALUE / elapsed.TotalSeconds * 60; + finishedUserIds.Add(msg.Author.Id); + await this.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithTitle($"{msg.Author} finished the race!") + .AddField(efb => efb.WithName("Place").WithValue($"#{finishedUserIds.Count}").WithIsInline(true)) + .AddField(efb => efb.WithName("WPM").WithValue($"{wpm:F1} *[{elapsed.TotalSeconds:F2}sec]*").WithIsInline(true)) + .AddField(efb => efb.WithName("Errors").WithValue(distance.ToString()).WithIsInline(true))) + .ConfigureAwait(false); + if (finishedUserIds.Count % 4 == 0) + { + await this.Channel.SendConfirmAsync($":exclamation: A lot of people finished, here is the text for those still typing:\n\n**{Format.Sanitize(CurrentSentence.Replace(" ", " \x200B")).SanitizeMentions()}**").ConfigureAwait(false); + } + } + } + catch (Exception ex) { _log.Warn(ex); } + }); + return Task.CompletedTask; + } + + private bool Judge(int errors, int textLength) => errors <= textLength / 25; + + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/Connect4Commands.cs b/NadekoBot.Core/Modules/Games/Connect4Commands.cs new file mode 100644 index 00000000..e6413178 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Connect4Commands.cs @@ -0,0 +1,183 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common.Attributes; +using NadekoBot.Extensions; +using NadekoBot.Modules.Games.Common.Connect4; +using NadekoBot.Modules.Games.Services; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class Connect4Commands : NadekoSubmodule + { + private readonly DiscordSocketClient _client; + + private readonly string[] numbers = new string[] { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:"}; + + public Connect4Commands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Connect4() + { + var newGame = new Connect4Game(Context.User.Id, Context.User.ToString()); + Connect4Game game; + if ((game = _service.Connect4Games.GetOrAdd(Context.Channel.Id, newGame)) != newGame) + { + if (game.CurrentPhase != Connect4Game.Phase.Joining) + return; + + newGame.Dispose(); + //means game already exists, try to join + var joined = await game.Join(Context.User.Id, Context.User.ToString()).ConfigureAwait(false); + return; + } + + game.OnGameStateUpdated += Game_OnGameStateUpdated; + game.OnGameFailedToStart += Game_OnGameFailedToStart; + game.OnGameEnded += Game_OnGameEnded; + _client.MessageReceived += _client_MessageReceived; + + game.Initialize(); + + await ReplyConfirmLocalized("connect4_created").ConfigureAwait(false); + + Task _client_MessageReceived(SocketMessage arg) + { + if (Context.Channel.Id != arg.Channel.Id) + return Task.CompletedTask; + + var _ = Task.Run(async () => + { + bool success = false; + if (int.TryParse(arg.Content, out var col)) + { + success = await game.Input(arg.Author.Id, arg.Author.ToString(), col).ConfigureAwait(false); + } + + if (success) + try { await arg.DeleteAsync().ConfigureAwait(false); } catch { } + else + { + if (game.CurrentPhase == Connect4Game.Phase.Joining + || game.CurrentPhase == Connect4Game.Phase.Ended) + { + return; + } + RepostCounter++; + if (RepostCounter == 0) + try { msg = await Context.Channel.SendMessageAsync("", embed: (Embed)msg.Embeds.First()); } catch { } + } + }); + return Task.CompletedTask; + } + + Task Game_OnGameFailedToStart(Connect4Game arg) + { + if (_service.Connect4Games.TryRemove(Context.Channel.Id, out var toDispose)) + { + _client.MessageReceived -= _client_MessageReceived; + toDispose.Dispose(); + } + return ErrorLocalized("connect4_failed_to_start"); + } + + Task Game_OnGameEnded(Connect4Game arg, Connect4Game.Result result) + { + if (_service.Connect4Games.TryRemove(Context.Channel.Id, out var toDispose)) + { + _client.MessageReceived -= _client_MessageReceived; + toDispose.Dispose(); + } + + string title; + if (result == Connect4Game.Result.CurrentPlayerWon) + { + title = GetText("connect4_won", Format.Bold(arg.CurrentPlayer), Format.Bold(arg.OtherPlayer)); + } + else if (result == Connect4Game.Result.OtherPlayerWon) + { + title = GetText("connect4_won", Format.Bold(arg.OtherPlayer), Format.Bold(arg.CurrentPlayer)); + } + else + title = GetText("connect4_draw"); + + return msg.ModifyAsync(x => x.Embed = new EmbedBuilder() + .WithTitle(title) + .WithDescription(GetGameStateText(game)) + .WithOkColor() + .Build()); + } + } + + private IUserMessage msg; + + private int _repostCounter = 0; + private int RepostCounter + { + get => _repostCounter; + set + { + if (value < 0 || value > 7) + _repostCounter = 0; + else _repostCounter = value; + } + } + + private async Task Game_OnGameStateUpdated(Connect4Game game) + { + var embed = new EmbedBuilder() + .WithTitle($"{game.CurrentPlayer} vs {game.OtherPlayer}") + .WithDescription(GetGameStateText(game)) + .WithOkColor(); + + + if (msg == null) + msg = await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + else + await msg.ModifyAsync(x => x.Embed = embed.Build()).ConfigureAwait(false); + } + + private string GetGameStateText(Connect4Game game) + { + var sb = new StringBuilder(); + + if (game.CurrentPhase == Connect4Game.Phase.P1Move || + game.CurrentPhase == Connect4Game.Phase.P2Move) + sb.AppendLine(GetText("connect4_player_to_move", Format.Bold(game.CurrentPlayer))); + + for (int i = Connect4Game.NumberOfRows; i > 0; i--) + { + for (int j = 0; j < Connect4Game.NumberOfColumns; j++) + { + //Console.WriteLine(i + (j * Connect4Game.NumberOfRows) - 1); + var cur = game.GameState[i + (j * Connect4Game.NumberOfRows) - 1]; + + if (cur == Connect4Game.Field.Empty) + sb.Append("⚫"); //black circle + else if (cur == Connect4Game.Field.P1) + sb.Append("🔴"); //red circle + else + sb.Append("🔵"); //blue circle + } + sb.AppendLine(); + } + + for (int i = 0; i < Connect4Game.NumberOfColumns; i++) + { + sb.Append(/*new string(' ', 1 + ((i + 1) / 2)) + */numbers[i]); + } + return sb.ToString(); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Games.cs b/NadekoBot.Core/Modules/Games/Games.cs new file mode 100644 index 00000000..e6a75dc7 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Games.cs @@ -0,0 +1,209 @@ +using Discord.Commands; +using Discord; +using NadekoBot.Core.Services; +using System.Threading.Tasks; +using System; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using NadekoBot.Extensions; +using NadekoBot.Modules.Games.Common; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + /* more games + - Blackjack + - Shiritori + - Simple RPG adventure + */ + public partial class Games : NadekoTopLevelModule + { + private readonly IImagesService _images; + + public Games(IImagesService images) + { + _images = images; + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Choose([Remainder] string list = null) + { + if (string.IsNullOrWhiteSpace(list)) + return; + var listArr = list.Split(';'); + if (listArr.Length < 2) + return; + var rng = new NadekoRandom(); + await Context.Channel.SendConfirmAsync("🤔", listArr[rng.Next(0, listArr.Length)]).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task EightBall([Remainder] string question = null) + { + if (string.IsNullOrWhiteSpace(question)) + return; + + await Context.Channel.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) + .AddField(efb => efb.WithName("test❓ " + GetText("question") ).WithValue(question).WithIsInline(false)) + .AddField(efb => efb.WithName("🎱 " + GetText("8ball")).WithValue(_service.EightBallResponses[new NadekoRandom().Next(0, _service.EightBallResponses.Length)]).WithIsInline(false))); + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Rps(string input) + { + Func getRpsPick = (p) => + { + switch (p) + { + case 0: + return "🚀"; + case 1: + return "📎"; + default: + return "✂️"; + } + }; + + int pick; + switch (input) + { + case "r": + case "rock": + case "rocket": + pick = 0; + break; + case "p": + case "paper": + case "paperclip": + pick = 1; + break; + case "scissors": + case "s": + pick = 2; + break; + default: + return; + } + var nadekoPick = new NadekoRandom().Next(0, 3); + string msg; + if (pick == nadekoPick) + msg = GetText("rps_draw", getRpsPick(pick)); + else if ((pick == 0 && nadekoPick == 1) || + (pick == 1 && nadekoPick == 2) || + (pick == 2 && nadekoPick == 0)) + msg = GetText("rps_win", Context.Client.CurrentUser.Mention, + getRpsPick(nadekoPick), getRpsPick(pick)); + else + msg = GetText("rps_win", Context.User.Mention, getRpsPick(pick), + getRpsPick(nadekoPick)); + + await Context.Channel.SendConfirmAsync(msg).ConfigureAwait(false); + } + + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task RateGirl(IGuildUser usr) + { + var gr = _service.GirlRatings.GetOrAdd(usr.Id, GetGirl); + var img = await gr.Url; + await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithTitle("Girl Rating For " + usr) + .AddField(efb => efb.WithName("Hot").WithValue(gr.Hot.ToString("F2")).WithIsInline(true)) + .AddField(efb => efb.WithName("Crazy").WithValue(gr.Crazy.ToString("F2")).WithIsInline(true)) + .AddField(efb => efb.WithName("Advice").WithValue(gr.Advice).WithIsInline(false)) + .WithImageUrl(img)).ConfigureAwait(false); + } + + private double NextDouble(double x, double y) + { + var rng = new Random(); + return rng.NextDouble() * (y - x) + x; + } + + private GirlRating GetGirl(ulong uid) + { + var rng = new NadekoRandom(); + + var roll = rng.Next(1, 1001); + + if ((uid == 185968432783687681 || + uid == 265642040950390784) && roll >= 900) + roll = 1000; + + + double hot; + double crazy; + string advice; + if (roll < 500) + { + hot = NextDouble(0, 5); + crazy = NextDouble(4, 10); + advice = + "This is your NO-GO ZONE. We do not hang around, and date, and marry women who are at least, in our mind, a 5. " + + "So, this is your no-go zone. You don't go here. You just rule this out. Life is better this way, that's the way it is."; + } + else if (roll < 750) + { + hot = NextDouble(5, 8); + crazy = NextDouble(4, .6 * hot + 4); + advice = "Above a 5, and to about an 8, and below the crazy line - this is your FUN ZONE. You can " + + "hang around here, and meet these girls and spend time with them. Keep in mind, while you're " + + "in the fun zone, you want to move OUT of the fun zone to a more permanent location. " + + "These girls are most of the time not crazy."; + } + else if (roll < 900) + { + hot = NextDouble(5, 10); + crazy = NextDouble(.61 * hot + 4, 10); + advice = "Above the crazy line - it's the DANGER ZONE. This is redheads, strippers, anyone named Tiffany, " + + "hairdressers... This is where your car gets keyed, you get bunny in the pot, your tires get slashed, " + + "and you wind up in jail."; + } + else if (roll < 951) + { + hot = NextDouble(8, 10); + crazy = NextDouble(7, .6 * hot + 4); + advice = "Below the crazy line, above an 8 hot, but still about 7 crazy. This is your DATE ZONE. " + + "You can stay in the date zone indefinitely. These are the girls you introduce to your friends and your family. " + + "They're good looking, and they're reasonably not crazy most of the time. You can stay here indefinitely."; + } + else if (roll < 990) + { + hot = NextDouble(8, 10); + crazy = NextDouble(5, 7); + advice = "Above an 8 hot, and between about 7 and a 5 crazy - this is WIFE ZONE. If you meet this girl, you should consider long-term " + + "relationship. Rare."; + } + else if (roll < 999) + { + hot = NextDouble(8, 10); + crazy = NextDouble(2, 3.99d); + advice = "You've met a girl she's above 8 hot, and not crazy at all (below 4)... totally cool?" + + " You should be careful. That's a dude. You're talking to a tranny!"; + } + else + { + hot = NextDouble(8, 10); + crazy = NextDouble(4, 5); + advice = "Below 5 crazy, and above 8 hot, this is the UNICORN ZONE, these things don't exist." + + "If you find a unicorn, please capture it safely, keep it alive, we'd like to study it, " + + "and maybe look at how to replicate that."; + } + + return new GirlRating(_images, crazy, hot, roll, advice); + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Linux(string guhnoo, string loonix) + { + await Context.Channel.SendConfirmAsync( +$@"I'd just like to interject for moment. What you're refering to as {loonix}, is in fact, {guhnoo}/{loonix}, or as I've recently taken to calling it, {guhnoo} plus {loonix}. {loonix} is not an operating system unto itself, but rather another free component of a fully functioning {guhnoo} system made useful by the {guhnoo} corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX. + +Many computer users run a modified version of the {guhnoo} system every day, without realizing it. Through a peculiar turn of events, the version of {guhnoo} which is widely used today is often called {loonix}, and many of its users are not aware that it is basically the {guhnoo} system, developed by the {guhnoo} Project. + +There really is a {loonix}, and these people are using it, but it is just a part of the system they use. {loonix} is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. {loonix} is normally used in combination with the {guhnoo} operating system: the whole system is basically {guhnoo} with {loonix} added, or {guhnoo}/{loonix}. All the so-called {loonix} distributions are really distributions of {guhnoo}/{loonix}." + ).ConfigureAwait(false); + } + } +} diff --git a/NadekoBot.Core/Modules/Games/HangmanCommands.cs b/NadekoBot.Core/Modules/Games/HangmanCommands.cs new file mode 100644 index 00000000..97340865 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/HangmanCommands.cs @@ -0,0 +1,135 @@ +using Discord.Commands; +using NadekoBot.Extensions; +using System; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Common.Hangman; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class HangmanCommands : NadekoSubmodule + { + private readonly DiscordSocketClient _client; + + public HangmanCommands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Hangmanlist() + { + await Context.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + string.Join("\n", _service.TermPool.Data.Keys)); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Hangman([Remainder]string type = "random") + { + var hm = new Hangman(type, _service.TermPool); + + if (!_service.HangmanGames.TryAdd(Context.Channel.Id, hm)) + { + hm.Dispose(); + await ReplyErrorLocalized("hangman_running").ConfigureAwait(false); + return; + } + hm.OnGameEnded += Hm_OnGameEnded; + hm.OnGuessFailed += Hm_OnGuessFailed; + hm.OnGuessSucceeded += Hm_OnGuessSucceeded; + hm.OnLetterAlreadyUsed += Hm_OnLetterAlreadyUsed; + _client.MessageReceived += _client_MessageReceived; + + try + { + await Context.Channel.SendConfirmAsync(GetText("hangman_game_started") + $" ({hm.TermType})", + hm.ScrambledWord + "\n" + hm.GetHangman()) + .ConfigureAwait(false); + } + catch { } + + await hm.EndedTask.ConfigureAwait(false); + + _client.MessageReceived -= _client_MessageReceived; + _service.HangmanGames.TryRemove(Context.Channel.Id, out _); + hm.Dispose(); + + Task _client_MessageReceived(SocketMessage msg) + { + var _ = Task.Run(() => + { + if (Context.Channel.Id == msg.Channel.Id) + return hm.Input(msg.Author.Id, msg.Author.ToString(), msg.Content); + else + return Task.CompletedTask; + }); + return Task.CompletedTask; + } + } + + Task Hm_OnGameEnded(Hangman game, string winner) + { + if (winner == null) + { + var loseEmbed = new EmbedBuilder().WithTitle($"Hangman Game ({game.TermType}) - Ended") + .WithDescription(Format.Bold("You lose.")) + .AddField(efb => efb.WithName("It was").WithValue(game.Term.Word.ToTitleCase())) + .WithFooter(efb => efb.WithText(string.Join(" ", game.PreviousGuesses))) + .WithErrorColor(); + + if (Uri.IsWellFormedUriString(game.Term.ImageUrl, UriKind.Absolute)) + loseEmbed.WithImageUrl(game.Term.ImageUrl); + + return Context.Channel.EmbedAsync(loseEmbed); + } + + var winEmbed = new EmbedBuilder().WithTitle($"Hangman Game ({game.TermType}) - Ended") + .WithDescription(Format.Bold($"{winner} Won.")) + .AddField(efb => efb.WithName("It was").WithValue(game.Term.Word.ToTitleCase())) + .WithFooter(efb => efb.WithText(string.Join(" ", game.PreviousGuesses))) + .WithOkColor(); + + if (Uri.IsWellFormedUriString(game.Term.ImageUrl, UriKind.Absolute)) + winEmbed.WithImageUrl(game.Term.ImageUrl); + + return Context.Channel.EmbedAsync(winEmbed); + } + + private Task Hm_OnLetterAlreadyUsed(Hangman game, string user, char guess) + { + return Context.Channel.SendErrorAsync($"Hangman Game ({game.TermType})", $"{user} Letter `{guess}` has already been used. You can guess again in 3 seconds.\n" + game.ScrambledWord + "\n" + game.GetHangman(), + footer: string.Join(" ", game.PreviousGuesses)); + } + + private Task Hm_OnGuessSucceeded(Hangman game, string user, char guess) + { + return Context.Channel.SendConfirmAsync($"Hangman Game ({game.TermType})", $"{user} guessed a letter `{guess}`!\n" + game.ScrambledWord + "\n" + game.GetHangman(), + footer: string.Join(" ", game.PreviousGuesses)); + } + + private Task Hm_OnGuessFailed(Hangman game, string user, char guess) + { + return Context.Channel.SendErrorAsync($"Hangman Game ({game.TermType})", $"{user} Letter `{guess}` does not exist. You can guess again in 3 seconds.\n" + game.ScrambledWord + "\n" + game.GetHangman(), + footer: string.Join(" ", game.PreviousGuesses)); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task HangmanStop() + { + if (_service.HangmanGames.TryRemove(Context.Channel.Id, out var removed)) + { + await removed.Stop().ConfigureAwait(false); + await ReplyConfirmLocalized("hangman_stopped").ConfigureAwait(false); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/LeetCommands.cs b/NadekoBot.Core/Modules/Games/LeetCommands.cs new file mode 100644 index 00000000..4b0088eb --- /dev/null +++ b/NadekoBot.Core/Modules/Games/LeetCommands.cs @@ -0,0 +1,305 @@ +using Discord.Commands; +using NadekoBot.Extensions; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; + +// taken from +// http://www.codeproject.com/Tips/207582/L-t-Tr-nsl-t-r-Leet-Translator (thanks) +// because i don't want to waste my time on this cancerous command +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [NadekoCommand, Usage, Description, Aliases] + public async Task Leet(int level, [Remainder] string text = null) + { + text = text.Trim(); + if (string.IsNullOrWhiteSpace(text)) + return; + await Context.Channel.SendConfirmAsync("L33t", ToLeet(text, level).SanitizeMentions()).ConfigureAwait(false); + } + + + /// + /// Translate text to Leet - Extension methods for string class + /// + /// Orginal text + /// Degree of translation (1 - 3) + /// Leet translated text + private static string ToLeet(string text, int degree = 1) => + Translate(text, degree); + + /// + /// Translate text to Leet + /// + /// Orginal text + /// Degree of translation (1 - 3) + /// Leet translated text + private static string Translate(string text, int degree = 1) + { + if (degree > 6) + degree = 6; + if (degree <= 0) + return text; + + // StringBuilder to store result. + StringBuilder sb = new StringBuilder(text.Length); + foreach (char c in text) + { + #region Degree 1 + if (degree == 1) + { + switch (c) + { + case 'a': sb.Append("4"); break; + case 'e': sb.Append("3"); break; + case 'i': sb.Append("1"); break; + case 'o': sb.Append("0"); break; + case 'A': sb.Append("4"); break; + case 'E': sb.Append("3"); break; + case 'I': sb.Append("1"); break; + case 'O': sb.Append("0"); break; + default: sb.Append(c); break; + } + } + #endregion + #region Degree 2 + else if (degree == 2) + { + switch (c) + { + case 'a': sb.Append("4"); break; + case 'e': sb.Append("3"); break; + case 'i': sb.Append("1"); break; + case 'o': sb.Append("0"); break; + case 'A': sb.Append("4"); break; + case 'E': sb.Append("3"); break; + case 'I': sb.Append("1"); break; + case 'O': sb.Append("0"); break; + case 's': sb.Append("$"); break; + case 'S': sb.Append("$"); break; + case 'l': sb.Append("£"); break; + case 'L': sb.Append("£"); break; + case 'c': sb.Append("("); break; + case 'C': sb.Append("("); break; + case 'y': sb.Append("¥"); break; + case 'Y': sb.Append("¥"); break; + case 'u': sb.Append("µ"); break; + case 'U': sb.Append("µ"); break; + case 'd': sb.Append("Ð"); break; + case 'D': sb.Append("Ð"); break; + default: sb.Append(c); break; + } + } + #endregion + #region Degree 3 + else if (degree == 3) + { + switch (c) + { + case 'a': sb.Append("4"); break; + case 'e': sb.Append("3"); break; + case 'i': sb.Append("1"); break; + case 'o': sb.Append("0"); break; + case 'A': sb.Append("4"); break; + case 'E': sb.Append("3"); break; + case 'I': sb.Append("1"); break; + case 'O': sb.Append("0"); break; + case 'k': sb.Append("|{"); break; + case 'K': sb.Append("|{"); break; + case 's': sb.Append("$"); break; + case 'S': sb.Append("$"); break; + case 'g': sb.Append("9"); break; + case 'G': sb.Append("9"); break; + case 'l': sb.Append("£"); break; + case 'L': sb.Append("£"); break; + case 'c': sb.Append("("); break; + case 'C': sb.Append("("); break; + case 't': sb.Append("7"); break; + case 'T': sb.Append("7"); break; + case 'z': sb.Append("2"); break; + case 'Z': sb.Append("2"); break; + case 'y': sb.Append("¥"); break; + case 'Y': sb.Append("¥"); break; + case 'u': sb.Append("µ"); break; + case 'U': sb.Append("µ"); break; + case 'f': sb.Append("ƒ"); break; + case 'F': sb.Append("ƒ"); break; + case 'd': sb.Append("Ð"); break; + case 'D': sb.Append("Ð"); break; + default: sb.Append(c); break; + } + } + #endregion + #region Degree 4 + else if (degree == 4) + { + switch (c) + { + case 'a': sb.Append("4"); break; + case 'e': sb.Append("3"); break; + case 'i': sb.Append("1"); break; + case 'o': sb.Append("0"); break; + case 'A': sb.Append("4"); break; + case 'E': sb.Append("3"); break; + case 'I': sb.Append("1"); break; + case 'O': sb.Append("0"); break; + case 'k': sb.Append("|{"); break; + case 'K': sb.Append("|{"); break; + case 's': sb.Append("$"); break; + case 'S': sb.Append("$"); break; + case 'g': sb.Append("9"); break; + case 'G': sb.Append("9"); break; + case 'l': sb.Append("£"); break; + case 'L': sb.Append("£"); break; + case 'c': sb.Append("("); break; + case 'C': sb.Append("("); break; + case 't': sb.Append("7"); break; + case 'T': sb.Append("7"); break; + case 'z': sb.Append("2"); break; + case 'Z': sb.Append("2"); break; + case 'y': sb.Append("¥"); break; + case 'Y': sb.Append("¥"); break; + case 'u': sb.Append("µ"); break; + case 'U': sb.Append("µ"); break; + case 'f': sb.Append("ƒ"); break; + case 'F': sb.Append("ƒ"); break; + case 'd': sb.Append("Ð"); break; + case 'D': sb.Append("Ð"); break; + case 'n': sb.Append(@"|\\|"); break; + case 'N': sb.Append(@"|\\|"); break; + case 'w': sb.Append(@"\\/\\/"); break; + case 'W': sb.Append(@"\\/\\/"); break; + case 'h': sb.Append(@"|-|"); break; + case 'H': sb.Append(@"|-|"); break; + case 'v': sb.Append(@"\\/"); break; + case 'V': sb.Append(@"\\/"); break; + case 'm': sb.Append(@"|\\/|"); break; + case 'M': sb.Append(@"|\/|"); break; + default: sb.Append(c); break; + } + } + #endregion + #region Degree 5 + else if (degree == 5) + { + switch (c) + { + case 'a': sb.Append("4"); break; + case 'e': sb.Append("3"); break; + case 'i': sb.Append("1"); break; + case 'o': sb.Append("0"); break; + case 'A': sb.Append("4"); break; + case 'E': sb.Append("3"); break; + case 'I': sb.Append("1"); break; + case 'O': sb.Append("0"); break; + case 's': sb.Append("$"); break; + case 'S': sb.Append("$"); break; + case 'g': sb.Append("9"); break; + case 'G': sb.Append("9"); break; + case 'l': sb.Append("£"); break; + case 'L': sb.Append("£"); break; + case 'c': sb.Append("("); break; + case 'C': sb.Append("("); break; + case 't': sb.Append("7"); break; + case 'T': sb.Append("7"); break; + case 'z': sb.Append("2"); break; + case 'Z': sb.Append("2"); break; + case 'y': sb.Append("¥"); break; + case 'Y': sb.Append("¥"); break; + case 'u': sb.Append("µ"); break; + case 'U': sb.Append("µ"); break; + case 'f': sb.Append("ƒ"); break; + case 'F': sb.Append("ƒ"); break; + case 'd': sb.Append("Ð"); break; + case 'D': sb.Append("Ð"); break; + case 'n': sb.Append(@"|\\|"); break; + case 'N': sb.Append(@"|\\|"); break; + case 'w': sb.Append(@"\\/\\/"); break; + case 'W': sb.Append(@"\\/\\/"); break; + case 'h': sb.Append("|-|"); break; + case 'H': sb.Append("|-|"); break; + case 'v': sb.Append("\\/"); break; + case 'V': sb.Append(@"\\/"); break; + case 'k': sb.Append("|{"); break; + case 'K': sb.Append("|{"); break; + case 'r': sb.Append("®"); break; + case 'R': sb.Append("®"); break; + case 'm': sb.Append(@"|\\/|"); break; + case 'M': sb.Append(@"|\\/|"); break; + case 'b': sb.Append("ß"); break; + case 'B': sb.Append("ß"); break; + case 'q': sb.Append("Q"); break; + case 'Q': sb.Append("Q¸"); break; + case 'x': sb.Append(")("); break; + case 'X': sb.Append(")("); break; + default: sb.Append(c); break; + } + } + #endregion + #region Degree 6 + else if (degree == 6) + { + switch (c) + { + case 'a': sb.Append("4"); break; + case 'e': sb.Append("3"); break; + case 'i': sb.Append("1"); break; + case 'o': sb.Append("0"); break; + case 'A': sb.Append("4"); break; + case 'E': sb.Append("3"); break; + case 'I': sb.Append("1"); break; + case 'O': sb.Append("0"); break; + case 's': sb.Append("$"); break; + case 'S': sb.Append("$"); break; + case 'g': sb.Append("9"); break; + case 'G': sb.Append("9"); break; + case 'l': sb.Append("£"); break; + case 'L': sb.Append("£"); break; + case 'c': sb.Append("("); break; + case 'C': sb.Append("("); break; + case 't': sb.Append("7"); break; + case 'T': sb.Append("7"); break; + case 'z': sb.Append("2"); break; + case 'Z': sb.Append("2"); break; + case 'y': sb.Append("¥"); break; + case 'Y': sb.Append("¥"); break; + case 'u': sb.Append("µ"); break; + case 'U': sb.Append("µ"); break; + case 'f': sb.Append("ƒ"); break; + case 'F': sb.Append("ƒ"); break; + case 'd': sb.Append("Ð"); break; + case 'D': sb.Append("Ð"); break; + case 'n': sb.Append(@"|\\|"); break; + case 'N': sb.Append(@"|\\|"); break; + case 'w': sb.Append(@"\\/\\/"); break; + case 'W': sb.Append(@"\\/\\/"); break; + case 'h': sb.Append("|-|"); break; + case 'H': sb.Append("|-|"); break; + case 'v': sb.Append(@"\\/"); break; + case 'V': sb.Append(@"\\/"); break; + case 'k': sb.Append("|{"); break; + case 'K': sb.Append("|{"); break; + case 'r': sb.Append("®"); break; + case 'R': sb.Append("®"); break; + case 'm': sb.Append(@"|\\/|"); break; + case 'M': sb.Append(@"|\\/|"); break; + case 'b': sb.Append("ß"); break; + case 'B': sb.Append("ß"); break; + case 'j': sb.Append("_|"); break; + case 'J': sb.Append("_|"); break; + case 'P': sb.Append("|°"); break; + case 'q': sb.Append("¶"); break; + case 'Q': sb.Append("¶¸"); break; + case 'x': sb.Append(")("); break; + case 'X': sb.Append(")("); break; + default: sb.Append(c); break; + } + } + #endregion + } + return sb.ToString().TrimTo(1995); // Return result. + } + } +} diff --git a/NadekoBot.Core/Modules/Games/NunchiCommands.cs b/NadekoBot.Core/Modules/Games/NunchiCommands.cs new file mode 100644 index 00000000..9b709261 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/NunchiCommands.cs @@ -0,0 +1,128 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Common.Nunchi; +using NadekoBot.Modules.Games.Services; +using System; +using System.Linq; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class NunchiCommands : NadekoSubmodule + { + private readonly DiscordSocketClient _client; + + public NunchiCommands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Nunchi() + { + var newNunchi = new Nunchi(Context.User.Id, Context.User.ToString()); + Nunchi nunchi; + + //if a game was already active + if ((nunchi = _service.NunchiGames.GetOrAdd(Context.Guild.Id, newNunchi)) != newNunchi) + { + // join it + if (!await nunchi.Join(Context.User.Id, Context.User.ToString())) + { + // if you failed joining, that means game is running or just ended + // await ReplyErrorLocalized("nunchi_already_started").ConfigureAwait(false); + return; + } + + await ReplyConfirmLocalized("nunchi_joined", nunchi.ParticipantCount).ConfigureAwait(false); + return; + } + + + try { await ConfirmLocalized("nunchi_created").ConfigureAwait(false); } catch { } + + nunchi.OnGameEnded += Nunchi_OnGameEnded; + //nunchi.OnGameStarted += Nunchi_OnGameStarted; + nunchi.OnRoundEnded += Nunchi_OnRoundEnded; + nunchi.OnUserGuessed += Nunchi_OnUserGuessed; + nunchi.OnRoundStarted += Nunchi_OnRoundStarted; + _client.MessageReceived += _client_MessageReceived; + + var success = await nunchi.Initialize().ConfigureAwait(false); + if (!success) + { + if (_service.NunchiGames.TryRemove(Context.Guild.Id, out var game)) + game.Dispose(); + await ConfirmLocalized("nunchi_failed_to_start").ConfigureAwait(false); + } + + Task _client_MessageReceived(SocketMessage arg) + { + var _ = Task.Run(async () => + { + if (arg.Channel.Id != Context.Channel.Id) + return; + + if (!int.TryParse(arg.Content, out var number)) + return; + try + { + await nunchi.Input(arg.Author.Id, arg.Author.ToString(), number).ConfigureAwait(false); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + }); + return Task.CompletedTask; + } + + Task Nunchi_OnGameEnded(Nunchi arg1, string arg2) + { + if (_service.NunchiGames.TryRemove(Context.Guild.Id, out var game)) + { + _client.MessageReceived -= _client_MessageReceived; + game.Dispose(); + } + + if (arg2 == null) + return ConfirmLocalized("nunchi_ended_no_winner", Format.Bold(arg2)); + else + return ConfirmLocalized("nunchi_ended", Format.Bold(arg2)); + } + } + + private Task Nunchi_OnRoundStarted(Nunchi arg, int cur) + { + return ConfirmLocalized("nunchi_round_started", + Format.Bold(arg.ParticipantCount.ToString()), + Format.Bold(cur.ToString())); + } + + private Task Nunchi_OnUserGuessed(Nunchi arg) + { + return ConfirmLocalized("nunchi_next_number", Format.Bold(arg.CurrentNumber.ToString())); + } + + private Task Nunchi_OnRoundEnded(Nunchi arg1, (ulong Id, string Name)? arg2) + { + if(arg2.HasValue) + return ConfirmLocalized("nunchi_round_ended", Format.Bold(arg2.Value.Name)); + else + return ConfirmLocalized("nunchi_round_ended_boot", + Format.Bold("\n" + string.Join("\n, ", arg1.Participants.Select(x => x.Name)))); // this won't work if there are too many users + } + + private Task Nunchi_OnGameStarted(Nunchi arg) + { + return ConfirmLocalized("nunchi_started", Format.Bold(arg.ParticipantCount.ToString())); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs b/NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs new file mode 100644 index 00000000..179e9c91 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs @@ -0,0 +1,144 @@ +using Discord; +using Discord.Commands; +using Microsoft.EntityFrameworkCore; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + /// + /// Flower picking/planting idea is given to me by its + /// inceptor Violent Crumble from Game Developers League discord server + /// (he has !cookie and !nom) Thanks a lot Violent! + /// Check out GDL (its a growing gamedev community): + /// https://discord.gg/0TYNJfCU4De7YIk8 + /// + [Group] + public class PlantPickCommands : NadekoSubmodule + { + private readonly CurrencyService _cs; + private readonly IBotConfigProvider _bc; + private readonly DbService _db; + + public PlantPickCommands(IBotConfigProvider bc, CurrencyService cs, + DbService db) + { + _bc = bc; + _cs = cs; + _db = db; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Pick() + { + var channel = (ITextChannel)Context.Channel; + + if (!(await channel.Guild.GetCurrentUserAsync()).GetPermissions(channel).ManageMessages) + return; + + + try { await Context.Message.DeleteAsync().ConfigureAwait(false); } catch { } + if (!_service.PlantedFlowers.TryRemove(channel.Id, out List msgs)) + return; + + await Task.WhenAll(msgs.Where(m => m != null).Select(toDelete => toDelete.DeleteAsync())).ConfigureAwait(false); + + await _cs.AddAsync((IGuildUser)Context.User, $"Picked {_bc.BotConfig.CurrencyPluralName}", msgs.Count, false).ConfigureAwait(false); + var msg = await ReplyConfirmLocalized("picked", msgs.Count + _bc.BotConfig.CurrencySign) + .ConfigureAwait(false); + msg.DeleteAfter(10); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Plant(int amount = 1) + { + if (amount < 1) + return; + + var removed = await _cs.RemoveAsync((IGuildUser)Context.User, $"Planted a {_bc.BotConfig.CurrencyName}", amount, false).ConfigureAwait(false); + if (!removed) + { + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + + var imgData = _service.GetRandomCurrencyImage(); + + var msgToSend = GetText("planted", + Format.Bold(Context.User.ToString()), + amount + _bc.BotConfig.CurrencySign, + Prefix); + + if (amount > 1) + msgToSend += " " + GetText("pick_pl", Prefix); + else + msgToSend += " " + GetText("pick_sn", Prefix); + + IUserMessage msg; + using (var toSend = imgData.Data.ToStream()) + { + msg = await Context.Channel.SendFileAsync(toSend, imgData.Name, msgToSend).ConfigureAwait(false); + } + + var msgs = new IUserMessage[amount]; + msgs[0] = msg; + + _service.PlantedFlowers.AddOrUpdate(Context.Channel.Id, msgs.ToList(), (id, old) => + { + old.AddRange(msgs); + return old; + }); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.ManageMessages)] +#if GLOBAL_NADEKO + [OwnerOnly] +#endif + public async Task GenCurrency() + { + var channel = (ITextChannel)Context.Channel; + + bool enabled; + using (var uow = _db.UnitOfWork) + { + var guildConfig = uow.GuildConfigs.For(channel.Guild.Id, set => set.Include(gc => gc.GenerateCurrencyChannelIds)); + + var toAdd = new GCChannelId() { ChannelId = channel.Id }; + if (!guildConfig.GenerateCurrencyChannelIds.Contains(toAdd)) + { + guildConfig.GenerateCurrencyChannelIds.Add(toAdd); + _service.GenerationChannels.Add(channel.Id); + enabled = true; + } + else + { + guildConfig.GenerateCurrencyChannelIds.Remove(toAdd); + _service.GenerationChannels.TryRemove(channel.Id); + enabled = false; + } + await uow.CompleteAsync(); + } + if (enabled) + { + await ReplyConfirmLocalized("curgen_enabled").ConfigureAwait(false); + } + else + { + await ReplyConfirmLocalized("curgen_disabled").ConfigureAwait(false); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/PollCommands.cs b/NadekoBot.Core/Modules/Games/PollCommands.cs new file mode 100644 index 00000000..bd136e7f --- /dev/null +++ b/NadekoBot.Core/Modules/Games/PollCommands.cs @@ -0,0 +1,60 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class PollCommands : NadekoSubmodule + { + private readonly DiscordSocketClient _client; + + public PollCommands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireUserPermission(GuildPermission.ManageMessages)] + [RequireContext(ContextType.Guild)] + public Task Poll([Remainder] string arg = null) + => InternalStartPoll(arg); + + [NadekoCommand, Usage, Description, Aliases] + [RequireUserPermission(GuildPermission.ManageMessages)] + [RequireContext(ContextType.Guild)] + public async Task PollStats() + { + if (!_service.ActivePolls.TryGetValue(Context.Guild.Id, out var poll)) + return; + + await Context.Channel.EmbedAsync(poll.GetStats(GetText("current_poll_results"))); + } + + private async Task InternalStartPoll(string arg) + { + if(await _service.StartPoll((ITextChannel)Context.Channel, Context.Message, arg) == false) + await ReplyErrorLocalized("poll_already_running").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireUserPermission(GuildPermission.ManageMessages)] + [RequireContext(ContextType.Guild)] + public async Task Pollend() + { + var channel = (ITextChannel)Context.Channel; + + _service.ActivePolls.TryRemove(channel.Guild.Id, out var poll); + await poll.StopPoll().ConfigureAwait(false); + } + } + + + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs b/NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs new file mode 100644 index 00000000..ee1a27f8 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; +using NadekoBot.Common.ModuleBehaviors; +using NadekoBot.Extensions; +using NadekoBot.Modules.Permissions.Common; +using NadekoBot.Modules.Permissions.Services; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; +using NLog; +using NadekoBot.Modules.Games.Common.ChatterBot; + +namespace NadekoBot.Modules.Games.Services +{ + public class ChatterBotService : IEarlyBlockingExecutor, INService + { + private readonly DiscordSocketClient _client; + private readonly Logger _log; + private readonly PermissionService _perms; + private readonly CommandHandler _cmd; + private readonly NadekoStrings _strings; + private readonly IBotCredentials _creds; + + public ConcurrentDictionary> ChatterBotGuilds { get; } + + public ChatterBotService(DiscordSocketClient client, PermissionService perms, + NadekoBot bot, CommandHandler cmd, NadekoStrings strings, + IBotCredentials creds) + { + _client = client; + _log = LogManager.GetCurrentClassLogger(); + _perms = perms; + _cmd = cmd; + _strings = strings; + _creds = creds; + + ChatterBotGuilds = new ConcurrentDictionary>( + bot.AllGuildConfigs + .Where(gc => gc.CleverbotEnabled) + .ToDictionary(gc => gc.GuildId, gc => new Lazy(() => CreateSession(), true))); + } + + public IChatterBotSession CreateSession() + { + if (string.IsNullOrWhiteSpace(_creds.CleverbotApiKey)) + return new ChatterBotSession(); + else + return new OfficialCleverbotSession(_creds.CleverbotApiKey); + } + + public string PrepareMessage(IUserMessage msg, out IChatterBotSession cleverbot) + { + var channel = msg.Channel as ITextChannel; + cleverbot = null; + + if (channel == null) + return null; + + if (!ChatterBotGuilds.TryGetValue(channel.Guild.Id, out Lazy lazyCleverbot)) + return null; + + cleverbot = lazyCleverbot.Value; + + var nadekoId = _client.CurrentUser.Id; + var normalMention = $"<@{nadekoId}> "; + var nickMention = $"<@!{nadekoId}> "; + string message; + if (msg.Content.StartsWith(normalMention)) + { + message = msg.Content.Substring(normalMention.Length).Trim(); + } + else if (msg.Content.StartsWith(nickMention)) + { + message = msg.Content.Substring(nickMention.Length).Trim(); + } + else + { + return null; + } + + return message; + } + + public async Task TryAsk(IChatterBotSession cleverbot, ITextChannel channel, string message) + { + await channel.TriggerTypingAsync().ConfigureAwait(false); + + var response = await cleverbot.Think(message).ConfigureAwait(false); + try + { + await channel.SendConfirmAsync(response.SanitizeMentions()).ConfigureAwait(false); + } + catch + { + await channel.SendConfirmAsync(response.SanitizeMentions()).ConfigureAwait(false); // try twice :\ + } + return true; + } + + public async Task TryExecuteEarly(DiscordSocketClient client, IGuild guild, IUserMessage usrMsg) + { + if (!(guild is SocketGuild sg)) + return false; + try + { + var message = PrepareMessage(usrMsg, out IChatterBotSession cbs); + if (message == null || cbs == null) + return false; + + var pc = _perms.GetCache(guild.Id); + if (!pc.Permissions.CheckPermissions(usrMsg, + "cleverbot", + "Games".ToLowerInvariant(), + out int index)) + { + if (pc.Verbose) + { + var returnMsg = _strings.GetText("trigger", guild.Id, "Permissions".ToLowerInvariant(), index + 1, Format.Bold(pc.Permissions[index].GetCommand(_cmd.GetPrefix(guild), (SocketGuild)guild))); + try { await usrMsg.Channel.SendErrorAsync(returnMsg).ConfigureAwait(false); } catch { } + _log.Info(returnMsg); + } + return true; + } + + var cleverbotExecuted = await TryAsk(cbs, (ITextChannel)usrMsg.Channel, message).ConfigureAwait(false); + if (cleverbotExecuted) + { + _log.Info($@"CleverBot Executed +Server: {guild.Name} [{guild.Id}] +Channel: {usrMsg.Channel?.Name} [{usrMsg.Channel?.Id}] +UserId: {usrMsg.Author} [{usrMsg.Author.Id}] +Message: {usrMsg.Content}"); + return true; + } + } + catch (Exception ex) { _log.Warn(ex, "Error in cleverbot"); } + return false; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Services/GamesService.cs b/NadekoBot.Core/Modules/Games/Services/GamesService.cs new file mode 100644 index 00000000..25769715 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Services/GamesService.cs @@ -0,0 +1,215 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; +using NadekoBot.Common; +using NadekoBot.Common.Collections; +using NadekoBot.Extensions; +using NadekoBot.Modules.Games.Common; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; +using Newtonsoft.Json; +using NLog; +using NadekoBot.Modules.Games.Common.Acrophobia; +using NadekoBot.Modules.Games.Common.Connect4; +using NadekoBot.Modules.Games.Common.Hangman; +using NadekoBot.Modules.Games.Common.Trivia; +using NadekoBot.Modules.Games.Common.Nunchi; + +namespace NadekoBot.Modules.Games.Services +{ + public class GamesService : INService, IUnloadableService + { + private readonly IBotConfigProvider _bc; + + public readonly ConcurrentDictionary GirlRatings = new ConcurrentDictionary(); + public readonly ImmutableArray EightBallResponses; + + private readonly Timer _t; + private readonly CommandHandler _cmd; + private readonly NadekoStrings _strings; + private readonly IImagesService _images; + private readonly Logger _log; + + public readonly string TypingArticlesPath = "data/typing_articles2.json"; + private readonly CommandHandler _cmdHandler; + + public List TypingArticles { get; } = new List(); + + //channelId, game + public ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary Connect4Games { get; } = new ConcurrentDictionary(); + + public ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); + public TermPool TermPool { get; } = new TermPool(); + + public ConcurrentDictionary RunningTrivias { get; } = new ConcurrentDictionary(); + public Dictionary TicTacToeGames { get; } = new Dictionary(); + public ConcurrentDictionary RunningContests { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary NunchiGames { get; } = new ConcurrentDictionary(); + + public GamesService(CommandHandler cmd, IBotConfigProvider bc, NadekoBot bot, + NadekoStrings strings, IImagesService images, CommandHandler cmdHandler) + { + _bc = bc; + _cmd = cmd; + _strings = strings; + _images = images; + _cmdHandler = cmdHandler; + _log = LogManager.GetCurrentClassLogger(); + + //8ball + EightBallResponses = _bc.BotConfig.EightBallResponses.Select(ebr => ebr.Text).ToImmutableArray(); + + //girl ratings + _t = new Timer((_) => + { + GirlRatings.Clear(); + + }, null, TimeSpan.FromDays(1), TimeSpan.FromDays(1)); + + //plantpick + _cmd.OnMessageNoTrigger += PotentialFlowerGeneration; + GenerationChannels = new ConcurrentHashSet(bot + .AllGuildConfigs + .SelectMany(c => c.GenerateCurrencyChannelIds.Select(obj => obj.ChannelId))); + + try + { + TypingArticles = JsonConvert.DeserializeObject>(File.ReadAllText(TypingArticlesPath)); + } + catch (Exception ex) + { + _log.Warn("Error while loading typing articles {0}", ex.ToString()); + TypingArticles = new List(); + } + } + + public async Task Unload() + { + _t.Change(Timeout.Infinite, Timeout.Infinite); + _cmd.OnMessageNoTrigger -= PotentialFlowerGeneration; + + AcrophobiaGames.ForEach(x => x.Value.Dispose()); + AcrophobiaGames.Clear(); + Connect4Games.ForEach(x => x.Value.Dispose()); + Connect4Games.Clear(); + HangmanGames.ForEach(x => x.Value.Dispose()); + HangmanGames.Clear(); + await Task.WhenAll(RunningTrivias.Select(x => x.Value.StopGame())); + RunningTrivias.Clear(); + + TicTacToeGames.Clear(); + + await Task.WhenAll(RunningContests.Select(x => x.Value.Stop())) + .ConfigureAwait(false); + RunningContests.Clear(); + NunchiGames.ForEach(x => x.Value.Dispose()); + NunchiGames.Clear(); + } + + private void DisposeElems(IEnumerable xs) + { + xs.ForEach(x => x.Dispose()); + } + + public void AddTypingArticle(IUser user, string text) + { + TypingArticles.Add(new TypingArticle + { + Title = $"Text added on {DateTime.UtcNow} by {user}", + Text = text.SanitizeMentions(), + }); + + File.WriteAllText(TypingArticlesPath, JsonConvert.SerializeObject(TypingArticles)); + } + + public ConcurrentHashSet GenerationChannels { get; } + //channelid/message + public ConcurrentDictionary> PlantedFlowers { get; } = new ConcurrentDictionary>(); + //channelId/last generation + public ConcurrentDictionary LastGenerations { get; } = new ConcurrentDictionary(); + + private ConcurrentDictionary _locks { get; } = new ConcurrentDictionary(); + + public (string Name, ImmutableArray Data) GetRandomCurrencyImage() + { + var rng = new NadekoRandom(); + return _images.Currency[rng.Next(0, _images.Currency.Length)]; + } + + private string GetText(ITextChannel ch, string key, params object[] rep) + => _strings.GetText(key, ch.GuildId, "Games".ToLowerInvariant(), rep); + + private Task PotentialFlowerGeneration(IUserMessage imsg) + { + var msg = imsg as SocketUserMessage; + if (msg == null || msg.Author.IsBot) + return Task.CompletedTask; + + var channel = imsg.Channel as ITextChannel; + if (channel == null) + return Task.CompletedTask; + + if (!GenerationChannels.Contains(channel.Id)) + return Task.CompletedTask; + + var _ = Task.Run(async () => + { + try + { + var lastGeneration = LastGenerations.GetOrAdd(channel.Id, DateTime.MinValue); + var rng = new NadekoRandom(); + + if (DateTime.UtcNow - TimeSpan.FromSeconds(_bc.BotConfig.CurrencyGenerationCooldown) < lastGeneration) //recently generated in this channel, don't generate again + return; + + var num = rng.Next(1, 101) + _bc.BotConfig.CurrencyGenerationChance * 100; + if (num > 100 && LastGenerations.TryUpdate(channel.Id, DateTime.UtcNow, lastGeneration)) + { + var dropAmount = _bc.BotConfig.CurrencyDropAmount; + var dropAmountMax = _bc.BotConfig.CurrencyDropAmountMax; + + if (dropAmountMax != null && dropAmountMax > dropAmount) + dropAmount = new NadekoRandom().Next(dropAmount, dropAmountMax.Value + 1); + + if (dropAmount > 0) + { + var msgs = new IUserMessage[dropAmount]; + var prefix = _cmdHandler.GetPrefix(channel.Guild.Id); + var toSend = dropAmount == 1 + ? GetText(channel, "curgen_sn", _bc.BotConfig.CurrencySign) + + " " + GetText(channel, "pick_sn", prefix) + : GetText(channel, "curgen_pl", dropAmount, _bc.BotConfig.CurrencySign) + + " " + GetText(channel, "pick_pl", prefix); + var file = GetRandomCurrencyImage(); + using (var fileStream = file.Data.ToStream()) + { + var sent = await channel.SendFileAsync( + fileStream, + file.Name, + toSend).ConfigureAwait(false); + + msgs[0] = sent; + } + + PlantedFlowers.AddOrUpdate(channel.Id, msgs.ToList(), (id, old) => { old.AddRange(msgs); return old; }); + } + } + } + catch (Exception ex) + { + LogManager.GetCurrentClassLogger().Warn(ex); + } + }); + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/Services/PollService.cs b/NadekoBot.Core/Modules/Games/Services/PollService.cs new file mode 100644 index 00000000..e2fc96be --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Services/PollService.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Concurrent; +using System.Linq; +using System.Threading.Tasks; +using Discord; +using Discord.WebSocket; +using NadekoBot.Common.ModuleBehaviors; +using NadekoBot.Modules.Games.Common; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; +using NLog; + +namespace NadekoBot.Modules.Games.Services +{ + public class PollService : IEarlyBlockingExecutor, INService + { + public ConcurrentDictionary ActivePolls = new ConcurrentDictionary(); + private readonly Logger _log; + private readonly DiscordSocketClient _client; + private readonly NadekoStrings _strings; + + public PollService(DiscordSocketClient client, NadekoStrings strings) + { + _log = LogManager.GetCurrentClassLogger(); + _client = client; + _strings = strings; + } + + public async Task StartPoll(ITextChannel channel, IUserMessage msg, string arg) + { + if (string.IsNullOrWhiteSpace(arg) || !arg.Contains(";")) + return null; + var data = arg.Split(';'); + if (data.Length < 3) + return null; + + var poll = new Poll(_client, _strings, msg, data[0], data.Skip(1)); + if (ActivePolls.TryAdd(channel.Guild.Id, poll)) + { + poll.OnEnded += (gid) => + { + ActivePolls.TryRemove(gid, out _); + }; + + await poll.StartPoll().ConfigureAwait(false); + return true; + } + return false; + } + + public async Task TryExecuteEarly(DiscordSocketClient client, IGuild guild, IUserMessage msg) + { + if (guild == null) + return false; + + if (!ActivePolls.TryGetValue(guild.Id, out var poll)) + return false; + + try + { + return await poll.TryVote(msg).ConfigureAwait(false); + } + catch (Exception ex) + { + _log.Warn(ex); + } + + return false; + } + } +} diff --git a/NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs b/NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs new file mode 100644 index 00000000..1e049d21 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs @@ -0,0 +1,120 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using Newtonsoft.Json; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Common; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class SpeedTypingCommands : NadekoSubmodule + { + private readonly GamesService _games; + private readonly DiscordSocketClient _client; + + public SpeedTypingCommands(DiscordSocketClient client, GamesService games) + { + _games = games; + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task TypeStart() + { + var channel = (ITextChannel)Context.Channel; + + var game = _service.RunningContests.GetOrAdd(channel.Guild.Id, id => new TypingGame(_games, _client, channel, Prefix)); + + if (game.IsActive) + { + await channel.SendErrorAsync( + $"Contest already running in " + + $"{game.Channel.Mention} channel.") + .ConfigureAwait(false); + } + else + { + await game.Start().ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task TypeStop() + { + var channel = (ITextChannel)Context.Channel; + if (_service.RunningContests.TryRemove(channel.Guild.Id, out TypingGame game)) + { + await game.Stop().ConfigureAwait(false); + return; + } + await channel.SendErrorAsync("No contest to stop on this channel.").ConfigureAwait(false); + } + + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Typeadd([Remainder] string text) + { + var channel = (ITextChannel)Context.Channel; + if (string.IsNullOrWhiteSpace(text)) + return; + + _games.AddTypingArticle(Context.User, text); + + await channel.SendConfirmAsync("Added new article for typing game.").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Typelist(int page = 1) + { + var channel = (ITextChannel)Context.Channel; + + if (page < 1) + return; + + var articles = _games.TypingArticles.Skip((page - 1) * 15).Take(15).ToArray(); + + if (!articles.Any()) + { + await channel.SendErrorAsync($"{Context.User.Mention} `No articles found on that page.`").ConfigureAwait(false); + return; + } + var i = (page - 1) * 15; + await channel.SendConfirmAsync("List of articles for Type Race", string.Join("\n", articles.Select(a => $"`#{++i}` - {a.Text.TrimTo(50)}"))) + .ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Typedel(int index) + { + var channel = (ITextChannel)Context.Channel; + + index -= 1; + if (index < 0 || index >= _games.TypingArticles.Count) + return; + + var removed = _games.TypingArticles[index]; + _games.TypingArticles.RemoveAt(index); + + File.WriteAllText(_games.TypingArticlesPath, JsonConvert.SerializeObject(_games.TypingArticles)); + + await channel.SendConfirmAsync($"`Removed typing article:` #{index + 1} - {removed.Text.TrimTo(50)}") + .ConfigureAwait(false); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/TicTacToeCommands.cs b/NadekoBot.Core/Modules/Games/TicTacToeCommands.cs new file mode 100644 index 00000000..aed0b43f --- /dev/null +++ b/NadekoBot.Core/Modules/Games/TicTacToeCommands.cs @@ -0,0 +1,62 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Modules.Games.Services; +using NadekoBot.Modules.Games.Common; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class TicTacToeCommands : NadekoSubmodule + { + private readonly SemaphoreSlim _sem = new SemaphoreSlim(1, 1); + private readonly DiscordSocketClient _client; + + public TicTacToeCommands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task TicTacToe() + { + var channel = (ITextChannel)Context.Channel; + + await _sem.WaitAsync(1000); + try + { + if (_service.TicTacToeGames.TryGetValue(channel.Id, out TicTacToe game)) + { + var _ = Task.Run(async () => + { + await game.Start((IGuildUser)Context.User); + }); + return; + } + game = new TicTacToe(base._strings, this._client, channel, (IGuildUser)Context.User); + _service.TicTacToeGames.Add(channel.Id, game); + await ReplyConfirmLocalized("ttt_created").ConfigureAwait(false); + + game.OnEnded += (g) => + { + _service.TicTacToeGames.Remove(channel.Id); + }; + } + finally + { + _sem.Release(); + } + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Games/TriviaCommands.cs b/NadekoBot.Core/Modules/Games/TriviaCommands.cs new file mode 100644 index 00000000..d47058d1 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/TriviaCommands.cs @@ -0,0 +1,98 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Games.Common.Trivia; +using NadekoBot.Modules.Games.Services; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class TriviaCommands : NadekoSubmodule + { + private readonly CurrencyService _cs; + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + + public TriviaCommands(DiscordSocketClient client, IBotConfigProvider bc, CurrencyService cs) + { + _cs = cs; + _client = client; + _bc = bc; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public Task Trivia([Remainder] string additionalArgs = "") + => InternalTrivia(10, additionalArgs); + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public Task Trivia(int winReq = 10, [Remainder] string additionalArgs = "") + => InternalTrivia(winReq, additionalArgs); + + public async Task InternalTrivia(int winReq, string additionalArgs = "") + { + var channel = (ITextChannel)Context.Channel; + + additionalArgs = additionalArgs?.Trim()?.ToLowerInvariant(); + + var showHints = !additionalArgs.Contains("nohint"); + var isPokemon = additionalArgs.Contains("pokemon"); + + var trivia = new TriviaGame(_strings, _client, _bc, _cs, channel.Guild, channel, showHints, winReq, isPokemon); + if (_service.RunningTrivias.TryAdd(channel.Guild.Id, trivia)) + { + try + { + await trivia.StartGame().ConfigureAwait(false); + } + finally + { + _service.RunningTrivias.TryRemove(channel.Guild.Id, out trivia); + await trivia.EnsureStopped().ConfigureAwait(false); + } + return; + } + + await Context.Channel.SendErrorAsync(GetText("trivia_already_running") + "\n" + trivia.CurrentQuestion) + .ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Tl() + { + var channel = (ITextChannel)Context.Channel; + + if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out TriviaGame trivia)) + { + await channel.SendConfirmAsync(GetText("leaderboard"), trivia.GetLeaderboard()).ConfigureAwait(false); + return; + } + + await ReplyErrorLocalized("trivia_none").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Tq() + { + var channel = (ITextChannel)Context.Channel; + + if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out TriviaGame trivia)) + { + await trivia.StopGame().ConfigureAwait(false); + return; + } + + await ReplyErrorLocalized("trivia_none").ConfigureAwait(false); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs b/NadekoBot.Core/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs new file mode 100644 index 00000000..7e2a7706 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs @@ -0,0 +1,9 @@ +using System; + +namespace NadekoBot.Modules.Music.Common.Exceptions +{ + public class NotInVoiceChannelException : Exception + { + public NotInVoiceChannelException() : base("You're not in the voice channel on this server.") { } + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/Exceptions/QueueFullException.cs b/NadekoBot.Core/Modules/Music/Common/Exceptions/QueueFullException.cs new file mode 100644 index 00000000..be92f09d --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/Exceptions/QueueFullException.cs @@ -0,0 +1,12 @@ +using System; + +namespace NadekoBot.Modules.Music.Common.Exceptions +{ + public class QueueFullException : Exception + { + public QueueFullException(string message) : base(message) + { + } + public QueueFullException() : base("Queue is full.") { } + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/Exceptions/SongNotFoundException.cs b/NadekoBot.Core/Modules/Music/Common/Exceptions/SongNotFoundException.cs new file mode 100644 index 00000000..823d2776 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/Exceptions/SongNotFoundException.cs @@ -0,0 +1,12 @@ +using System; + +namespace NadekoBot.Modules.Music.Common.Exceptions +{ + public class SongNotFoundException : Exception + { + public SongNotFoundException(string message) : base(message) + { + } + public SongNotFoundException() : base("Song is not found.") { } + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs b/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs new file mode 100644 index 00000000..edb85085 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs @@ -0,0 +1,670 @@ +using Discord; +using Discord.Audio; +using System; +using System.Threading; +using System.Threading.Tasks; +using NLog; +using System.Linq; +using NadekoBot.Extensions; +using System.Diagnostics; +using NadekoBot.Common.Collections; +using NadekoBot.Modules.Music.Services; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; + +namespace NadekoBot.Modules.Music.Common +{ + public enum StreamState + { + Resolving, + Queued, + Playing, + Completed + } + public class MusicPlayer + { + private readonly Thread _player; + public IVoiceChannel VoiceChannel { get; private set; } + private readonly Logger _log; + + private MusicQueue Queue { get; } = new MusicQueue(); + + public bool Exited { get; set; } = false; + public bool Stopped { get; private set; } = false; + public float Volume { get; private set; } = 1.0f; + public bool Paused => pauseTaskSource != null; + private TaskCompletionSource pauseTaskSource { get; set; } = null; + + public string PrettyVolume => $"🔉 {(int)(Volume * 100)}%"; + public string PrettyCurrentTime + { + get + { + var time = CurrentTime.ToString(@"mm\:ss"); + var hrs = (int)CurrentTime.TotalHours; + + if (hrs > 0) + return hrs + ":" + time; + else + return time; + } + } + public string PrettyFullTime => PrettyCurrentTime + " / " + (Queue.Current.Song?.PrettyTotalTime ?? "?"); + private CancellationTokenSource SongCancelSource { get; set; } + public ITextChannel OutputTextChannel { get; set; } + public (int Index, SongInfo Current) Current + { + get + { + if (Stopped) + return (0, null); + return Queue.Current; + } + } + + public bool RepeatCurrentSong { get; private set; } + public bool Shuffle { get; private set; } + public bool Autoplay { get; private set; } + public bool RepeatPlaylist { get; private set; } = false; + public uint MaxQueueSize + { + get => Queue.MaxQueueSize; + set { lock (locker) Queue.MaxQueueSize = value; } + } + private bool _fairPlay; + public bool FairPlay + { + get => _fairPlay; + set + { + if (value) + { + var cur = Queue.Current; + if (cur.Song != null) + RecentlyPlayedUsers.Add(cur.Song.QueuerName); + } + else + { + RecentlyPlayedUsers.Clear(); + } + + _fairPlay = value; + } + } + public bool AutoDelete { get; set; } + public uint MaxPlaytimeSeconds { get; set; } + + + const int _frameBytes = 3840; + const float _miliseconds = 20.0f; + public TimeSpan CurrentTime => TimeSpan.FromSeconds(_bytesSent / (float)_frameBytes / (1000 / _miliseconds)); + + private int _bytesSent = 0; + + private IAudioClient _audioClient; + private readonly object locker = new object(); + private MusicService _musicService; + + #region events + public event Action OnStarted; + public event Action OnCompleted; + public event Action OnPauseChanged; + #endregion + + + private bool manualSkip = false; + private bool manualIndex = false; + private bool newVoiceChannel = false; + private readonly IGoogleApiService _google; + + private bool cancel = false; + + private ConcurrentHashSet RecentlyPlayedUsers { get; } = new ConcurrentHashSet(); + public TimeSpan TotalPlaytime + { + get + { + var songs = Queue.ToArray().Songs; + return songs.Any(s => s.TotalTime == TimeSpan.MaxValue) + ? TimeSpan.MaxValue + : new TimeSpan(songs.Sum(s => s.TotalTime.Ticks)); + } + } + + + public MusicPlayer(MusicService musicService, IGoogleApiService google, IVoiceChannel vch, ITextChannel output, float volume) + { + _log = LogManager.GetCurrentClassLogger(); + this.Volume = volume; + this.VoiceChannel = vch; + this.SongCancelSource = new CancellationTokenSource(); + this.OutputTextChannel = output; + this._musicService = musicService; + this._google = google; + + _log.Info("Initialized"); + + _player = new Thread(new ThreadStart(PlayerLoop)); + _player.Start(); + _log.Info("Loop started"); + } + + private async void PlayerLoop() + { + while (!Exited) + { + _bytesSent = 0; + cancel = false; + CancellationToken cancelToken; + (int Index, SongInfo Song) data; + lock (locker) + { + data = Queue.Current; + cancelToken = SongCancelSource.Token; + manualSkip = false; + manualIndex = false; + } + if (data.Song != null) + { + _log.Info("Starting"); + AudioOutStream pcm = null; + SongBuffer b = null; + try + { + b = new SongBuffer(await data.Song.Uri(), "", data.Song.ProviderType == MusicType.Local); + //_log.Info("Created buffer, buffering..."); + + //var bufferTask = b.StartBuffering(cancelToken); + //var timeout = Task.Delay(10000); + //if (Task.WhenAny(bufferTask, timeout) == timeout) + //{ + // _log.Info("Buffering failed due to a timeout."); + // continue; + //} + //else if (!bufferTask.Result) + //{ + // _log.Info("Buffering failed due to a cancel or error."); + // continue; + //} + //_log.Info("Buffered. Getting audio client..."); + var ac = await GetAudioClient(); + _log.Info("Got Audio client"); + if (ac == null) + { + _log.Info("Can't join"); + await Task.Delay(900, cancelToken); + // just wait some time, maybe bot doesn't even have perms to join that voice channel, + // i don't want to spam connection attempts + continue; + } + pcm = ac.CreatePCMStream(AudioApplication.Music, bufferMillis: 500); + _log.Info("Created pcm stream"); + OnStarted?.Invoke(this, data); + + byte[] buffer = new byte[3840]; + int bytesRead = 0; + + while ((bytesRead = b.Read(buffer, 0, buffer.Length)) > 0 + && (MaxPlaytimeSeconds <= 0 || MaxPlaytimeSeconds >= CurrentTime.TotalSeconds)) + { + AdjustVolume(buffer, Volume); + await pcm.WriteAsync(buffer, 0, bytesRead, cancelToken).ConfigureAwait(false); + unchecked { _bytesSent += bytesRead; } + + await (pauseTaskSource?.Task ?? Task.CompletedTask); + } + } + catch (OperationCanceledException) + { + _log.Info("Song Canceled"); + cancel = true; + } + catch (Exception ex) + { + _log.Warn(ex); + } + finally + { + if (pcm != null) + { + // flush is known to get stuck from time to time, + // just skip flushing if it takes more than 1 second + var flushCancel = new CancellationTokenSource(); + var flushToken = flushCancel.Token; + var flushDelay = Task.Delay(1000, flushToken); + await Task.WhenAny(flushDelay, pcm.FlushAsync(flushToken)); + flushCancel.Cancel(); + pcm.Dispose(); + } + + if (b != null) + b.Dispose(); + + OnCompleted?.Invoke(this, data.Song); + + if (_bytesSent == 0 && !cancel) + { + lock (locker) + Queue.RemoveSong(data.Song); + _log.Info("Song removed because it can't play"); + } + } + try + { + //if repeating current song, just ignore other settings, + // and play this song again (don't change the index) + // ignore rcs if song is manually skipped + + int queueCount; + bool stopped; + int currentIndex; + lock (locker) + { + queueCount = Queue.Count; + stopped = Stopped; + currentIndex = Queue.CurrentIndex; + } + + if (AutoDelete && !RepeatCurrentSong && !RepeatPlaylist && data.Song != null) + { + Queue.RemoveSong(data.Song); + } + + if (!manualIndex && (!RepeatCurrentSong || manualSkip)) + { + if (Shuffle) + { + _log.Info("Random song"); + Queue.Random(); //if shuffle is set, set current song index to a random number + } + else + { + //if last song, and autoplay is enabled, and if it's a youtube song + // do autplay magix + if (queueCount - 1 == data.Index && Autoplay && data.Song?.ProviderType == MusicType.YouTube) + { + try + { + _log.Info("Loading related song"); + await _musicService.TryQueueRelatedSongAsync(data.Song, OutputTextChannel, VoiceChannel); + if(!AutoDelete) + Queue.Next(); + } + catch + { + _log.Info("Loading related song failed."); + } + } + else if (FairPlay) + { + lock (locker) + { + _log.Info("Next fair song"); + var q = Queue.ToArray().Songs.Shuffle().ToArray(); + + bool found = false; + for (var i = 0; i < q.Length; i++) //first try to find a queuer who didn't have their song played recently + { + var item = q[i]; + if (RecentlyPlayedUsers.Add(item.QueuerName)) // if it's found, set current song to that index + { + Queue.CurrentIndex = i; + found = true; + break; + } + } + if (!found) //if it's not + { + RecentlyPlayedUsers.Clear(); //clear all recently played users (that means everyone from the playlist has had their song played) + Queue.Random(); //go to a random song (to prevent looping on the first few songs) + var cur = Current; + if (cur.Current != null) // add newely scheduled song's queuer to the recently played list + RecentlyPlayedUsers.Add(cur.Current.QueuerName); + } + } + } + else if (queueCount - 1 == data.Index && !RepeatPlaylist && !manualSkip) + { + _log.Info("Stopping because repeatplaylist is disabled"); + lock (locker) + { + Stop(); + } + } + else + { + _log.Info("Next song"); + lock (locker) + { + if (!Stopped) + if(!AutoDelete) + Queue.Next(); + } + } + } + } + } + catch (Exception ex) + { + _log.Error(ex); + } + } + do + { + await Task.Delay(500); + } + while ((Queue.Count == 0 || Stopped) && !Exited); + } + } + + private async Task GetAudioClient(bool reconnect = false) + { + if (_audioClient == null || + _audioClient.ConnectionState != ConnectionState.Connected || + reconnect || + newVoiceChannel) + try + { + try + { + var t = _audioClient?.StopAsync(); + if (t != null) + { + + _log.Info("Stopping audio client"); + await t; + + _log.Info("Disposing audio client"); + _audioClient.Dispose(); + } + } + catch + { + } + newVoiceChannel = false; + + _log.Info("Get current user"); + var curUser = await VoiceChannel.Guild.GetCurrentUserAsync(); + if (curUser.VoiceChannel != null) + { + _log.Info("Connecting"); + var ac = await VoiceChannel.ConnectAsync(); + _log.Info("Connected, stopping"); + await ac.StopAsync(); + _log.Info("Disconnected"); + await Task.Delay(1000); + } + _log.Info("Connecting"); + _audioClient = await VoiceChannel.ConnectAsync(); + } + catch + { + return null; + } + return _audioClient; + } + + public int Enqueue(SongInfo song) + { + lock (locker) + { + if (Exited) + return -1; + Queue.Add(song); + return Queue.Count - 1; + } + } + + public int EnqueueNext(SongInfo song) + { + lock (locker) + { + if (Exited) + return -1; + return Queue.AddNext(song); + } + } + + public void SetIndex(int index) + { + if (index < 0) + throw new ArgumentOutOfRangeException(nameof(index)); + lock (locker) + { + if (Exited) + return; + if (AutoDelete && index >= Queue.CurrentIndex && index > 0) + index--; + Queue.CurrentIndex = index; + manualIndex = true; + Stopped = false; + CancelCurrentSong(); + } + } + + public void Next(int skipCount = 1) + { + lock (locker) + { + if (Exited) + return; + manualSkip = true; + // if player is stopped, and user uses .n, it should play current song. + // It's a bit weird, but that's the least annoying solution + if (!Stopped) + if (!RepeatPlaylist && Queue.IsLast()) // if it's the last song in the queue, and repeat playlist is disabled + { //stop the queue + Stop(); + return; + } + else + Queue.Next(skipCount - 1); + else + Queue.CurrentIndex = 0; + Stopped = false; + CancelCurrentSong(); + Unpause(); + } + } + + public void Stop(bool clearQueue = false) + { + lock (locker) + { + Stopped = true; + //Queue.ResetCurrent(); + if (clearQueue) + Queue.Clear(); + Unpause(); + CancelCurrentSong(); + } + } + + private void Unpause() + { + lock (locker) + { + if (pauseTaskSource != null) + { + pauseTaskSource.TrySetResult(true); + pauseTaskSource = null; + } + } + } + + public void TogglePause() + { + lock (locker) + { + if (pauseTaskSource == null) + pauseTaskSource = new TaskCompletionSource(); + else + { + Unpause(); + } + } + OnPauseChanged?.Invoke(this, pauseTaskSource != null); + } + + public void SetVolume(int volume) + { + if (volume < 0 || volume > 100) + throw new ArgumentOutOfRangeException(nameof(volume)); + lock (locker) + { + Volume = ((float)volume) / 100; + } + } + + public SongInfo RemoveAt(int index) + { + lock (locker) + { + var cur = Queue.Current; + var toReturn = Queue.RemoveAt(index); + if (cur.Index == index) + Next(); + return toReturn; + } + } + + private void CancelCurrentSong() + { + lock (locker) + { + var cs = SongCancelSource; + SongCancelSource = new CancellationTokenSource(); + cs.Cancel(); + } + } + + public void ClearQueue() + { + lock (locker) + { + Queue.Clear(); + } + } + + public (int CurrentIndex, SongInfo[] Songs) QueueArray() + { + lock (locker) + return Queue.ToArray(); + } + + //aidiakapi ftw + public static unsafe byte[] AdjustVolume(byte[] audioSamples, float volume) + { + if (Math.Abs(volume - 1f) < 0.0001f) return audioSamples; + + // 16-bit precision for the multiplication + var volumeFixed = (int)Math.Round(volume * 65536d); + + var count = audioSamples.Length / 2; + + fixed (byte* srcBytes = audioSamples) + { + var src = (short*)srcBytes; + + for (var i = count; i != 0; i--, src++) + *src = (short)(((*src) * volumeFixed) >> 16); + } + + return audioSamples; + } + + public bool ToggleRepeatSong() + { + lock (locker) + { + return RepeatCurrentSong = !RepeatCurrentSong; + } + } + + public async Task Destroy() + { + _log.Info("Destroying"); + lock (locker) + { + Stop(); + Exited = true; + Unpause(); + + OnCompleted = null; + OnPauseChanged = null; + OnStarted = null; + } + var ac = _audioClient; + if (ac != null) + await ac.StopAsync(); + } + + public bool ToggleShuffle() + { + lock (locker) + { + return Shuffle = !Shuffle; + } + } + + public bool ToggleAutoplay() + { + lock (locker) + { + return Autoplay = !Autoplay; + } + } + + public bool ToggleRepeatPlaylist() + { + lock (locker) + { + return RepeatPlaylist = !RepeatPlaylist; + } + } + + public async Task SetVoiceChannel(IVoiceChannel vch) + { + lock (locker) + { + if (Exited) + return; + VoiceChannel = vch; + } + _audioClient = await vch.ConnectAsync(); + } + + public async Task UpdateSongDurationsAsync() + { + var sw = Stopwatch.StartNew(); + var (_, songs) = Queue.ToArray(); + var toUpdate = songs + .Where(x => x.ProviderType == MusicType.YouTube + && x.TotalTime == TimeSpan.Zero); + + var vIds = toUpdate.Select(x => x.VideoId); + + sw.Stop(); + _log.Info(sw.Elapsed.TotalSeconds); + if (!vIds.Any()) + return; + + var durations = await _google.GetVideoDurationsAsync(vIds); + + foreach (var x in toUpdate) + { + if (durations.TryGetValue(x.VideoId, out var dur)) + x.TotalTime = dur; + } + } + + public SongInfo MoveSong(int n1, int n2) + => Queue.MoveSong(n1, n2); + + //// this should be written better + //public TimeSpan TotalPlaytime => + // _playlist.Any(s => s.TotalTime == TimeSpan.MaxValue) ? + // TimeSpan.MaxValue : + // new TimeSpan(_playlist.Sum(s => s.TotalTime.Ticks)); + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Music/Common/MusicQueue.cs b/NadekoBot.Core/Modules/Music/Common/MusicQueue.cs new file mode 100644 index 00000000..81241adf --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/MusicQueue.cs @@ -0,0 +1,215 @@ +using NadekoBot.Extensions; +using NadekoBot.Modules.Music.Common.Exceptions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common; + +namespace NadekoBot.Modules.Music.Common +{ + public class MusicQueue : IDisposable + { + private LinkedList Songs { get; set; } = new LinkedList(); + private int _currentIndex = 0; + public int CurrentIndex + { + get + { + return _currentIndex; + } + set + { + lock (locker) + { + if (Songs.Count == 0) + _currentIndex = 0; + else + _currentIndex = value %= Songs.Count; + } + } + } + public (int Index, SongInfo Song) Current + { + get + { + var cur = CurrentIndex; + return (cur, Songs.ElementAtOrDefault(cur)); + } + } + + private readonly object locker = new object(); + private TaskCompletionSource nextSource { get; } = new TaskCompletionSource(); + public int Count + { + get + { + lock (locker) + { + return Songs.Count; + } + } + } + + private uint _maxQueueSize; + public uint MaxQueueSize + { + get => _maxQueueSize; + set + { + if (value < 0) + throw new ArgumentOutOfRangeException(nameof(value)); + + lock (locker) + { + _maxQueueSize = value; + } + } + } + + public void Add(SongInfo song) + { + song.ThrowIfNull(nameof(song)); + lock (locker) + { + if(MaxQueueSize != 0 && Songs.Count >= MaxQueueSize) + throw new QueueFullException(); + Songs.AddLast(song); + } + } + + public int AddNext(SongInfo song) + { + song.ThrowIfNull(nameof(song)); + lock (locker) + { + if (MaxQueueSize != 0 && Songs.Count >= MaxQueueSize) + throw new QueueFullException(); + var curSong = Current.Song; + if (curSong == null) + { + Songs.AddLast(song); + return Songs.Count; + } + + var songlist = Songs.ToList(); + songlist.Insert(CurrentIndex + 1, song); + Songs = new LinkedList(songlist); + return CurrentIndex + 1; + } + } + + public void Next(int skipCount = 1) + { + lock(locker) + CurrentIndex += skipCount; + } + + public void Dispose() + { + Clear(); + } + + public SongInfo RemoveAt(int index) + { + lock (locker) + { + if (index < 0 || index >= Songs.Count) + throw new ArgumentOutOfRangeException(nameof(index)); + + var current = Songs.First.Value; + for (int i = 0; i < Songs.Count; i++) + { + if (i == index) + { + current = Songs.ElementAt(index); + Songs.Remove(current); + if (CurrentIndex != 0) + { + if (CurrentIndex >= index) + { + --CurrentIndex; + } + } + break; + } + } + return current; + } + } + + public void Clear() + { + lock (locker) + { + Songs.Clear(); + CurrentIndex = 0; + } + } + + public (int CurrentIndex, SongInfo[] Songs) ToArray() + { + lock (locker) + { + return (CurrentIndex, Songs.ToArray()); + } + } + + public void ResetCurrent() + { + lock (locker) + { + CurrentIndex = 0; + } + } + + public void Random() + { + lock (locker) + { + CurrentIndex = new NadekoRandom().Next(Songs.Count); + } + } + + public SongInfo MoveSong(int n1, int n2) + { + lock (locker) + { + var currentSong = Current.Song; + var playlist = Songs.ToList(); + if (n1 >= playlist.Count || n2 >= playlist.Count || n1 == n2) + return null; + + var s = playlist[n1]; + + playlist.RemoveAt(n1); + playlist.Insert(n2, s); + + Songs = new LinkedList(playlist); + + + if (currentSong != null) + CurrentIndex = playlist.IndexOf(currentSong); + + return s; + } + } + + public void RemoveSong(SongInfo song) + { + lock (locker) + { + Songs.Remove(song); + } + } + + public bool IsLast() + { + lock (locker) + return CurrentIndex == Songs.Count - 1; + } + } +} +//O O [O] O O O O +// +// 3 \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Music/Common/SongBuffer.cs b/NadekoBot.Core/Modules/Music/Common/SongBuffer.cs new file mode 100644 index 00000000..2193877f --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongBuffer.cs @@ -0,0 +1,95 @@ +using NLog; +using System; +using System.Diagnostics; +using System.IO; +using System.Threading; + +namespace NadekoBot.Modules.Music.Common +{ + public class SongBuffer : IDisposable + { + const int readSize = 81920; + private Process p; + private Stream _outStream; + + private readonly SemaphoreSlim _lock = new SemaphoreSlim(1, 1); + private readonly Logger _log; + + public string SongUri { get; private set; } + + public SongBuffer(string songUri, string skipTo, bool isLocal) + { + _log = LogManager.GetCurrentClassLogger(); + this.SongUri = songUri; + this._isLocal = isLocal; + + try + { + this.p = StartFFmpegProcess(SongUri, 0); + this._outStream = this.p.StandardOutput.BaseStream; + } + catch (System.ComponentModel.Win32Exception) + { + _log.Error(@"You have not properly installed or configured FFMPEG. +Please install and configure FFMPEG to play music. +Check the guides for your platform on how to setup ffmpeg correctly: + Windows Guide: https://goo.gl/OjKk8F + Linux Guide: https://goo.gl/ShjCUo"); + } + catch (OperationCanceledException) { } + catch (InvalidOperationException) { } // when ffmpeg is disposed + catch (Exception ex) + { + _log.Info(ex); + } + } + + private Process StartFFmpegProcess(string songUri, float skipTo = 0) + { + var args = $"-err_detect ignore_err -i {songUri} -f s16le -ar 48000 -vn -ac 2 pipe:1 -loglevel error"; + if (!_isLocal) + args = "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5 " + args; + + return Process.Start(new ProcessStartInfo + { + FileName = "ffmpeg", + Arguments = args, + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = false, + CreateNoWindow = true, + }); + } + + private readonly object locker = new object(); + private readonly bool _isLocal; + + public int Read(byte[] b, int offset, int toRead) + { + lock (locker) + return _outStream.Read(b, offset, toRead); + } + + public void Dispose() + { + try + { + this.p.StandardOutput.Dispose(); + } + catch (Exception ex) + { + _log.Error(ex); + } + try + { + if(!this.p.HasExited) + this.p.Kill(); + } + catch + { + } + _outStream.Dispose(); + this.p.Dispose(); + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Music/Common/SongHandler.cs b/NadekoBot.Core/Modules/Music/Common/SongHandler.cs new file mode 100644 index 00000000..660ec8f8 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongHandler.cs @@ -0,0 +1,9 @@ +using NLog; + +namespace NadekoBot.Modules.Music.Common +{ + public static class SongHandler + { + private static readonly Logger _log = LogManager.GetCurrentClassLogger(); + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongInfo.cs b/NadekoBot.Core/Modules/Music/Common/SongInfo.cs new file mode 100644 index 00000000..02f7ac35 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongInfo.cs @@ -0,0 +1,79 @@ +using Discord; +using NadekoBot.Extensions; +using NadekoBot.Core.Services.Database.Models; +using System; +using System.Net; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common +{ + public class SongInfo + { + public string Provider { get; set; } + public MusicType ProviderType { get; set; } + public string Query { get; set; } + public string Title { get; set; } + public Func> Uri { get; set; } + public string Thumbnail { get; set; } + public string QueuerName { get; set; } + public TimeSpan TotalTime { get; set; } = TimeSpan.Zero; + + public string PrettyProvider => (Provider ?? "???"); + //public string PrettyFullTime => PrettyCurrentTime + " / " + PrettyTotalTime; + public string PrettyName => $"**[{Title.TrimTo(65)}]({SongUrl})**"; + public string PrettyInfo => $"{PrettyTotalTime} | {PrettyProvider} | {QueuerName}"; + public string PrettyFullName => $"{PrettyName}\n\t\t`{PrettyTotalTime} | {PrettyProvider} | {Format.Sanitize(QueuerName.TrimTo(15))}`"; + public string PrettyTotalTime + { + get + { + if (TotalTime == TimeSpan.Zero) + return "(?)"; + if (TotalTime == TimeSpan.MaxValue) + return "∞"; + var time = TotalTime.ToString(@"mm\:ss"); + var hrs = (int)TotalTime.TotalHours; + + if (hrs > 0) + return hrs + ":" + time; + return time; + } + } + + public string SongUrl + { + get + { + switch (ProviderType) + { + case MusicType.YouTube: + return Query; + case MusicType.Soundcloud: + return Query; + case MusicType.Local: + return $"https://google.com/search?q={ WebUtility.UrlEncode(Title).Replace(' ', '+') }"; + case MusicType.Radio: + return $"https://google.com/search?q={Title}"; + default: + return ""; + } + } + } + private string _videoId = null; + public string VideoId + { + get + { + if (ProviderType == MusicType.YouTube) + return _videoId = _videoId ?? videoIdRegex.Match(Query)?.ToString(); + + return _videoId ?? ""; + } + + set => _videoId = value; + } + + private readonly Regex videoIdRegex = new Regex("<=v=[a-zA-Z0-9-]+(?=&)|(?<=[0-9])[^&\n]+|(?<=v=)[^&\n]+", RegexOptions.Compiled); + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs new file mode 100644 index 00000000..688971f7 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs @@ -0,0 +1,11 @@ +using NadekoBot.Modules.Music.Common.SongResolver.Strategies; +using NadekoBot.Core.Services.Database.Models; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common.SongResolver +{ + public interface ISongResolverFactory + { + Task GetResolveStrategy(string query, MusicType? musicType); + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs new file mode 100644 index 00000000..b06739b9 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs @@ -0,0 +1,41 @@ +using System.Threading.Tasks; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Modules.Music.Common.SongResolver.Strategies; + +namespace NadekoBot.Modules.Music.Common.SongResolver +{ + public class SongResolverFactory : ISongResolverFactory + { + private readonly SoundCloudApiService _sc; + + public SongResolverFactory(SoundCloudApiService sc) + { + _sc = sc; + } + + public async Task GetResolveStrategy(string query, MusicType? musicType) + { + await Task.Yield(); //for async warning + switch (musicType) + { + case MusicType.YouTube: + return new YoutubeResolveStrategy(); + case MusicType.Radio: + return new RadioResolveStrategy(); + case MusicType.Local: + return new LocalSongResolveStrategy(); + case MusicType.Soundcloud: + return new SoundcloudResolveStrategy(_sc); + default: + if (_sc.IsSoundCloudLink(query)) + return new SoundcloudResolveStrategy(_sc); + else if (RadioResolveStrategy.IsRadioLink(query)) + return new RadioResolveStrategy(); + // maybe add a check for local files in the future + else + return new YoutubeResolveStrategy(); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs new file mode 100644 index 00000000..ec709dab --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies +{ + public interface IResolveStrategy + { + Task ResolveSong(string query); + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs new file mode 100644 index 00000000..e262c9a9 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs @@ -0,0 +1,22 @@ +using NadekoBot.Core.Services.Database.Models; +using System.IO; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies +{ + public class LocalSongResolveStrategy : IResolveStrategy + { + public Task ResolveSong(string query) + { + return Task.FromResult(new SongInfo + { + Uri = () => Task.FromResult("\"" + Path.GetFullPath(query) + "\""), + Title = Path.GetFileNameWithoutExtension(query), + Provider = "Local File", + ProviderType = MusicType.Local, + Query = query, + Thumbnail = "https://cdn.discordapp.com/attachments/155726317222887425/261850914783100928/1482522077_music.png", + }); + } + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs new file mode 100644 index 00000000..06f9ca0f --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs @@ -0,0 +1,138 @@ +using NadekoBot.Core.Services.Database.Models; +using NLog; +using System; +using System.Net.Http; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies +{ + public class RadioResolveStrategy : IResolveStrategy + { + private readonly Regex plsRegex = new Regex("File1=(?.*?)\\n", RegexOptions.Compiled); + private readonly Regex m3uRegex = new Regex("(?^[^#].*)", RegexOptions.Compiled | RegexOptions.Multiline); + private readonly Regex asxRegex = new Regex(".*?)\"", RegexOptions.Compiled); + private readonly Regex xspfRegex = new Regex("(?.*?)", RegexOptions.Compiled); + private readonly Logger _log; + + public RadioResolveStrategy() + { + _log = LogManager.GetCurrentClassLogger(); + } + + public async Task ResolveSong(string query) + { + if (IsRadioLink(query)) + query = await HandleStreamContainers(query); + + return new SongInfo + { + Uri = () => Task.FromResult(query), + Title = query, + Provider = "Radio Stream", + ProviderType = MusicType.Radio, + Query = query, + TotalTime = TimeSpan.MaxValue, + Thumbnail = "https://cdn.discordapp.com/attachments/155726317222887425/261850925063340032/1482522097_radio.png", + }; + } + + public static bool IsRadioLink(string query) => + (query.StartsWith("http") || + query.StartsWith("ww")) + && + (query.Contains(".pls") || + query.Contains(".m3u") || + query.Contains(".asx") || + query.Contains(".xspf")); + + private async Task HandleStreamContainers(string query) + { + string file = null; + try + { + using (var http = new HttpClient()) + { + file = await http.GetStringAsync(query).ConfigureAwait(false); + } + } + catch + { + return query; + } + if (query.Contains(".pls")) + { + //File1=http://armitunes.com:8000/ + //Regex.Match(query) + try + { + var m = plsRegex.Match(file); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); + } + catch + { + _log.Warn($"Failed reading .pls:\n{file}"); + return null; + } + } + if (query.Contains(".m3u")) + { + /* +# This is a comment + C:\xxx4xx\xxxxxx3x\xx2xxxx\xx.mp3 + C:\xxx5xx\x6xxxxxx\x7xxxxx\xx.mp3 + */ + try + { + var m = m3uRegex.Match(file); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); + } + catch + { + _log.Warn($"Failed reading .m3u:\n{file}"); + return null; + } + + } + if (query.Contains(".asx")) + { + // + try + { + var m = asxRegex.Match(file); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); + } + catch + { + _log.Warn($"Failed reading .asx:\n{file}"); + return null; + } + } + if (query.Contains(".xspf")) + { + /* + + + + file:///mp3s/song_1.mp3 + */ + try + { + var m = xspfRegex.Match(file); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); + } + catch + { + _log.Warn($"Failed reading .xspf:\n{file}"); + return null; + } + } + + return query; + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs new file mode 100644 index 00000000..ae786e79 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs @@ -0,0 +1,27 @@ +using NadekoBot.Modules.Music.Extensions; +using NadekoBot.Core.Services.Impl; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies +{ + public class SoundcloudResolveStrategy : IResolveStrategy + { + private readonly SoundCloudApiService _sc; + + public SoundcloudResolveStrategy(SoundCloudApiService sc) + { + _sc = sc; + } + + public async Task ResolveSong(string query) + { + var svideo = !_sc.IsSoundCloudLink(query) ? + await _sc.GetVideoByQueryAsync(query).ConfigureAwait(false) : + await _sc.ResolveVideoAsync(query).ConfigureAwait(false); + + if (svideo == null) + return null; + return await svideo.GetSongInfo(); + } + } +} diff --git a/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs new file mode 100644 index 00000000..1443a695 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs @@ -0,0 +1,69 @@ +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; +using NLog; +using System; +using System.Globalization; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies +{ + public class YoutubeResolveStrategy : IResolveStrategy + { + private readonly Logger _log; + + public YoutubeResolveStrategy() + { + _log = LogManager.GetCurrentClassLogger(); + } + + public async Task ResolveSong(string query) + { + _log.Info("Getting link"); + string[] data; + try + { + using (var ytdl = new YtdlOperation()) + { + data = (await ytdl.GetDataAsync(query)).Split('\n'); + } + if (data.Length < 6) + { + _log.Info("No song found. Data less than 6"); + return null; + } + TimeSpan time; + if (!TimeSpan.TryParseExact(data[4], new[] { "ss", "m\\:ss", "mm\\:ss", "h\\:mm\\:ss", "hh\\:mm\\:ss", "hhh\\:mm\\:ss" }, CultureInfo.InvariantCulture, out time)) + time = TimeSpan.FromHours(24); + + return new SongInfo() + { + Title = data[0], + VideoId = data[1], + Uri = async () => + { + using (var ytdl = new YtdlOperation()) + { + data = (await ytdl.GetDataAsync(query)).Split('\n'); + } + if (data.Length < 6) + { + _log.Info("No song found. Data less than 6"); + return null; + } + return data[2]; + }, + Thumbnail = data[3], + TotalTime = time, + Provider = "YouTube", + ProviderType = MusicType.YouTube, + Query = "https://youtube.com/watch?v=" + data[1], + }; + } + catch (Exception ex) + { + _log.Warn(ex); + return null; + } + } + } +} diff --git a/NadekoBot.Core/Modules/Music/Extensions/Extensions.cs b/NadekoBot.Core/Modules/Music/Extensions/Extensions.cs new file mode 100644 index 00000000..1acd66fe --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Extensions/Extensions.cs @@ -0,0 +1,23 @@ +using NadekoBot.Modules.Music.Common; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; +using System; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Music.Extensions +{ + public static class Extensions + { + public static Task GetSongInfo(this SoundCloudVideo svideo) => + Task.FromResult(new SongInfo + { + Title = svideo.FullName, + Provider = "SoundCloud", + Uri = () => svideo.StreamLink(), + ProviderType = MusicType.Soundcloud, + Query = svideo.TrackLink, + Thumbnail = svideo.artwork_url, + TotalTime = TimeSpan.FromMilliseconds(svideo.Duration) + }); + } +} diff --git a/NadekoBot.Core/Modules/Music/Music.cs b/NadekoBot.Core/Modules/Music/Music.cs new file mode 100644 index 00000000..bb5f58bc --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Music.cs @@ -0,0 +1,901 @@ +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Core.Services; +using Discord; +using System.Threading.Tasks; +using System; +using System.Linq; +using NadekoBot.Extensions; +using System.Collections.Generic; +using NadekoBot.Core.Services.Database.Models; +using System.IO; +using System.Net.Http; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using NadekoBot.Common.Collections; +using Newtonsoft.Json.Linq; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Modules.Music.Services; +using NadekoBot.Modules.Music.Common.Exceptions; +using NadekoBot.Modules.Music.Common; +using NadekoBot.Modules.Music.Extensions; + +namespace NadekoBot.Modules.Music +{ + [NoPublicBot] + public class Music : NadekoTopLevelModule + { + private readonly DiscordSocketClient _client; + private readonly IBotCredentials _creds; + private readonly IGoogleApiService _google; + private readonly DbService _db; + + public Music(DiscordSocketClient client, + IBotCredentials creds, + IGoogleApiService google, + DbService db) + { + _client = client; + _creds = creds; + _google = google; + _db = db; + } + + //todo 50 changing server region is bugged again + //private Task Client_UserVoiceStateUpdated(SocketUser iusr, SocketVoiceState oldState, SocketVoiceState newState) + //{ + // var t = Task.Run(() => + // { + // var usr = iusr as SocketGuildUser; + // if (usr == null || + // oldState.VoiceChannel == newState.VoiceChannel) + // return; + + // var player = _music.GetPlayerOrDefault(usr.Guild.Id); + + // if (player == null) + // return; + + // try + // { + // //if bot moved + // if ((player.VoiceChannel == oldState.VoiceChannel) && + // usr.Id == _client.CurrentUser.Id) + // { + // //if (player.Paused && newState.VoiceChannel.Users.Count > 1) //unpause if there are people in the new channel + // // player.TogglePause(); + // //else if (!player.Paused && newState.VoiceChannel.Users.Count <= 1) // pause if there are no users in the new channel + // // player.TogglePause(); + + // // player.SetVoiceChannel(newState.VoiceChannel); + // return; + // } + + // ////if some other user moved + // //if ((player.VoiceChannel == newState.VoiceChannel && //if joined first, and player paused, unpause + // // player.Paused && + // // newState.VoiceChannel.Users.Count >= 2) || // keep in mind bot is in the channel (+1) + // // (player.VoiceChannel == oldState.VoiceChannel && // if left last, and player unpaused, pause + // // !player.Paused && + // // oldState.VoiceChannel.Users.Count == 1)) + // //{ + // // player.TogglePause(); + // // return; + // //} + // } + // catch + // { + // // ignored + // } + // }); + // return Task.CompletedTask; + //} + + private async Task InternalQueue(MusicPlayer mp, SongInfo songInfo, bool silent, bool queueFirst = false) + { + if (songInfo == null) + { + if(!silent) + await ReplyErrorLocalized("song_not_found").ConfigureAwait(false); + return; + } + + int index; + try + { + index = queueFirst + ? mp.EnqueueNext(songInfo) + : mp.Enqueue(songInfo); + } + catch (QueueFullException) + { + await ReplyErrorLocalized("queue_full", mp.MaxQueueSize).ConfigureAwait(false); + throw; + } + if (index != -1) + { + if (!silent) + { + try + { + var embed = new EmbedBuilder().WithOkColor() + .WithAuthor(eab => eab.WithName(GetText("queued_song") + " #" + (index + 1)).WithMusicIcon()) + .WithDescription($"{songInfo.PrettyName}\n{GetText("queue")} ") + .WithFooter(ef => ef.WithText(songInfo.PrettyProvider)); + + if (Uri.IsWellFormedUriString(songInfo.Thumbnail, UriKind.Absolute)) + embed.WithThumbnailUrl(songInfo.Thumbnail); + + var queuedMessage = await mp.OutputTextChannel.EmbedAsync(embed).ConfigureAwait(false); + if (mp.Stopped) + { + (await ReplyErrorLocalized("queue_stopped", Format.Code(Prefix + "play")).ConfigureAwait(false)).DeleteAfter(10); + } + queuedMessage?.DeleteAfter(10); + } + catch + { + // ignored + } + } + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Play([Remainder] string query = null) + { + var mp = await _service.GetOrCreatePlayer(Context); + if (string.IsNullOrWhiteSpace(query)) + { + await Next(); + } + else if (int.TryParse(query, out var index)) + if (index >= 1) + mp.SetIndex(index - 1); + else + return; + else + { + try + { + await Queue(query); + } + catch { } + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Queue([Remainder] string query) + { + var mp = await _service.GetOrCreatePlayer(Context); + var songInfo = await _service.ResolveSong(query, Context.User.ToString()); + try { await InternalQueue(mp, songInfo, false); } catch (QueueFullException) { return; } + if ((await Context.Guild.GetCurrentUserAsync()).GetPermissions((IGuildChannel)Context.Channel).ManageMessages) + { + Context.Message.DeleteAfter(10); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task QueueNext([Remainder] string query) + { + var mp = await _service.GetOrCreatePlayer(Context); + var songInfo = await _service.ResolveSong(query, Context.User.ToString()); + try { await InternalQueue(mp, songInfo, false, true); } catch (QueueFullException) { return; } + if ((await Context.Guild.GetCurrentUserAsync()).GetPermissions((IGuildChannel)Context.Channel).ManageMessages) + { + Context.Message.DeleteAfter(10); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task QueueSearch([Remainder] string query) + { + var videos = (await _google.GetVideoInfosByKeywordAsync(query, 5)) + .ToArray(); + + if (!videos.Any()) + { + await ReplyErrorLocalized("song_not_found").ConfigureAwait(false); + return; + } + + var msg = await Context.Channel.SendConfirmAsync(string.Join("\n", videos.Select((x, i) => $"`{i + 1}.`\n\t{Format.Bold(x.Name)}\n\t{x.Url}"))); + + try + { + var input = await GetUserInputAsync(Context.User.Id, Context.Channel.Id); + if (input == null + || !int.TryParse(input, out var index) + || (index -= 1) < 0 + || index >= videos.Length) + { + try { await msg.DeleteAsync().ConfigureAwait(false); } catch { } + return; + } + + query = videos[index].Url; + + await Queue(query).ConfigureAwait(false); + } + finally + { + try { await msg.DeleteAsync().ConfigureAwait(false); } catch { } + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task ListQueue(int page = 0) + { + var mp = await _service.GetOrCreatePlayer(Context); + var (current, songs) = mp.QueueArray(); + + if (!songs.Any()) + { + await ReplyErrorLocalized("no_player").ConfigureAwait(false); + return; + } + + if (--page < -1) + return; + + try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); } catch { } + + const int itemsPerPage = 10; + + if (page == -1) + page = current / itemsPerPage; + + //if page is 0 (-1 after this decrement) that means default to the page current song is playing from + var total = mp.TotalPlaytime; + var totalStr = total == TimeSpan.MaxValue ? "∞" : GetText("time_format", + (int)total.TotalHours, + total.Minutes, + total.Seconds); + var maxPlaytime = mp.MaxPlaytimeSeconds; + var lastPage = songs.Length / itemsPerPage; + Func printAction = curPage => + { + var startAt = itemsPerPage * curPage; + var number = 0 + startAt; + var desc = string.Join("\n", songs + .Skip(startAt) + .Take(itemsPerPage) + .Select(v => + { + if(number++ == current) + return $"**⇒**`{number}.` {v.PrettyFullName}"; + else + return $"`{number}.` {v.PrettyFullName}"; + })); + + desc = $"`🔊` {songs[current].PrettyFullName}\n\n" + desc; + + var add = ""; + if (mp.Stopped) + add += Format.Bold(GetText("queue_stopped", Format.Code(Prefix + "play"))) + "\n"; + var mps = mp.MaxPlaytimeSeconds; + if (mps > 0) + add += Format.Bold(GetText("song_skips_after", TimeSpan.FromSeconds(mps).ToString("HH\\:mm\\:ss"))) + "\n"; + if (mp.RepeatCurrentSong) + add += "🔂 " + GetText("repeating_cur_song") + "\n"; + else if (mp.Shuffle) + add += "🔀 " + GetText("shuffling_playlist") + "\n"; + else + { + if (mp.Autoplay) + add += "↪ " + GetText("autoplaying") + "\n"; + if (mp.FairPlay && !mp.Autoplay) + add += " " + GetText("fairplay") + "\n"; + else if (mp.RepeatPlaylist) + add += "🔁 " + GetText("repeating_playlist") + "\n"; + } + + if (!string.IsNullOrWhiteSpace(add)) + desc = add + "\n" + desc; + + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName(GetText("player_queue", curPage + 1, lastPage + 1)) + .WithMusicIcon()) + .WithDescription(desc) + .WithFooter(ef => ef.WithText($"{mp.PrettyVolume} | {songs.Length} " + + $"{("tracks".SnPl(songs.Length))} | {totalStr}")) + .WithOkColor(); + + return embed; + }; + await Context.Channel.SendPaginatedConfirmAsync(_client, page, printAction, lastPage, false).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Next(int skipCount = 1) + { + if (skipCount < 1) + return; + + var mp = await _service.GetOrCreatePlayer(Context); + + mp.Next(skipCount); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Stop() + { + var mp = await _service.GetOrCreatePlayer(Context); + mp.Stop(); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Destroy() + { + await _service.DestroyPlayer(Context.Guild.Id); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Pause() + { + var mp = await _service.GetOrCreatePlayer(Context); + mp.TogglePause(); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Volume(int val) + { + var mp = await _service.GetOrCreatePlayer(Context); + if (val < 0 || val > 100) + { + await ReplyErrorLocalized("volume_input_invalid").ConfigureAwait(false); + return; + } + mp.SetVolume(val); + await ReplyConfirmLocalized("volume_set", val).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Defvol([Remainder] int val) + { + if (val < 0 || val > 100) + { + await ReplyErrorLocalized("volume_input_invalid").ConfigureAwait(false); + return; + } + using (var uow = _db.UnitOfWork) + { + uow.GuildConfigs.For(Context.Guild.Id, set => set).DefaultMusicVolume = val / 100.0f; + uow.Complete(); + } + await ReplyConfirmLocalized("defvol_set", val).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public async Task SongRemove(int index) + { + if (index < 1) + { + await ReplyErrorLocalized("removed_song_error").ConfigureAwait(false); + return; + } + var mp = await _service.GetOrCreatePlayer(Context); + try + { + var song = mp.RemoveAt(index - 1); + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName(GetText("removed_song") + " #" + (index)).WithMusicIcon()) + .WithDescription(song.PrettyName) + .WithFooter(ef => ef.WithText(song.PrettyInfo)) + .WithErrorColor(); + + await mp.OutputTextChannel.EmbedAsync(embed).ConfigureAwait(false); + } + catch (ArgumentOutOfRangeException) + { + await ReplyErrorLocalized("removed_song_error").ConfigureAwait(false); + } + } + + public enum All { All } + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(0)] + public async Task SongRemove(All all) + { + var mp = _service.GetPlayerOrDefault(Context.Guild.Id); + if (mp == null) + return; + mp.Stop(true); + await ReplyConfirmLocalized("queue_cleared").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Playlists([Remainder] int num = 1) + { + if (num <= 0) + return; + + List playlists; + + using (var uow = _db.UnitOfWork) + { + playlists = uow.MusicPlaylists.GetPlaylistsOnPage(num); + } + + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName(GetText("playlists_page", num)).WithMusicIcon()) + .WithDescription(string.Join("\n", playlists.Select(r => + GetText("playlists", r.Id, r.Name, r.Author, r.Songs.Count)))) + .WithOkColor(); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task DeletePlaylist([Remainder] int id) + { + var success = false; + try + { + using (var uow = _db.UnitOfWork) + { + var pl = uow.MusicPlaylists.Get(id); + + if (pl != null) + { + if (_creds.IsOwner(Context.User) || pl.AuthorId == Context.User.Id) + { + uow.MusicPlaylists.Remove(pl); + await uow.CompleteAsync().ConfigureAwait(false); + success = true; + } + } + } + + if (!success) + await ReplyErrorLocalized("playlist_delete_fail").ConfigureAwait(false); + else + await ReplyConfirmLocalized("playlist_deleted").ConfigureAwait(false); + } + catch (Exception ex) + { + _log.Warn(ex); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Save([Remainder] string name) + { + var mp = await _service.GetOrCreatePlayer(Context); + + var songs = mp.QueueArray().Songs + .Select(s => new PlaylistSong() + { + Provider = s.Provider, + ProviderType = s.ProviderType, + Title = s.Title, + Query = s.Query, + }).ToList(); + + MusicPlaylist playlist; + using (var uow = _db.UnitOfWork) + { + playlist = new MusicPlaylist + { + Name = name, + Author = Context.User.Username, + AuthorId = Context.User.Id, + Songs = songs.ToList(), + }; + uow.MusicPlaylists.Add(playlist); + await uow.CompleteAsync().ConfigureAwait(false); + } + + await Context.Channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithTitle(GetText("playlist_saved")) + .AddField(efb => efb.WithName(GetText("name")).WithValue(name)) + .AddField(efb => efb.WithName(GetText("id")).WithValue(playlist.Id.ToString()))); + } + + private static readonly ConcurrentHashSet PlaylistLoadBlacklist = new ConcurrentHashSet(); + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Load([Remainder] int id) + { + if (!PlaylistLoadBlacklist.Add(Context.Guild.Id)) + return; + try + { + var mp = await _service.GetOrCreatePlayer(Context); + MusicPlaylist mpl; + using (var uow = _db.UnitOfWork) + { + mpl = uow.MusicPlaylists.GetWithSongs(id); + } + + if (mpl == null) + { + await ReplyErrorLocalized("playlist_id_not_found").ConfigureAwait(false); + return; + } + IUserMessage msg = null; + try { msg = await Context.Channel.SendMessageAsync(GetText("attempting_to_queue", Format.Bold(mpl.Songs.Count.ToString()))).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + foreach (var item in mpl.Songs) + { + try + { + await Task.Yield(); + + await Task.WhenAll(Task.Delay(1000), InternalQueue(mp, await _service.ResolveSong(item.Query, Context.User.ToString(), item.ProviderType), true)).ConfigureAwait(false); + } + catch (SongNotFoundException) { } + catch { break; } + } + if (msg != null) + await msg.ModifyAsync(m => m.Content = GetText("playlist_queue_complete")).ConfigureAwait(false); + } + finally + { + PlaylistLoadBlacklist.TryRemove(Context.Guild.Id); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Fairplay() + { + var mp = await _service.GetOrCreatePlayer(Context); + var val = mp.FairPlay = !mp.FairPlay; + + if (val) + { + await ReplyConfirmLocalized("fp_enabled").ConfigureAwait(false); + } + else + { + await ReplyConfirmLocalized("fp_disabled").ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task SongAutoDelete() + { + var mp = await _service.GetOrCreatePlayer(Context); + var val = mp.AutoDelete = !mp.AutoDelete; + + if (val) + { + await ReplyConfirmLocalized("sad_enabled").ConfigureAwait(false); + } + else + { + await ReplyConfirmLocalized("sad_disabled").ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task SoundCloudQueue([Remainder] string query) + { + var mp = await _service.GetOrCreatePlayer(Context); + var song = await _service.ResolveSong(query, Context.User.ToString(), MusicType.Soundcloud); + await InternalQueue(mp, song, false).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task SoundCloudPl([Remainder] string pl) + { + pl = pl?.Trim(); + + if (string.IsNullOrWhiteSpace(pl)) + return; + + var mp = await _service.GetOrCreatePlayer(Context); + + using (var http = new HttpClient()) + { + var scvids = JObject.Parse(await http.GetStringAsync($"https://scapi.nadekobot.me/resolve?url={pl}").ConfigureAwait(false))["tracks"].ToObject(); + IUserMessage msg = null; + try { msg = await Context.Channel.SendMessageAsync(GetText("attempting_to_queue", Format.Bold(scvids.Length.ToString()))).ConfigureAwait(false); } catch { } + foreach (var svideo in scvids) + { + try + { + await Task.Yield(); + var sinfo = await svideo.GetSongInfo(); + sinfo.QueuerName = Context.User.ToString(); + await InternalQueue(mp, sinfo, true); + } + catch (Exception ex) + { + _log.Warn(ex); + break; + } + } + if (msg != null) + await msg.ModifyAsync(m => m.Content = GetText("playlist_queue_complete")).ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task NowPlaying() + { + var mp = await _service.GetOrCreatePlayer(Context); + var (_, currentSong) = mp.Current; + if (currentSong == null) + return; + try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); } catch { } + + var embed = new EmbedBuilder().WithOkColor() + .WithAuthor(eab => eab.WithName(GetText("now_playing")).WithMusicIcon()) + .WithDescription(currentSong.PrettyName) + .WithThumbnailUrl(currentSong.Thumbnail) + .WithFooter(ef => ef.WithText(mp.PrettyVolume + " | " + mp.PrettyFullTime + $" | {currentSong.PrettyProvider} | {currentSong.QueuerName}")); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task ShufflePlaylist() + { + var mp = await _service.GetOrCreatePlayer(Context); + var val = mp.ToggleShuffle(); + if(val) + await ReplyConfirmLocalized("songs_shuffle_enable").ConfigureAwait(false); + else + await ReplyConfirmLocalized("songs_shuffle_disable").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Playlist([Remainder] string playlist) + { + if (string.IsNullOrWhiteSpace(playlist)) + return; + + var mp = await _service.GetOrCreatePlayer(Context); + + var plId = (await _google.GetPlaylistIdsByKeywordsAsync(playlist).ConfigureAwait(false)).FirstOrDefault(); + if (plId == null) + { + await ReplyErrorLocalized("no_search_results").ConfigureAwait(false); + return; + } + var ids = await _google.GetPlaylistTracksAsync(plId, 500).ConfigureAwait(false); + if (!ids.Any()) + { + await ReplyErrorLocalized("no_search_results").ConfigureAwait(false); + return; + } + var count = ids.Count(); + var msg = await Context.Channel.SendMessageAsync("🎵 " + GetText("attempting_to_queue", + Format.Bold(count.ToString()))).ConfigureAwait(false); + + foreach (var song in ids) + { + try + { + if (mp.Exited) + return; + + await Task.WhenAll(Task.Delay(150), InternalQueue(mp, await _service.ResolveSong(song, Context.User.ToString(), MusicType.YouTube), true)); + } + catch (SongNotFoundException) { } + catch { break; } + } + + await msg.ModifyAsync(m => m.Content = "✅ " + Format.Bold(GetText("playlist_queue_complete"))).ConfigureAwait(false); + } + + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Radio(string radioLink) + { + var mp = await _service.GetOrCreatePlayer(Context); + var song = await _service.ResolveSong(radioLink, Context.User.ToString(), MusicType.Radio); + await InternalQueue(mp, song, false).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Local([Remainder] string path) + { + var mp = await _service.GetOrCreatePlayer(Context); + var song = await _service.ResolveSong(path, Context.User.ToString(), MusicType.Local); + await InternalQueue(mp, song, false).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task LocalPl([Remainder] string dirPath) + { + if (string.IsNullOrWhiteSpace(dirPath)) + return; + + var mp = await _service.GetOrCreatePlayer(Context); + + DirectoryInfo dir; + try { dir = new DirectoryInfo(dirPath); } catch { return; } + var fileEnum = dir.GetFiles("*", SearchOption.AllDirectories) + .Where(x => !x.Attributes.HasFlag(FileAttributes.Hidden | FileAttributes.System) && x.Extension != ".jpg" && x.Extension != ".png"); + foreach (var file in fileEnum) + { + try + { + await Task.Yield(); + var song = await _service.ResolveSong(file.FullName, Context.User.ToString(), MusicType.Local); + await InternalQueue(mp, song, true).ConfigureAwait(false); + } + catch (QueueFullException) + { + break; + } + catch (Exception ex) + { + _log.Warn(ex); + break; + } + } + await ReplyConfirmLocalized("dir_queue_complete").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Move() + { + var vch = ((IGuildUser)Context.User).VoiceChannel; + + if (vch == null) + return; + + var mp = _service.GetPlayerOrDefault(Context.Guild.Id); + + if (mp == null) + return; + + await mp.SetVoiceChannel(vch); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task MoveSong([Remainder] string fromto) + { + if (string.IsNullOrWhiteSpace(fromto)) + return; + + MusicPlayer mp = _service.GetPlayerOrDefault(Context.Guild.Id); + if (mp == null) + return; + + fromto = fromto?.Trim(); + var fromtoArr = fromto.Split('>'); + + SongInfo s; + if (fromtoArr.Length != 2 || !int.TryParse(fromtoArr[0], out var n1) || + !int.TryParse(fromtoArr[1], out var n2) || n1 < 1 || n2 < 1 || n1 == n2 + || (s = mp.MoveSong(--n1, --n2)) == null) + { + await ReplyConfirmLocalized("invalid_input").ConfigureAwait(false); + return; + } + + var embed = new EmbedBuilder() + .WithTitle(s.Title.TrimTo(65)) + .WithUrl(s.SongUrl) + .WithAuthor(eab => eab.WithName(GetText("song_moved")).WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .AddField(fb => fb.WithName(GetText("from_position")).WithValue($"#{n1 + 1}").WithIsInline(true)) + .AddField(fb => fb.WithName(GetText("to_position")).WithValue($"#{n2 + 1}").WithIsInline(true)) + .WithColor(NadekoBot.OkColor); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task SetMaxQueue(uint size = 0) + { + if (size < 0) + return; + var mp = await _service.GetOrCreatePlayer(Context); + + mp.MaxQueueSize = size; + + if (size == 0) + await ReplyConfirmLocalized("max_queue_unlimited").ConfigureAwait(false); + else + await ReplyConfirmLocalized("max_queue_x", size).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task SetMaxPlaytime(uint seconds) + { + if (seconds < 15 && seconds != 0) + return; + + var mp = await _service.GetOrCreatePlayer(Context); + mp.MaxPlaytimeSeconds = seconds; + if (seconds == 0) + await ReplyConfirmLocalized("max_playtime_none").ConfigureAwait(false); + else + await ReplyConfirmLocalized("max_playtime_set", seconds).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task ReptCurSong() + { + var mp = await _service.GetOrCreatePlayer(Context); + var (_, currentSong) = mp.Current; + if (currentSong == null) + return; + var currentValue = mp.ToggleRepeatSong(); + + if (currentValue) + await Context.Channel.EmbedAsync(new EmbedBuilder() + .WithOkColor() + .WithAuthor(eab => eab.WithMusicIcon().WithName("🔂 " + GetText("repeating_track"))) + .WithDescription(currentSong.PrettyName) + .WithFooter(ef => ef.WithText(currentSong.PrettyInfo))).ConfigureAwait(false); + else + await Context.Channel.SendConfirmAsync("🔂 " + GetText("repeating_track_stopped")) + .ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task RepeatPl() + { + var mp = await _service.GetOrCreatePlayer(Context); + var currentValue = mp.ToggleRepeatPlaylist(); + if (currentValue) + await ReplyConfirmLocalized("rpl_enabled").ConfigureAwait(false); + else + await ReplyConfirmLocalized("rpl_disabled").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Autoplay() + { + var mp = await _service.GetOrCreatePlayer(Context); + + if (!mp.ToggleAutoplay()) + await ReplyConfirmLocalized("autoplay_disabled").ConfigureAwait(false); + else + await ReplyConfirmLocalized("autoplay_enabled").ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.ManageMessages)] + public async Task SetMusicChannel() + { + var mp = await _service.GetOrCreatePlayer(Context); + + mp.OutputTextChannel = (ITextChannel)Context.Channel; + + await ReplyConfirmLocalized("set_music_channel").ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Music/Services/MusicService.cs b/NadekoBot.Core/Modules/Music/Services/MusicService.cs new file mode 100644 index 00000000..1e127d98 --- /dev/null +++ b/NadekoBot.Core/Modules/Music/Services/MusicService.cs @@ -0,0 +1,239 @@ +using System.Collections.Concurrent; +using System.Linq; +using System.Threading.Tasks; +using Discord; +using NadekoBot.Extensions; +using NadekoBot.Core.Services.Database.Models; +using NLog; +using System.IO; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Modules.Music.Common; +using NadekoBot.Modules.Music.Common.Exceptions; +using NadekoBot.Modules.Music.Common.SongResolver; + +namespace NadekoBot.Modules.Music.Services +{ + public class MusicService : INService, IUnloadableService + { + public const string MusicDataPath = "data/musicdata"; + + private readonly IGoogleApiService _google; + private readonly NadekoStrings _strings; + private readonly ILocalization _localization; + private readonly DbService _db; + private readonly Logger _log; + private readonly SoundCloudApiService _sc; + private readonly IBotCredentials _creds; + private readonly ConcurrentDictionary _defaultVolumes; + private readonly DiscordSocketClient _client; + + public ConcurrentDictionary MusicPlayers { get; } = new ConcurrentDictionary(); + + public MusicService(DiscordSocketClient client, IGoogleApiService google, + NadekoStrings strings, ILocalization localization, DbService db, + SoundCloudApiService sc, IBotCredentials creds, NadekoBot bot) + { + _client = client; + _google = google; + _strings = strings; + _localization = localization; + _db = db; + _sc = sc; + _creds = creds; + _log = LogManager.GetCurrentClassLogger(); + + _client.LeftGuild += _client_LeftGuild; + + try { Directory.Delete(MusicDataPath, true); } catch { } + + _defaultVolumes = new ConcurrentDictionary( + bot.AllGuildConfigs + .ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); + + Directory.CreateDirectory(MusicDataPath); + } + + public Task Unload() + { + _client.LeftGuild -= _client_LeftGuild; + return Task.CompletedTask; + } + + private Task _client_LeftGuild(SocketGuild arg) + { + var t = DestroyPlayer(arg.Id); + return Task.CompletedTask; + } + + public float GetDefaultVolume(ulong guildId) + { + return _defaultVolumes.GetOrAdd(guildId, (id) => + { + using (var uow = _db.UnitOfWork) + { + return uow.GuildConfigs.For(guildId, set => set).DefaultMusicVolume; + } + }); + } + + public Task GetOrCreatePlayer(ICommandContext context) + { + var gUsr = (IGuildUser)context.User; + var txtCh = (ITextChannel)context.Channel; + var vCh = gUsr.VoiceChannel; + return GetOrCreatePlayer(context.Guild.Id, vCh, txtCh); + } + + public async Task GetOrCreatePlayer(ulong guildId, IVoiceChannel voiceCh, ITextChannel textCh) + { + string GetText(string text, params object[] replacements) => + _strings.GetText(text, _localization.GetCultureInfo(textCh.Guild), "Music".ToLowerInvariant(), replacements); + + _log.Info("Checks"); + if (voiceCh == null || voiceCh.Guild != textCh.Guild) + { + if (textCh != null) + { + await textCh.SendErrorAsync(GetText("must_be_in_voice")).ConfigureAwait(false); + } + throw new NotInVoiceChannelException(); + } + _log.Info("Get or add"); + return MusicPlayers.GetOrAdd(guildId, _ => + { + _log.Info("Getting default volume"); + var vol = GetDefaultVolume(guildId); + _log.Info("Creating musicplayer instance"); + var mp = new MusicPlayer(this, _google, voiceCh, textCh, vol); + + IUserMessage playingMessage = null; + IUserMessage lastFinishedMessage = null; + + _log.Info("Subscribing"); + mp.OnCompleted += async (s, song) => + { + try + { + lastFinishedMessage?.DeleteAfter(0); + + try + { + lastFinishedMessage = await mp.OutputTextChannel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithAuthor(eab => eab.WithName(GetText("finished_song")).WithMusicIcon()) + .WithDescription(song.PrettyName) + .WithFooter(ef => ef.WithText(song.PrettyInfo))) + .ConfigureAwait(false); + } + catch + { + // ignored + } + } + catch + { + // ignored + } + }; + mp.OnStarted += async (player, song) => + { + //try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); } + //catch + //{ + // // ignored + //} + var sender = player; + if (sender == null) + return; + try + { + playingMessage?.DeleteAfter(0); + + playingMessage = await mp.OutputTextChannel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithAuthor(eab => eab.WithName(GetText("playing_song", song.Index + 1)).WithMusicIcon()) + .WithDescription(song.Song.PrettyName) + .WithFooter(ef => ef.WithText(mp.PrettyVolume + " | " + song.Song.PrettyInfo))) + .ConfigureAwait(false); + } + catch + { + // ignored + } + }; + mp.OnPauseChanged += async (player, paused) => + { + try + { + IUserMessage msg; + if (paused) + msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("paused")).ConfigureAwait(false); + else + msg = await mp.OutputTextChannel.SendConfirmAsync(GetText("resumed")).ConfigureAwait(false); + + msg?.DeleteAfter(10); + } + catch + { + // ignored + } + }; + _log.Info("Done creating"); + return mp; + }); + } + + public MusicPlayer GetPlayerOrDefault(ulong guildId) + { + if (MusicPlayers.TryGetValue(guildId, out var mp)) + return mp; + else + return null; + } + + public async Task TryQueueRelatedSongAsync(SongInfo song, ITextChannel txtCh, IVoiceChannel vch) + { + var related = (await _google.GetRelatedVideosAsync(song.VideoId, 4)).ToArray(); + if (!related.Any()) + return; + + var si = await ResolveSong(related[new NadekoRandom().Next(related.Length)], _client.CurrentUser.ToString(), MusicType.YouTube); + if (si == null) + throw new SongNotFoundException(); + var mp = await GetOrCreatePlayer(txtCh.GuildId, vch, txtCh); + mp.Enqueue(si); + } + + public async Task ResolveSong(string query, string queuerName, MusicType? musicType = null) + { + query.ThrowIfNull(nameof(query)); + + ISongResolverFactory resolverFactory = new SongResolverFactory(_sc); + var strategy = await resolverFactory.GetResolveStrategy(query, musicType); + var sinfo = await strategy.ResolveSong(query); + + if (sinfo == null) + return null; + + sinfo.QueuerName = queuerName; + + return sinfo; + } + + public async Task DestroyAllPlayers() + { + foreach (var key in MusicPlayers.Keys) + { + await DestroyPlayer(key); + } + } + + public async Task DestroyPlayer(ulong id) + { + if (MusicPlayers.TryRemove(id, out var mp)) + await mp.Destroy(); + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs b/NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs new file mode 100644 index 00000000..5d4cfc92 --- /dev/null +++ b/NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs @@ -0,0 +1,5 @@ +using System; + +namespace NadekoBot.Modules.NSFW.Exceptions +{ +} diff --git a/NadekoBot.Core/Modules/Nsfw/NSFW.cs b/NadekoBot.Core/Modules/Nsfw/NSFW.cs new file mode 100644 index 00000000..4b16fb6c --- /dev/null +++ b/NadekoBot.Core/Modules/Nsfw/NSFW.cs @@ -0,0 +1,354 @@ +using Discord; +using Discord.Commands; +using Newtonsoft.Json.Linq; +using System; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Extensions; +using System.Threading; +using NadekoBot.Common; +using NadekoBot.Common.Attributes; +using NadekoBot.Common.Collections; +using NadekoBot.Modules.Searches.Common; +using NadekoBot.Modules.Searches.Services; +using NadekoBot.Modules.NSFW.Exceptions; +using NadekoBot.Modules.Searches.Exceptions; + +namespace NadekoBot.Modules.NSFW +{ + // thanks to halitalf for adding autoboob and autobutt features :D + public class NSFW : NadekoTopLevelModule + { + private static readonly ConcurrentHashSet _hentaiBombBlacklist = new ConcurrentHashSet(); + + private async Task InternalHentai(IMessageChannel channel, string tag, bool noError) + { + var rng = new NadekoRandom(); + var arr = Enum.GetValues(typeof(DapiSearchType)); + var type = (DapiSearchType)arr.GetValue(new NadekoRandom().Next(2, arr.Length)); + ImageCacherObject img; + try + { + img = await _service.DapiSearch(tag, type, Context.Guild?.Id, true).ConfigureAwait(false); + } + catch (TagBlacklistedException) + { + await ReplyErrorLocalized("blacklisted_tag").ConfigureAwait(false); + return; + } + + if (img == null) + { + if (!noError) + await ReplyErrorLocalized("not_found").ConfigureAwait(false); + return; + } + + await channel.EmbedAsync(new EmbedBuilder().WithOkColor() + .WithImageUrl(img.FileUrl) + .WithDescription($"[{GetText("tag")}: {tag}]({img})")) + .ConfigureAwait(false); + } + private async Task InternalBoobs(IMessageChannel Channel) + { + try + { + JToken obj; + obj = JArray.Parse(await _service.Http.GetStringAsync($"http://api.oboobs.ru/boobs/{new NadekoRandom().Next(0, 10330)}").ConfigureAwait(false))[0]; + await Channel.SendMessageAsync($"http://media.oboobs.ru/{obj["preview"]}").ConfigureAwait(false); + } + catch (Exception ex) + { + await Channel.SendErrorAsync(ex.Message).ConfigureAwait(false); + } + } + + private async Task InternalButts(IMessageChannel Channel) + { + try + { + JToken obj; + obj = JArray.Parse(await _service.Http.GetStringAsync($"http://api.obutts.ru/butts/{new NadekoRandom().Next(0, 4335)}").ConfigureAwait(false))[0]; + await Channel.SendMessageAsync($"http://media.obutts.ru/{obj["preview"]}").ConfigureAwait(false); + } + catch (Exception ex) + { + await Channel.SendErrorAsync(ex.Message).ConfigureAwait(false); + } + } + +#if !GLOBAL_NADEKO + [NadekoCommand, Usage, Description, Aliases] + [RequireUserPermission(ChannelPermission.ManageMessages)] + public async Task AutoHentai(int interval = 0, string tags = null) + { + Timer t; + + if (interval == 0) + { + if (!_service.AutoHentaiTimers.TryRemove(Context.Channel.Id, out t)) return; + + t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer + await ReplyConfirmLocalized("stopped").ConfigureAwait(false); + return; + } + + if (interval < 20) + return; + + var tagsArr = tags?.Split('|'); + + t = new Timer(async (state) => + { + try + { + if (tagsArr == null || tagsArr.Length == 0) + await InternalHentai(Context.Channel, null, true).ConfigureAwait(false); + else + await InternalHentai(Context.Channel, tagsArr[new NadekoRandom().Next(0, tagsArr.Length)], true).ConfigureAwait(false); + } + catch + { + // ignored + } + }, null, interval * 1000, interval * 1000); + + _service.AutoHentaiTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + { + old.Change(Timeout.Infinite, Timeout.Infinite); + return t; + }); + + await ReplyConfirmLocalized("autohentai_started", + interval, + string.Join(", ", tagsArr)).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireUserPermission(ChannelPermission.ManageMessages)] + public async Task AutoBoobs(int interval = 0) + { + Timer t; + + if (interval == 0) + { + if (!_service.AutoBoobTimers.TryRemove(Context.Channel.Id, out t)) return; + + t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer + await ReplyConfirmLocalized("stopped").ConfigureAwait(false); + return; + } + + if (interval < 20) + return; + + t = new Timer(async (state) => + { + try + { + await InternalBoobs(Context.Channel).ConfigureAwait(false); + } + catch + { + // ignored + } + }, null, interval * 1000, interval * 1000); + + _service.AutoBoobTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + { + old.Change(Timeout.Infinite, Timeout.Infinite); + return t; + }); + + await ReplyConfirmLocalized("started", interval).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireUserPermission(ChannelPermission.ManageMessages)] + public async Task AutoButts(int interval = 0) + { + Timer t; + + if (interval == 0) + { + if (!_service.AutoButtTimers.TryRemove(Context.Channel.Id, out t)) return; + + t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer + await ReplyConfirmLocalized("stopped").ConfigureAwait(false); + return; + } + + if (interval < 20) + return; + + t = new Timer(async (state) => + { + try + { + await InternalButts(Context.Channel).ConfigureAwait(false); + } + catch + { + // ignored + } + }, null, interval * 1000, interval * 1000); + + _service.AutoButtTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + { + old.Change(Timeout.Infinite, Timeout.Infinite); + return t; + }); + + await ReplyConfirmLocalized("started", interval).ConfigureAwait(false); + } +#endif + + [NadekoCommand, Usage, Description, Aliases] + public Task Hentai([Remainder] string tag = null) => + InternalHentai(Context.Channel, tag, false); + + [NadekoCommand, Usage, Description, Aliases] + public async Task HentaiBomb([Remainder] string tag = null) + { + if (!_hentaiBombBlacklist.Add(Context.Guild?.Id ?? Context.User.Id)) + return; + try + { + var images = await Task.WhenAll(_service.DapiSearch(tag, DapiSearchType.Gelbooru, Context.Guild?.Id, true), + _service.DapiSearch(tag, DapiSearchType.Danbooru, Context.Guild?.Id, true), + _service.DapiSearch(tag, DapiSearchType.Konachan, Context.Guild?.Id, true), + _service.DapiSearch(tag, DapiSearchType.Yandere, Context.Guild?.Id, true)).ConfigureAwait(false); + + var linksEnum = images?.Where(l => l != null).ToArray(); + if (images == null || !linksEnum.Any()) + { + await ReplyErrorLocalized("not_found").ConfigureAwait(false); + return; + } + + await Context.Channel.SendMessageAsync(string.Join("\n\n", linksEnum.Select(x => x.FileUrl))).ConfigureAwait(false); + } + finally + { + _hentaiBombBlacklist.TryRemove(Context.Guild?.Id ?? Context.User.Id); + } + } + + [NadekoCommand, Usage, Description, Aliases] + public Task Yandere([Remainder] string tag = null) + => InternalDapiCommand(tag, DapiSearchType.Yandere, false); + + [NadekoCommand, Usage, Description, Aliases] + public Task Konachan([Remainder] string tag = null) + => InternalDapiCommand(tag, DapiSearchType.Konachan, false); + + [NadekoCommand, Usage, Description, Aliases] + public Task E621([Remainder] string tag = null) + => InternalDapiCommand(tag, DapiSearchType.E621, false); + + [NadekoCommand, Usage, Description, Aliases] + public Task Rule34([Remainder] string tag = null) + => InternalDapiCommand(tag, DapiSearchType.Rule34, false); + + [NadekoCommand, Usage, Description, Aliases] + public Task Danbooru([Remainder] string tag = null) + => InternalDapiCommand(tag, DapiSearchType.Danbooru, false); + + [NadekoCommand, Usage, Description, Aliases] + public Task Gelbooru([Remainder] string tag = null) + => InternalDapiCommand(tag, DapiSearchType.Gelbooru, false); + + [NadekoCommand, Usage, Description, Aliases] + public async Task Boobs() + { + try + { + JToken obj; + obj = JArray.Parse(await _service.Http.GetStringAsync($"http://api.oboobs.ru/boobs/{new NadekoRandom().Next(0, 10330)}").ConfigureAwait(false))[0]; + await Context.Channel.SendMessageAsync($"http://media.oboobs.ru/{obj["preview"]}").ConfigureAwait(false); + } + catch (Exception ex) + { + await Context.Channel.SendErrorAsync(ex.Message).ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + public async Task Butts() + { + try + { + JToken obj; + obj = JArray.Parse(await _service.Http.GetStringAsync($"http://api.obutts.ru/butts/{new NadekoRandom().Next(0, 4335)}").ConfigureAwait(false))[0]; + await Context.Channel.SendMessageAsync($"http://media.obutts.ru/{obj["preview"]}").ConfigureAwait(false); + } + catch (Exception ex) + { + await Context.Channel.SendErrorAsync(ex.Message).ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task NsfwTagBlacklist([Remainder] string tag = null) + { + if (string.IsNullOrWhiteSpace(tag)) + { + var blTags = _service.GetBlacklistedTags(Context.Guild.Id); + await Context.Channel.SendConfirmAsync(GetText("blacklisted_tag_list"), + blTags.Any() + ? string.Join(", ", blTags) + : "-").ConfigureAwait(false); + } + else + { + tag = tag.Trim().ToLowerInvariant(); + var added = _service.ToggleBlacklistedTag(Context.Guild.Id, tag); + + if (added) + await ReplyConfirmLocalized("blacklisted_tag_add", tag).ConfigureAwait(false); + else + await ReplyConfirmLocalized("blacklisted_tag_remove", tag).ConfigureAwait(false); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public Task NsfwClearCache() + { + _service.ClearCache(); + return Context.Channel.SendConfirmAsync("👌"); + } + + public async Task InternalDapiCommand(string tag, DapiSearchType type, bool forceExplicit) + { + ImageCacherObject imgObj; + try + { + imgObj = await _service.DapiSearch(tag, type, Context.Guild?.Id, forceExplicit).ConfigureAwait(false); + } + catch (TagBlacklistedException) + { + await ReplyErrorLocalized("blacklisted_tag").ConfigureAwait(false); + return; + } + + if (imgObj == null) + await ReplyErrorLocalized("not_found").ConfigureAwait(false); + else + { + var embed = new EmbedBuilder().WithOkColor() + .WithDescription($"{Context.User} [{tag ?? "url"}]({imgObj}) ") + .WithFooter(efb => efb.WithText(type.ToString())); + + if (Uri.IsWellFormedUriString(imgObj.FileUrl, UriKind.Absolute)) + embed.WithImageUrl(imgObj.FileUrl); + else + _log.Error($"Image link from {type} is not a proper Url: {imgObj.FileUrl}"); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Pokemon/Common/PokeStats.cs b/NadekoBot.Core/Modules/Pokemon/Common/PokeStats.cs new file mode 100644 index 00000000..eb06a1a6 --- /dev/null +++ b/NadekoBot.Core/Modules/Pokemon/Common/PokeStats.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; + +namespace NadekoBot.Modules.Pokemon.Common +{ + public class PokeStats + { + //Health left + public int Hp { get; set; } = 500; + public int MaxHp { get; } = 500; + //Amount of moves made since last time attacked + public int MovesMade { get; set; } = 0; + //Last people attacked + public List LastAttacked { get; set; } = new List(); + } +} diff --git a/NadekoBot.Core/Modules/Pokemon/Common/PokemonType.cs b/NadekoBot.Core/Modules/Pokemon/Common/PokemonType.cs new file mode 100644 index 00000000..ac83c314 --- /dev/null +++ b/NadekoBot.Core/Modules/Pokemon/Common/PokemonType.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace NadekoBot.Modules.Pokemon.Common +{ + public class PokemonType + { + public PokemonType(string n, string i, string[] m, List multi) + { + Name = n; + Icon = i; + Moves = m; + Multipliers = multi; + } + public string Name { get; set; } + public List Multipliers { get; set; } + public string Icon { get; set; } + public string[] Moves { get; set; } + + public override string ToString() => + Icon + "**" + Name.ToLowerInvariant() + "**" + Icon; + } + public class PokemonMultiplier + { + public PokemonMultiplier(string t, double m) + { + Type = t; + Multiplication = m; + } + public string Type { get; set; } + public double Multiplication { get; set; } + } +} diff --git a/NadekoBot.Core/Modules/Pokemon/Pokemon.cs b/NadekoBot.Core/Modules/Pokemon/Pokemon.cs new file mode 100644 index 00000000..f4d6544a --- /dev/null +++ b/NadekoBot.Core/Modules/Pokemon/Pokemon.cs @@ -0,0 +1,340 @@ +using Discord.Commands; +using NadekoBot.Extensions; +using System.Linq; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using System.Collections.Generic; +using System.Threading.Tasks; +using Discord; +using System; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Pokemon.Common; +using NadekoBot.Modules.Pokemon.Services; + +namespace NadekoBot.Modules.Pokemon +{ + public class Pokemon : NadekoTopLevelModule + { + private readonly DbService _db; + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + + public Pokemon(DbService db, IBotConfigProvider bc, CurrencyService cs) + { + _db = db; + _bc = bc; + _cs = cs; + } + + private int GetDamage(PokemonType usertype, PokemonType targetType) + { + var rng = new Random(); + var damage = rng.Next(40, 60); + foreach (var multiplierObj in usertype.Multipliers) + { + if (multiplierObj.Type != targetType.Name) continue; + damage = (int)(damage * multiplierObj.Multiplication); + } + + return damage; + } + + private PokemonType GetPokeType(ulong id) + { + + Dictionary setTypes; + using (var uow = _db.UnitOfWork) + { + setTypes = uow.PokeGame.GetAll().ToDictionary(x => x.UserId, y => y.type); + } + + if (setTypes.ContainsKey(id)) + { + return StringToPokemonType(setTypes[id]); + } + var count = _service.PokemonTypes.Count; + + var remainder = Math.Abs((int)(id % (ulong)count)); + + return _service.PokemonTypes[remainder]; + } + + private PokemonType StringToPokemonType(string v) + { + var str = v?.ToUpperInvariant(); + var list = _service.PokemonTypes; + foreach (var p in list) + { + if (str == p.Name) + { + return p; + } + } + return null; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Attack(string move, IGuildUser targetUser = null) + { + IGuildUser user = (IGuildUser)Context.User; + + if (string.IsNullOrWhiteSpace(move)) { + return; + } + + if (targetUser == null) + { + await ReplyErrorLocalized("user_not_found").ConfigureAwait(false); + return; + } + if (targetUser == user) + { + await ReplyErrorLocalized("cant_attack_yourself").ConfigureAwait(false); + return; + } + + + // Checking stats first, then move + //Set up the userstats + var userStats = _service.Stats.GetOrAdd(user.Id, new PokeStats()); + + //Check if able to move + //User not able if HP < 0, has made more than 4 attacks + if (userStats.Hp < 0) + { + await ReplyErrorLocalized("you_fainted").ConfigureAwait(false); + return; + } + if (userStats.MovesMade >= 5) + { + await ReplyErrorLocalized("too_many_moves").ConfigureAwait(false); + return; + } + if (userStats.LastAttacked.Contains(targetUser.Id)) + { + await ReplyErrorLocalized("cant_attack_again").ConfigureAwait(false); + return; + } + //get target stats + var targetStats = _service.Stats.GetOrAdd(targetUser.Id, new PokeStats()); + + //If target's HP is below 0, no use attacking + if (targetStats.Hp <= 0) + { + await ReplyErrorLocalized("too_many_moves", targetUser).ConfigureAwait(false); + return; + } + + //Check whether move can be used + PokemonType userType = GetPokeType(user.Id); + + var enabledMoves = userType.Moves; + if (!enabledMoves.Contains(move.ToLowerInvariant())) + { + await ReplyErrorLocalized("invalid_move", Format.Bold(move), Prefix).ConfigureAwait(false); + return; + } + + //get target type + PokemonType targetType = GetPokeType(targetUser.Id); + //generate damage + int damage = GetDamage(userType, targetType); + //apply damage to target + targetStats.Hp -= damage; + + var response = GetText("attack", Format.Bold(move), userType.Icon, Format.Bold(targetUser.ToString()), targetType.Icon, Format.Bold(damage.ToString())); + + //Damage type + if (damage < 40) + { + response += "\n" + GetText("not_effective"); + } + else if (damage > 60) + { + response += "\n" + GetText("super_effective"); + } + else + { + response += "\n" + GetText("somewhat_effective"); + } + + //check fainted + + if (targetStats.Hp <= 0) + { + response += "\n" + GetText("fainted", Format.Bold(targetUser.ToString())); + } + else + { + response += "\n" + GetText("hp_remaining", Format.Bold(targetUser.ToString()), targetStats.Hp); + } + + //update other stats + userStats.LastAttacked.Add(targetUser.Id); + userStats.MovesMade++; + targetStats.MovesMade = 0; + if (targetStats.LastAttacked.Contains(user.Id)) + { + targetStats.LastAttacked.Remove(user.Id); + } + + //update dictionary + //This can stay the same right? + _service.Stats[user.Id] = userStats; + _service.Stats[targetUser.Id] = targetStats; + + await Context.Channel.SendConfirmAsync(Context.User.Mention + " " + response).ConfigureAwait(false); + } + + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Movelist() + { + IGuildUser user = (IGuildUser)Context.User; + + var userType = GetPokeType(user.Id); + var movesList = userType.Moves; + var embed = new EmbedBuilder().WithOkColor() + .WithTitle(GetText("moves", userType)) + .WithDescription(string.Join("\n", movesList.Select(m => userType.Icon + " " + m))); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Heal(IGuildUser targetUser = null) + { + IGuildUser user = (IGuildUser)Context.User; + + if (targetUser == null) + { + await ReplyErrorLocalized("user_not_found").ConfigureAwait(false); + return; + } + + if (_service.Stats.ContainsKey(targetUser.Id)) + { + var targetStats = _service.Stats[targetUser.Id]; + if (targetStats.Hp == targetStats.MaxHp) + { + await ReplyErrorLocalized("already_full", Format.Bold(targetUser.ToString())).ConfigureAwait(false); + return; + } + //Payment~ + var amount = 1; + + var target = (targetUser.Id == user.Id) ? "yourself" : targetUser.Mention; + if (amount > 0) + { + if (!await _cs.RemoveAsync(user, $"Poke-Heal {target}", amount, true).ConfigureAwait(false)) + { + await ReplyErrorLocalized("no_currency", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + } + + //healing + targetStats.Hp = targetStats.MaxHp; + if (targetStats.Hp < 0) + { + //Could heal only for half HP? + _service.Stats[targetUser.Id].Hp = (targetStats.MaxHp / 2); + if (target == "yourself") + { + await ReplyConfirmLocalized("revive_yourself", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + + await ReplyConfirmLocalized("revive_other", Format.Bold(targetUser.ToString()), _bc.BotConfig.CurrencySign).ConfigureAwait(false); + } + await ReplyConfirmLocalized("healed", Format.Bold(targetUser.ToString()), _bc.BotConfig.CurrencySign).ConfigureAwait(false); + } + else + { + await ErrorLocalized("already_full", Format.Bold(targetUser.ToString())); + } + } + + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Type(IGuildUser targetUser = null) + { + targetUser = targetUser ?? (IGuildUser)Context.User; + var pType = GetPokeType(targetUser.Id); + await ReplyConfirmLocalized("type_of_user", Format.Bold(targetUser.ToString()), pType).ConfigureAwait(false); + + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Settype([Remainder] string typeTargeted = null) + { + IGuildUser user = (IGuildUser)Context.User; + + var targetType = StringToPokemonType(typeTargeted); + if (targetType == null) + { + await Context.Channel.EmbedAsync(_service.PokemonTypes.Aggregate(new EmbedBuilder().WithDescription("List of the available types:"), + (eb, pt) => eb.AddField(efb => efb.WithName(pt.Name) + .WithValue(pt.Icon) + .WithIsInline(true))) + .WithColor(NadekoBot.OkColor)).ConfigureAwait(false); + return; + } + if (targetType == GetPokeType(user.Id)) + { + await ReplyErrorLocalized("already_that_type", targetType).ConfigureAwait(false); + return; + } + + //Payment~ + var amount = 1; + if (amount > 0) + { + if (!await _cs.RemoveAsync(user, $"{user} change type to {typeTargeted}", amount, true).ConfigureAwait(false)) + { + await ReplyErrorLocalized("no_currency", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + return; + } + } + + //Actually changing the type here + + using (var uow = _db.UnitOfWork) + { + var pokeUsers = uow.PokeGame.GetAll().ToArray(); + var setTypes = pokeUsers.ToDictionary(x => x.UserId, y => y.type); + var pt = new UserPokeTypes + { + UserId = user.Id, + type = targetType.Name, + }; + if (!setTypes.ContainsKey(user.Id)) + { + //create user in db + uow.PokeGame.Add(pt); + } + else + { + //update user in db + var pokeUserCmd = pokeUsers.FirstOrDefault(p => p.UserId == user.Id); + pokeUserCmd.type = targetType.Name; + uow.PokeGame.Update(pokeUserCmd); + } + await uow.CompleteAsync(); + } + + //Now for the response + await ReplyConfirmLocalized("settype_success", + targetType, + _bc.BotConfig.CurrencySign).ConfigureAwait(false); + } + } +} + + + + diff --git a/NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs b/NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs new file mode 100644 index 00000000..d29f8818 --- /dev/null +++ b/NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs @@ -0,0 +1,34 @@ +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using NadekoBot.Modules.Pokemon.Common; +using NadekoBot.Core.Services; +using Newtonsoft.Json; +using NLog; + +namespace NadekoBot.Modules.Pokemon.Services +{ + public class PokemonService : INService + { + public readonly List PokemonTypes = new List(); + public readonly ConcurrentDictionary Stats = new ConcurrentDictionary(); + + public const string PokemonTypesFile = "data/pokemon_types.json"; + + private Logger _log { get; } + + public PokemonService() + { + _log = LogManager.GetCurrentClassLogger(); + if (File.Exists(PokemonTypesFile)) + { + PokemonTypes = JsonConvert.DeserializeObject>(File.ReadAllText(PokemonTypesFile)); + } + else + { + PokemonTypes = new List(); + _log.Warn(PokemonTypesFile + " is missing. Pokemon types not loaded."); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs b/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs new file mode 100644 index 00000000..f6825b7d --- /dev/null +++ b/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs @@ -0,0 +1,176 @@ +using AngleSharp; +using AngleSharp.Dom.Html; +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using NadekoBot.Modules.Searches.Services; +using System; +using System.Linq; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; + +namespace NadekoBot.Modules.Searches +{ + public partial class Searches + { + [Group] + public class AnimeSearchCommands : NadekoSubmodule + { + [NadekoCommand, Usage, Description, Aliases] + [Priority(0)] + public async Task Mal([Remainder] string name) + { + if (string.IsNullOrWhiteSpace(name)) + return; + + var fullQueryLink = "https://myanimelist.net/profile/" + name; + + var config = Configuration.Default.WithDefaultLoader(); + var document = await BrowsingContext.New(config).OpenAsync(fullQueryLink); + + var imageElem = document.QuerySelector("body > div#myanimelist > div.wrapper > div#contentWrapper > div#content > div.content-container > div.container-left > div.user-profile > div.user-image > img"); + var imageUrl = ((IHtmlImageElement)imageElem)?.Source ?? "http://icecream.me/uploads/870b03f36b59cc16ebfe314ef2dde781.png"; + + var stats = document.QuerySelectorAll("body > div#myanimelist > div.wrapper > div#contentWrapper > div#content > div.content-container > div.container-right > div#statistics > div.user-statistics-stats > div.stats > div.clearfix > ul.stats-status > li > span").Select(x => x.InnerHtml).ToList(); + + var favorites = document.QuerySelectorAll("div.user-favorites > div.di-tc"); + + var favAnime = GetText("anime_no_fav"); + if (favorites[0].QuerySelector("p") == null) + favAnime = string.Join("\n", favorites[0].QuerySelectorAll("ul > li > div.di-tc.va-t > a") + .Shuffle() + .Take(3) + .Select(x => + { + var elem = (IHtmlAnchorElement)x; + return $"[{elem.InnerHtml}]({elem.Href})"; + })); + + var info = document.QuerySelectorAll("ul.user-status:nth-child(3) > li.clearfix") + .Select(x => Tuple.Create(x.Children[0].InnerHtml, x.Children[1].InnerHtml)) + .ToList(); + + var daysAndMean = document.QuerySelectorAll("div.anime:nth-child(1) > div:nth-child(2) > div") + .Select(x => x.TextContent.Split(':').Select(y => y.Trim()).ToArray()) + .ToArray(); + + var embed = new EmbedBuilder() + .WithOkColor() + .WithTitle(GetText("mal_profile", name)) + .AddField(efb => efb.WithName("💚 " + GetText("watching")).WithValue(stats[0]).WithIsInline(true)) + .AddField(efb => efb.WithName("💙 " + GetText("completed")).WithValue(stats[1]).WithIsInline(true)); + if (info.Count < 3) + embed.AddField(efb => efb.WithName("💛 " + GetText("on_hold")).WithValue(stats[2]).WithIsInline(true)); + embed + .AddField(efb => efb.WithName("💔 " + GetText("dropped")).WithValue(stats[3]).WithIsInline(true)) + .AddField(efb => efb.WithName("⚪ " + GetText("plan_to_watch")).WithValue(stats[4]).WithIsInline(true)) + .AddField(efb => efb.WithName("🕐 " + daysAndMean[0][0]).WithValue(daysAndMean[0][1]).WithIsInline(true)) + .AddField(efb => efb.WithName("📊 " + daysAndMean[1][0]).WithValue(daysAndMean[1][1]).WithIsInline(true)) + .AddField(efb => efb.WithName(MalInfoToEmoji(info[0].Item1) + " " + info[0].Item1).WithValue(info[0].Item2.TrimTo(20)).WithIsInline(true)) + .AddField(efb => efb.WithName(MalInfoToEmoji(info[1].Item1) + " " + info[1].Item1).WithValue(info[1].Item2.TrimTo(20)).WithIsInline(true)); + if (info.Count > 2) + embed.AddField(efb => efb.WithName(MalInfoToEmoji(info[2].Item1) + " " + info[2].Item1).WithValue(info[2].Item2.TrimTo(20)).WithIsInline(true)); + //if(info.Count > 3) + // embed.AddField(efb => efb.WithName(MalInfoToEmoji(info[3].Item1) + " " + info[3].Item1).WithValue(info[3].Item2).WithIsInline(true)) + embed + .WithDescription($@" +** https://myanimelist.net/animelist/{ name } ** + +**{GetText("top_3_fav_anime")}** +{favAnime}" + +//**[Manga List](https://myanimelist.net/mangalist/{name})** +//💚`Reading:` {stats[5]} +//💙`Completed:` {stats[6]} +//💔`Dropped:` {stats[8]} +//⚪`Plan to read:` {stats[9]} + +//**Top 3 Favorite Manga:** +//{favManga}" + +) + .WithUrl(fullQueryLink) + .WithImageUrl(imageUrl); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + private static string MalInfoToEmoji(string info) + { + info = info.Trim().ToLowerInvariant(); + switch (info) + { + case "gender": + return "🚁"; + case "location": + return "🗺"; + case "last online": + return "👥"; + case "birthday": + return "📆"; + default: + return "❔"; + } + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public Task Mal(IGuildUser usr) => Mal(usr.Username); + + [NadekoCommand, Usage, Description, Aliases] + public async Task Anime([Remainder] string query) + { + if (string.IsNullOrWhiteSpace(query)) + return; + + var animeData = await _service.GetAnimeData(query).ConfigureAwait(false); + + if (animeData == null) + { + await ReplyErrorLocalized("failed_finding_anime").ConfigureAwait(false); + return; + } + + var embed = new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithDescription(animeData.Synopsis.Replace("
", Environment.NewLine)) + .WithTitle(animeData.title_english) + .WithUrl(animeData.Link) + .WithImageUrl(animeData.image_url_lge) + .AddField(efb => efb.WithName(GetText("episodes")).WithValue(animeData.total_episodes.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("status")).WithValue(animeData.AiringStatus.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("genres")).WithValue(string.Join(",\n", animeData.Genres.Any() ? animeData.Genres : new[] { "none" })).WithIsInline(true)) + .WithFooter(efb => efb.WithText(GetText("score") + " " + animeData.average_score + " / 100")); + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task Manga([Remainder] string query) + { + if (string.IsNullOrWhiteSpace(query)) + return; + + var mangaData = await _service.GetMangaData(query).ConfigureAwait(false); + + if (mangaData == null) + { + await ReplyErrorLocalized("failed_finding_manga").ConfigureAwait(false); + return; + } + + var embed = new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithDescription(mangaData.Synopsis.Replace("
", Environment.NewLine)) + .WithTitle(mangaData.title_english) + .WithUrl(mangaData.Link) + .WithImageUrl(mangaData.image_url_lge) + .AddField(efb => efb.WithName(GetText("chapters")).WithValue(mangaData.total_chapters.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("status")).WithValue(mangaData.publishing_status.ToString()).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("genres")).WithValue(string.Join(",\n", mangaData.Genres.Any() ? mangaData.Genres : new[] { "none" })).WithIsInline(true)) + .WithFooter(efb => efb.WithText(GetText("score") + " " + mangaData.average_score + " / 100")); + + await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Searches/Common/AnimeResult.cs b/NadekoBot.Core/Modules/Searches/Common/AnimeResult.cs new file mode 100644 index 00000000..f2d3e8f0 --- /dev/null +++ b/NadekoBot.Core/Modules/Searches/Common/AnimeResult.cs @@ -0,0 +1,20 @@ +using NadekoBot.Extensions; + +namespace NadekoBot.Modules.Searches.Common +{ + public class AnimeResult + { + public int id; + public string AiringStatus => airing_status.ToTitleCase(); + public string airing_status; + public string title_english; + public int total_episodes; + public string description; + public string image_url_lge; + public string[] Genres; + public string average_score; + + public string Link => "http://anilist.co/anime/" + id; + public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "..."; + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Searches/Common/DefineModel.cs b/NadekoBot.Core/Modules/Searches/Common/DefineModel.cs new file mode 100644 index 00000000..5a3b4603 --- /dev/null +++ b/NadekoBot.Core/Modules/Searches/Common/DefineModel.cs @@ -0,0 +1,39 @@ +using System.Collections.Generic; + +namespace NadekoBot.Modules.Searches.Common +{ + public class Audio + { + public string url { get; set; } + } + + public class Example + { + public List