From afb0da1170b90971007e807f22c733668acee9fa Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 15 Nov 2016 12:01:02 +0100 Subject: [PATCH] Removed unnecessary usings, hopefuly fixed database problem when not loading db from the root of the project --- src/NadekoBot/Attributes/Aliases.cs | 4 ---- src/NadekoBot/Attributes/NadekoCommand.cs | 1 - src/NadekoBot/Attributes/NadekoModule.cs | 4 ---- .../DataStructures/ConcurrentHashSet.cs | 2 -- .../20161011200458_first.Designer.cs | 4 ++-- .../Migrations/20161011200458_first.cs | 1 - ...61015005020_CurrencyTransaction.Designer.cs | 4 ++-- .../20161015005020_CurrencyTransaction.cs | 4 +--- .../Migrations/20161015102407_coc.Designer.cs | 4 ++-- src/NadekoBot/Migrations/20161015102407_coc.cs | 4 +--- .../20161019055137_MuteRoleName.Designer.cs | 4 ++-- .../Migrations/20161019055137_MuteRoleName.cs | 4 +--- .../20161107213222_Cleverbot.Designer.cs | 4 ++-- .../Migrations/20161107213222_Cleverbot.cs | 4 +--- .../NadekoSqliteContextModelSnapshot.cs | 5 ++--- .../Modules/Administration/Administration.cs | 3 --- .../Commands/AntiRaidCommands.cs | 7 ------- .../Commands/AutoAssignRoleCommands.cs | 2 -- .../Commands/CrossServerTextChannel.cs | 2 -- .../Commands/DMForwardCommands.cs | 3 --- .../Administration/Commands/LogCommand.cs | 2 -- .../Administration/Commands/MessageRepeater.cs | 2 -- .../Administration/Commands/Migration.cs | 1 - .../Administration/Commands/Migration/0_9..cs | 5 +---- .../Commands/Migration/MigrationException.cs | 4 ---- .../Commands/PlayingRotateCommands.cs | 3 --- .../Commands/RatelimitCommand.cs | 1 - .../Commands/SelfAssignedRolesCommand.cs | 2 -- .../Administration/Commands/SelfCommands.cs | 1 - .../Commands/ServerGreetCommands.cs | 1 - .../Commands/VoicePlusTextCommands.cs | 1 - .../Modules/ClashOfClans/ClashOfClans.cs | 1 - .../Modules/ClashOfClans/Extensions.cs | 6 +----- .../Modules/CustomReactions/CustomReactions.cs | 9 ++------- .../Modules/CustomReactions/Extensions.cs | 4 ---- src/NadekoBot/Modules/DiscordModule.cs | 4 +--- .../Modules/Gambling/Commands/AnimalRacing.cs | 1 - .../Gambling/Commands/DiceRollCommand.cs | 1 - src/NadekoBot/Modules/Gambling/Gambling.cs | 2 -- .../Games/Commands/CleverBotCommands.cs | 6 ------ .../Games/Commands/Models/TypingArticle.cs | 8 +------- .../Games/Commands/PlantAndPickCommands.cs | 2 -- .../Modules/Games/Commands/PollCommands.cs | 1 - .../Games/Commands/SpeedTypingCommands.cs | 3 --- src/NadekoBot/Modules/Games/Games.cs | 2 -- src/NadekoBot/Modules/Help/Help.cs | 4 ---- .../Modules/Music/Classes/SongBuffer.cs | 4 ---- src/NadekoBot/Modules/Music/Music.cs | 1 - src/NadekoBot/Modules/NSFW/NSFW.cs | 2 -- .../Permissions/Commands/BlacklistCommands.cs | 4 ---- .../Permissions/Commands/CmdCdsCommands.cs | 4 ---- .../Permissions/Commands/FilterCommands.cs | 4 ---- .../Modules/Permissions/PermissionAction.cs | 10 +--------- .../Permissions/PermissionExtensions.cs | 5 ----- .../Modules/Permissions/Permissions.cs | 5 ----- .../Searches/Commands/AnimeSearchCommands.cs | 1 - .../Modules/Searches/Commands/JokeCommands.cs | 1 - .../Modules/Searches/Commands/LoLCommands.cs | 1 - .../Searches/Commands/MemegenCommands.cs | 1 - .../Searches/Commands/OMDB/OmdbProvider.cs | 3 --- .../Modules/Searches/Commands/OsuCommands.cs | 1 - .../Modules/Searches/Commands/PlaceCommands.cs | 4 ---- .../Commands/StreamNotificationCommands.cs | 1 - .../Modules/Searches/Commands/Translator.cs | 3 --- .../Modules/Searches/Commands/XkcdCommands.cs | 4 ---- src/NadekoBot/Modules/Searches/Searches.cs | 1 - .../Modules/Utility/Commands/CalcCommand.cs | 1 - .../Modules/Utility/Commands/InfoCommands.cs | 1 - .../Modules/Utility/Commands/QuoteCommands.cs | 2 -- .../Modules/Utility/Commands/Remind.cs | 2 -- .../Modules/Utility/Commands/UnitConversion.cs | 1 - src/NadekoBot/Modules/Utility/Utility.cs | 3 --- src/NadekoBot/NadekoBot.cs | 4 ---- src/NadekoBot/Services/CommandHandler.cs | 4 ---- src/NadekoBot/Services/CurrencyHandler.cs | 4 ---- src/NadekoBot/Services/Database/IUnitOfWork.cs | 3 --- .../Database/Impl/NadekoSqlServerContext.cs | 18 ------------------ .../Database/Impl/NadekoSqliteContext.cs | 18 ------------------ .../Services/Database/Models/BotConfig.cs | 9 +-------- .../Services/Database/Models/ClashCaller.cs | 4 ---- .../Services/Database/Models/ClashWar.cs | 4 ---- .../Database/Models/CommandCooldown.cs | 8 +------- .../Services/Database/Models/ConvertUnit.cs | 6 +----- .../Services/Database/Models/Currency.cs | 8 +------- .../Database/Models/CurrencyTransaction.cs | 8 +------- .../Services/Database/Models/CustomReaction.cs | 7 +------ .../Services/Database/Models/DbEntity.cs | 4 ---- .../Services/Database/Models/Donator.cs | 8 +------- .../Services/Database/Models/FollowedStream.cs | 8 +------- .../Services/Database/Models/GuildConfig.cs | 7 +------ .../Database/Models/IgnoredLogChannel.cs | 8 +------- .../Services/Database/Models/LogSetting.cs | 7 +------ .../Services/Database/Models/MusicPlaylist.cs | 6 +----- .../Services/Database/Models/Permission.cs | 7 +------ .../Services/Database/Models/PlaylistSong.cs | 5 ----- .../Services/Database/Models/Quote.cs | 7 +------ .../Services/Database/Models/Reminder.cs | 4 ---- .../Services/Database/Models/Repeater.cs | 4 ---- .../Database/Models/SelfAssignableRole.cs | 8 +------- .../Database/Models/VoicePresenceChannel.cs | 8 +------- .../Services/Database/NadekoContext.cs | 13 +++++++------ .../Repositories/IBotConfigRepository.cs | 5 ----- .../Repositories/IClashOfClansRepository.cs | 4 ---- .../Repositories/ICurrencyRepository.cs | 4 ---- .../ICurrencyTransactionsRepository.cs | 5 ----- .../Repositories/ICustomReactionRepository.cs | 5 ----- .../Repositories/IDonatorsRepository.cs | 4 ---- .../Repositories/IGuildConfigRepository.cs | 5 ----- .../Repositories/IMusicPlaylistRepository.cs | 4 ---- .../Database/Repositories/IQuoteRepository.cs | 3 --- .../Repositories/IReminderRepository.cs | 5 ----- .../Repositories/IRepeaterRepository.cs | 5 ----- .../Database/Repositories/IRepository.cs | 7 +------ .../ISelfAssignedRolesRepository.cs | 4 ---- .../Repositories/IUnitConverterRepository.cs | 3 --- .../Repositories/Impl/BotConfigRepository.cs | 4 ---- .../Impl/ClashOfClansRepository.cs | 3 --- .../Repositories/Impl/CurrencyRepository.cs | 3 --- .../Impl/CurrencyTransactionsRepository.cs | 5 ----- .../Impl/CustomReactionRepository.cs | 5 ----- .../Repositories/Impl/DonatorsRepository.cs | 5 +---- .../Repositories/Impl/GuildConfigRepository.cs | 3 --- .../Impl/MusicPlaylistRepository.cs | 2 -- .../Repositories/Impl/QuoteRepository.cs | 3 --- .../Repositories/Impl/ReminderRepository.cs | 5 ----- .../Repositories/Impl/RepeaterRepository.cs | 5 ----- .../Database/Repositories/Impl/Repository.cs | 3 --- .../Impl/SelfAssignedRolesRepository.cs | 3 --- .../Impl/UnitCOnverterRepository.cs | 2 -- src/NadekoBot/Services/Database/UnitOfWork.cs | 3 --- src/NadekoBot/Services/DbHandler.cs | 18 +++++++----------- src/NadekoBot/Services/IBotCredentials.cs | 2 -- src/NadekoBot/Services/IStatsService.cs | 7 +------ src/NadekoBot/Services/Impl/BotCredentials.cs | 1 - .../Services/Impl/GoogleApiService.cs | 1 - src/NadekoBot/Services/Impl/Localization.cs | 4 +--- src/NadekoBot/Services/Impl/StatsService.cs | 2 -- src/NadekoBot/Services/NadekoRandom.cs | 4 ---- src/NadekoBot/ShardedDiscordClient.cs | 5 ----- .../TypeReaders/BotCommandTypeReader.cs | 3 --- src/NadekoBot/TypeReaders/GuildTypeReader.cs | 4 ---- src/NadekoBot/TypeReaders/ModuleTypeReader.cs | 3 --- .../TypeReaders/PermissionActionTypeReader.cs | 4 ---- src/NadekoBot/_Extensions/Extensions.cs | 2 -- 144 files changed, 57 insertions(+), 546 deletions(-) delete mode 100644 src/NadekoBot/Services/Database/Impl/NadekoSqlServerContext.cs delete mode 100644 src/NadekoBot/Services/Database/Impl/NadekoSqliteContext.cs diff --git a/src/NadekoBot/Attributes/Aliases.cs b/src/NadekoBot/Attributes/Aliases.cs index ee6e18ad..af3e98fb 100644 --- a/src/NadekoBot/Attributes/Aliases.cs +++ b/src/NadekoBot/Attributes/Aliases.cs @@ -1,11 +1,7 @@ using Discord.Commands; using NadekoBot.Services; -using System; -using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Attributes { diff --git a/src/NadekoBot/Attributes/NadekoCommand.cs b/src/NadekoBot/Attributes/NadekoCommand.cs index ab473cbb..3c8010a9 100644 --- a/src/NadekoBot/Attributes/NadekoCommand.cs +++ b/src/NadekoBot/Attributes/NadekoCommand.cs @@ -1,6 +1,5 @@ using Discord.Commands; using NadekoBot.Services; -using System.Linq; using System.Runtime.CompilerServices; namespace NadekoBot.Attributes diff --git a/src/NadekoBot/Attributes/NadekoModule.cs b/src/NadekoBot/Attributes/NadekoModule.cs index 8ac94523..a4aba6c6 100644 --- a/src/NadekoBot/Attributes/NadekoModule.cs +++ b/src/NadekoBot/Attributes/NadekoModule.cs @@ -1,12 +1,8 @@ using Discord.Commands; using NadekoBot.Services; -using NadekoBot.Services.Database; using System; using System.Collections.Generic; using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Attributes { diff --git a/src/NadekoBot/DataStructures/ConcurrentHashSet.cs b/src/NadekoBot/DataStructures/ConcurrentHashSet.cs index 019f7a87..2a2ae1bf 100644 --- a/src/NadekoBot/DataStructures/ConcurrentHashSet.cs +++ b/src/NadekoBot/DataStructures/ConcurrentHashSet.cs @@ -2,8 +2,6 @@ // Source: https://github.com/i3arnon/ConcurrentHashSet using ConcurrentCollections; -using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; diff --git a/src/NadekoBot/Migrations/20161011200458_first.Designer.cs b/src/NadekoBot/Migrations/20161011200458_first.Designer.cs index 3cb606dd..3f80251a 100644 --- a/src/NadekoBot/Migrations/20161011200458_first.Designer.cs +++ b/src/NadekoBot/Migrations/20161011200458_first.Designer.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database.Impl; +using NadekoBot.Services.Database; namespace NadekoBot.Migrations { - [DbContext(typeof(NadekoSqliteContext))] + [DbContext(typeof(NadekoContext))] [Migration("20161011200458_first")] partial class first { diff --git a/src/NadekoBot/Migrations/20161011200458_first.cs b/src/NadekoBot/Migrations/20161011200458_first.cs index 155508a6..25b3a717 100644 --- a/src/NadekoBot/Migrations/20161011200458_first.cs +++ b/src/NadekoBot/Migrations/20161011200458_first.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs index 09af6235..52db3bf9 100644 --- a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs +++ b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database.Impl; +using NadekoBot.Services.Database; namespace NadekoBot.Migrations { - [DbContext(typeof(NadekoSqliteContext))] + [DbContext(typeof(NadekoContext))] [Migration("20161015005020_CurrencyTransaction")] partial class CurrencyTransaction { diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs index 5d0b61d4..2540fbc5 100644 --- a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs +++ b/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { diff --git a/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs b/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs index f05d500c..fd104e1a 100644 --- a/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs +++ b/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database.Impl; +using NadekoBot.Services.Database; namespace NadekoBot.Migrations { - [DbContext(typeof(NadekoSqliteContext))] + [DbContext(typeof(NadekoContext))] [Migration("20161015102407_coc")] partial class coc { diff --git a/src/NadekoBot/Migrations/20161015102407_coc.cs b/src/NadekoBot/Migrations/20161015102407_coc.cs index e1d42e8c..e6dabaef 100644 --- a/src/NadekoBot/Migrations/20161015102407_coc.cs +++ b/src/NadekoBot/Migrations/20161015102407_coc.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { diff --git a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs b/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs index 5702beca..f86d532c 100644 --- a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs +++ b/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database.Impl; +using NadekoBot.Services.Database; namespace NadekoBot.Migrations { - [DbContext(typeof(NadekoSqliteContext))] + [DbContext(typeof(NadekoContext))] [Migration("20161019055137_MuteRoleName")] partial class MuteRoleName { diff --git a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs b/src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs index 6bd2f5cc..12b26d37 100644 --- a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs +++ b/src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { diff --git a/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs b/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs index 18f9b61a..50ac3309 100644 --- a/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs +++ b/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs @@ -3,11 +3,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database.Impl; +using NadekoBot.Services.Database; namespace NadekoBot.Migrations { - [DbContext(typeof(NadekoSqliteContext))] + [DbContext(typeof(NadekoContext))] [Migration("20161107213222_Cleverbot")] partial class Cleverbot { diff --git a/src/NadekoBot/Migrations/20161107213222_Cleverbot.cs b/src/NadekoBot/Migrations/20161107213222_Cleverbot.cs index 383bd250..a8bdb0dd 100644 --- a/src/NadekoBot/Migrations/20161107213222_Cleverbot.cs +++ b/src/NadekoBot/Migrations/20161107213222_Cleverbot.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs index 13be0b66..9e58afaa 100644 --- a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -2,12 +2,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database.Impl; +using NadekoBot.Services.Database; namespace NadekoBot.Migrations { - [DbContext(typeof(NadekoSqliteContext))] + [DbContext(typeof(NadekoContext))] partial class NadekoSqliteContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 912d457d..c8455d6b 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -9,12 +9,9 @@ using System.Text; using System.Threading.Tasks; using NadekoBot.Services; using NadekoBot.Attributes; -using System.Text.RegularExpressions; using Discord.WebSocket; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using System.Net.Http; -using ImageProcessorCore; using System.IO; using static NadekoBot.Modules.Permissions.Permissions; using System.Collections.Concurrent; diff --git a/src/NadekoBot/Modules/Administration/Commands/AntiRaidCommands.cs b/src/NadekoBot/Modules/Administration/Commands/AntiRaidCommands.cs index 60b6b412..54cc12fc 100644 --- a/src/NadekoBot/Modules/Administration/Commands/AntiRaidCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/AntiRaidCommands.cs @@ -1,17 +1,10 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; -using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database; using NLog; using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading; using System.Threading.Tasks; namespace NadekoBot.Modules.Administration diff --git a/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs b/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs index 4a159152..7f45fe4a 100644 --- a/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/AutoAssignRoleCommands.cs @@ -1,9 +1,7 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NLog; using System; diff --git a/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs b/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs index b691e86c..50dfaed7 100644 --- a/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs +++ b/src/NadekoBot/Modules/Administration/Commands/CrossServerTextChannel.cs @@ -1,13 +1,11 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; using NLog; using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/Commands/DMForwardCommands.cs b/src/NadekoBot/Modules/Administration/Commands/DMForwardCommands.cs index c755d34d..e32e31e3 100644 --- a/src/NadekoBot/Modules/Administration/Commands/DMForwardCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/DMForwardCommands.cs @@ -2,11 +2,8 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Services; -using NadekoBot.Services.Database; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Administration diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index a366baef..8bfde110 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -4,14 +4,12 @@ using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NLog; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Reflection; using System.Threading; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs index 44459e8f..77da8304 100644 --- a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs @@ -3,12 +3,10 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NLog; using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/Commands/Migration.cs b/src/NadekoBot/Modules/Administration/Commands/Migration.cs index 78814624..fbf24492 100644 --- a/src/NadekoBot/Modules/Administration/Commands/Migration.cs +++ b/src/NadekoBot/Modules/Administration/Commands/Migration.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.IO; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/Commands/Migration/0_9..cs b/src/NadekoBot/Modules/Administration/Commands/Migration/0_9..cs index 28e5d949..b7de1523 100644 --- a/src/NadekoBot/Modules/Administration/Commands/Migration/0_9..cs +++ b/src/NadekoBot/Modules/Administration/Commands/Migration/0_9..cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Modules.Administration.Commands.Migration { diff --git a/src/NadekoBot/Modules/Administration/Commands/Migration/MigrationException.cs b/src/NadekoBot/Modules/Administration/Commands/Migration/MigrationException.cs index 1b26d161..307ed63d 100644 --- a/src/NadekoBot/Modules/Administration/Commands/Migration/MigrationException.cs +++ b/src/NadekoBot/Modules/Administration/Commands/Migration/MigrationException.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Modules.Administration.Commands.Migration { diff --git a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs index 011f5812..96dc0ad6 100644 --- a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs @@ -4,14 +4,11 @@ using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NLog; using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading; using System.Threading.Tasks; namespace NadekoBot.Modules.Administration diff --git a/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs b/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs index 08e75743..587d0b65 100644 --- a/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs @@ -1,6 +1,5 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NLog; diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs index 5d29e4fc..4635cf53 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs @@ -1,9 +1,7 @@ using Discord; using Discord.Commands; -using Discord.Net; using NadekoBot.Attributes; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using System; using System.Collections.Concurrent; diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs b/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs index 87bf6860..60e9c8ce 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfCommands.cs @@ -1,6 +1,5 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs index 107aface..d36a7487 100644 --- a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs @@ -6,7 +6,6 @@ using NadekoBot.Services; using NadekoBot.Services.Database.Models; using NLog; using System; -using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs index 1e4ca219..5a1b12ac 100644 --- a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs @@ -4,7 +4,6 @@ using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using System; using System.Collections.Concurrent; using System.Linq; diff --git a/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs b/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs index 1f084c4c..c7cfdaad 100644 --- a/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs +++ b/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs @@ -10,7 +10,6 @@ using NadekoBot.Attributes; using Discord.WebSocket; using NadekoBot.Services.Database.Models; using System.Linq; -using NadekoBot.Services.Database; namespace NadekoBot.Modules.ClashOfClans { diff --git a/src/NadekoBot/Modules/ClashOfClans/Extensions.cs b/src/NadekoBot/Modules/ClashOfClans/Extensions.cs index d2103edd..9fc998ff 100644 --- a/src/NadekoBot/Modules/ClashOfClans/Extensions.cs +++ b/src/NadekoBot/Modules/ClashOfClans/Extensions.cs @@ -1,11 +1,7 @@ -using Discord; -using Discord.WebSocket; -using NadekoBot.Services.Database.Models; +using NadekoBot.Services.Database.Models; using System; -using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; using static NadekoBot.Services.Database.Models.ClashWar; namespace NadekoBot.Modules.ClashOfClans diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index 41b43dec..65c4f7e0 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -1,20 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Linq; using System.Threading.Tasks; using Discord.Commands; using NadekoBot.Services; using NadekoBot.Attributes; -using NadekoBot.Services.Database; using System.Collections.Concurrent; using NadekoBot.Services.Database.Models; using Discord; using NadekoBot.Extensions; -using System.IO; namespace NadekoBot.Modules.CustomReactions -{ +{ [NadekoModule("CustomReactions",".")] public class CustomReactions : DiscordModule { diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions.cs b/src/NadekoBot/Modules/CustomReactions/Extensions.cs index a6e6d357..f5cb66cc 100644 --- a/src/NadekoBot/Modules/CustomReactions/Extensions.cs +++ b/src/NadekoBot/Modules/CustomReactions/Extensions.cs @@ -1,12 +1,8 @@ using Discord; -using NadekoBot.Extensions; using NadekoBot.Services; using NadekoBot.Services.Database.Models; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Modules.CustomReactions { diff --git a/src/NadekoBot/Modules/DiscordModule.cs b/src/NadekoBot/Modules/DiscordModule.cs index 5ad80226..e923108f 100644 --- a/src/NadekoBot/Modules/DiscordModule.cs +++ b/src/NadekoBot/Modules/DiscordModule.cs @@ -1,6 +1,4 @@ -using Discord; -using Discord.Commands; -using Discord.WebSocket; +using Discord.Commands; using NadekoBot.Services; using NLog; diff --git a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs index e52b1158..9bda0461 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/AnimalRacing.cs @@ -3,7 +3,6 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NLog; using System; using System.Collections.Concurrent; diff --git a/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs index 73c650c0..39c1622b 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs @@ -8,7 +8,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Resources; using System.Text.RegularExpressions; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index bbd1d3ff..12626123 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -2,13 +2,11 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Extensions; -using System; using System.Linq; using System.Text; using System.Threading.Tasks; using NadekoBot.Services; using Discord.WebSocket; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using System.Collections.Generic; diff --git a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs index 8ee2d9b0..39c95425 100644 --- a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs @@ -2,17 +2,11 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Services; -using NadekoBot.Services.Database; -using Newtonsoft.Json; using NLog; using Services.CleverBotApi; using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; -using System.Net; -using System.Net.Http; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Games diff --git a/src/NadekoBot/Modules/Games/Commands/Models/TypingArticle.cs b/src/NadekoBot/Modules/Games/Commands/Models/TypingArticle.cs index 6f7bb231..e5697772 100644 --- a/src/NadekoBot/Modules/Games/Commands/Models/TypingArticle.cs +++ b/src/NadekoBot/Modules/Games/Commands/Models/TypingArticle.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Modules.Games.Commands.Models +namespace NadekoBot.Modules.Games.Commands.Models { public class TypingArticle { diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index 4f78c620..893cc1a0 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -4,7 +4,6 @@ using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NLog; using System; @@ -13,7 +12,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography; -using System.Threading; using System.Threading.Tasks; namespace NadekoBot.Modules.Games diff --git a/src/NadekoBot/Modules/Games/Commands/PollCommands.cs b/src/NadekoBot/Modules/Games/Commands/PollCommands.cs index b0a3ca6d..66c72f02 100644 --- a/src/NadekoBot/Modules/Games/Commands/PollCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PollCommands.cs @@ -1,6 +1,5 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using System; using System.Collections.Concurrent; diff --git a/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs b/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs index 801b4bab..74f67dcd 100644 --- a/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/SpeedTypingCommands.cs @@ -1,12 +1,9 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Games.Commands.Models; using NadekoBot.Services; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; using Newtonsoft.Json; using NLog; using System; diff --git a/src/NadekoBot/Modules/Games/Games.cs b/src/NadekoBot/Modules/Games/Games.cs index 81a3532d..c61a305c 100644 --- a/src/NadekoBot/Modules/Games/Games.cs +++ b/src/NadekoBot/Modules/Games/Games.cs @@ -7,8 +7,6 @@ using System; using System.Linq; using System.Collections.Generic; using NadekoBot.Extensions; -using Discord.WebSocket; -using NadekoBot.Services.Database; namespace NadekoBot.Modules.Games { diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 7728fa81..a5cb579f 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -8,11 +8,7 @@ using NadekoBot.Attributes; using System; using System.IO; using System.Text; -using Discord.WebSocket; -using System.Collections; using System.Collections.Generic; -using NadekoBot.Services.Database; -using System.Threading; namespace NadekoBot.Modules.Help { diff --git a/src/NadekoBot/Modules/Music/Classes/SongBuffer.cs b/src/NadekoBot/Modules/Music/Classes/SongBuffer.cs index 0979f504..0b8e7849 100644 --- a/src/NadekoBot/Modules/Music/Classes/SongBuffer.cs +++ b/src/NadekoBot/Modules/Music/Classes/SongBuffer.cs @@ -1,12 +1,8 @@ using NadekoBot.Extensions; using NLog; using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; -using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 5ba4e180..de2baa84 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -13,7 +13,6 @@ using NadekoBot.Extensions; using System.Net.Http; using Newtonsoft.Json.Linq; using System.Collections.Generic; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; namespace NadekoBot.Modules.Music diff --git a/src/NadekoBot/Modules/NSFW/NSFW.cs b/src/NadekoBot/Modules/NSFW/NSFW.cs index d5b1de03..137f9623 100644 --- a/src/NadekoBot/Modules/NSFW/NSFW.cs +++ b/src/NadekoBot/Modules/NSFW/NSFW.cs @@ -9,8 +9,6 @@ using NadekoBot.Services; using System.Net.Http; using System.Text.RegularExpressions; using System.Xml.Linq; -using System.Net; -using Discord.WebSocket; using NadekoBot.Extensions; namespace NadekoBot.Modules.NSFW diff --git a/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs b/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs index bbffabcf..d218b9b0 100644 --- a/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs +++ b/src/NadekoBot/Modules/Permissions/Commands/BlacklistCommands.cs @@ -3,13 +3,9 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Modules.Games.Trivia; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; -using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using static NadekoBot.Services.Database.Models.BlacklistItem; diff --git a/src/NadekoBot/Modules/Permissions/Commands/CmdCdsCommands.cs b/src/NadekoBot/Modules/Permissions/Commands/CmdCdsCommands.cs index 97728db1..149c0e4f 100644 --- a/src/NadekoBot/Modules/Permissions/Commands/CmdCdsCommands.cs +++ b/src/NadekoBot/Modules/Permissions/Commands/CmdCdsCommands.cs @@ -3,13 +3,9 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; -using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Permissions diff --git a/src/NadekoBot/Modules/Permissions/Commands/FilterCommands.cs b/src/NadekoBot/Modules/Permissions/Commands/FilterCommands.cs index 006ecac9..bb6ddbab 100644 --- a/src/NadekoBot/Modules/Permissions/Commands/FilterCommands.cs +++ b/src/NadekoBot/Modules/Permissions/Commands/FilterCommands.cs @@ -2,12 +2,8 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Services; -using NadekoBot.Services.Database; -using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Permissions diff --git a/src/NadekoBot/Modules/Permissions/PermissionAction.cs b/src/NadekoBot/Modules/Permissions/PermissionAction.cs index ea2df7ed..324bbf44 100644 --- a/src/NadekoBot/Modules/Permissions/PermissionAction.cs +++ b/src/NadekoBot/Modules/Permissions/PermissionAction.cs @@ -1,12 +1,4 @@ -using Discord.Commands; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Discord; - -namespace NadekoBot.Modules.Permissions +namespace NadekoBot.Modules.Permissions { public class PermissionAction { diff --git a/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs b/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs index 991f25cd..8340b2f5 100644 --- a/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs +++ b/src/NadekoBot/Modules/Permissions/PermissionExtensions.cs @@ -1,15 +1,10 @@ using Discord; using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Modules.Permissions { diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/src/NadekoBot/Modules/Permissions/Permissions.cs index e56fd060..1edd21ce 100644 --- a/src/NadekoBot/Modules/Permissions/Permissions.cs +++ b/src/NadekoBot/Modules/Permissions/Permissions.cs @@ -1,16 +1,11 @@ using NadekoBot.Attributes; using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Services; using Discord; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; -using Discord.API; using System.Collections.Concurrent; namespace NadekoBot.Modules.Permissions diff --git a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs index 5b8d8f5d..6563d8cf 100644 --- a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs @@ -8,7 +8,6 @@ using Newtonsoft.Json.Linq; using NLog; using System; using System.Collections.Generic; -using System.Linq; using System.Net.Http; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs b/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs index b291aadd..98695f6f 100644 --- a/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs @@ -6,7 +6,6 @@ using NadekoBot.Services; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NLog; -using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs index c18eecdc..b915a835 100644 --- a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs @@ -1,7 +1,6 @@ using Discord; using Discord.Commands; using NadekoBot.Attributes; -using NadekoBot.Extensions; using NadekoBot.Services; using Newtonsoft.Json.Linq; using System; diff --git a/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs b/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs index 1015f679..6cd84286 100644 --- a/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/MemegenCommands.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Discord; -using NadekoBot.Services; using System.Threading.Tasks; using NadekoBot.Attributes; using System.Net.Http; diff --git a/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs b/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs index 12032805..a4fffa9d 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OMDB/OmdbProvider.cs @@ -1,9 +1,6 @@ using Newtonsoft.Json; using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Http; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Searches.Commands.OMDB diff --git a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs index d01528a2..9f78461a 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs @@ -7,7 +7,6 @@ using NLog; using System; using System.Globalization; using System.IO; -using System.Net; using System.Net.Http; using System.Text.RegularExpressions; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs index 40df37e3..11ebee81 100644 --- a/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/PlaceCommands.cs @@ -3,10 +3,6 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Services; using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Searches diff --git a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs index eddc41d6..8a768b20 100644 --- a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Services; using System.Threading; -using NadekoBot.Services.Database; using System.Collections.Generic; using NadekoBot.Services.Database.Models; using System.Net.Http; diff --git a/src/NadekoBot/Modules/Searches/Commands/Translator.cs b/src/NadekoBot/Modules/Searches/Commands/Translator.cs index 8c588cf0..fe711303 100644 --- a/src/NadekoBot/Modules/Searches/Commands/Translator.cs +++ b/src/NadekoBot/Modules/Searches/Commands/Translator.cs @@ -4,9 +4,6 @@ using NadekoBot.Attributes; using NadekoBot.Extensions; using System; using System.Threading.Tasks; -using NadekoBot.Services; -using Discord.WebSocket; -using System.Collections.Generic; using System.Collections.Concurrent; using System.Linq; diff --git a/src/NadekoBot/Modules/Searches/Commands/XkcdCommands.cs b/src/NadekoBot/Modules/Searches/Commands/XkcdCommands.cs index 1d13a372..4e901ea6 100644 --- a/src/NadekoBot/Modules/Searches/Commands/XkcdCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/XkcdCommands.cs @@ -3,11 +3,7 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Services; using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Http; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Searches diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 19642917..70ac29b6 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using NadekoBot.Attributes; using System.Text.RegularExpressions; using System.Net; -using Discord.WebSocket; using NadekoBot.Modules.Searches.Models; using System.Collections.Generic; using ImageProcessorCore; diff --git a/src/NadekoBot/Modules/Utility/Commands/CalcCommand.cs b/src/NadekoBot/Modules/Utility/Commands/CalcCommand.cs index d0c5b652..2ec66349 100644 --- a/src/NadekoBot/Modules/Utility/Commands/CalcCommand.cs +++ b/src/NadekoBot/Modules/Utility/Commands/CalcCommand.cs @@ -3,7 +3,6 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Extensions; using System; -using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; diff --git a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs index 3304a28b..4cbaecec 100644 --- a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs @@ -1,6 +1,5 @@ using Discord; using Discord.Commands; -using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using System; diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 19ccc770..36e31eb0 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -3,12 +3,10 @@ using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Modules.Utility diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 4523269d..172282f1 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -4,14 +4,12 @@ using Discord.WebSocket; using NadekoBot.Attributes; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NLog; using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using System.Threading; using System.Threading.Tasks; namespace NadekoBot.Modules.Utility diff --git a/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs b/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs index 12a4b8f3..9c9c0aa0 100644 --- a/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs +++ b/src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs @@ -15,7 +15,6 @@ using System.Net.Http; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Xml; namespace NadekoBot.Modules.Utility { diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index fb4a95a9..c2b5cdae 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -8,11 +8,8 @@ using NadekoBot.Services; using System.Text; using NadekoBot.Extensions; using System.Text.RegularExpressions; -using System.Collections.Generic; using System.Reflection; using Discord.WebSocket; -using System.Net.Http; -using System.IO; namespace NadekoBot.Modules.Utility { diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 9138d3bb..90216742 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -2,25 +2,21 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Services; -using NadekoBot.Services.Database; using NadekoBot.Services.Impl; using NLog; using NLog.Config; using NLog.Targets; using System; -using System.Diagnostics; using System.Linq; using System.Reflection; using System.Threading.Tasks; using System.Collections.Generic; -using System.Collections.ObjectModel; using NadekoBot.Modules.Permissions; using Module = Discord.Commands.Module; using NadekoBot.TypeReaders; using System.Collections.Concurrent; using NadekoBot.Modules.Music; using NadekoBot.Services.Database.Models; -using Microsoft.Extensions.Configuration; namespace NadekoBot { diff --git a/src/NadekoBot/Services/CommandHandler.cs b/src/NadekoBot/Services/CommandHandler.cs index f3f53855..73679395 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/src/NadekoBot/Services/CommandHandler.cs @@ -2,20 +2,16 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; using NLog; using System.Diagnostics; using Discord.Commands; -using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using NadekoBot.Modules.Permissions; -using Microsoft.Data.Sqlite; using Discord.Net; using NadekoBot.Extensions; using static NadekoBot.Modules.Permissions.Permissions; -using System.Collections.Concurrent; using NadekoBot.Modules.Help; using static NadekoBot.Modules.Administration.Administration; using NadekoBot.Modules.CustomReactions; diff --git a/src/NadekoBot/Services/CurrencyHandler.cs b/src/NadekoBot/Services/CurrencyHandler.cs index 24324c77..c12dffec 100644 --- a/src/NadekoBot/Services/CurrencyHandler.cs +++ b/src/NadekoBot/Services/CurrencyHandler.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; -using NadekoBot.Services.Database; using NadekoBot.Extensions; using NadekoBot.Modules.Gambling; using NadekoBot.Services.Database.Models; diff --git a/src/NadekoBot/Services/Database/IUnitOfWork.cs b/src/NadekoBot/Services/Database/IUnitOfWork.cs index 3704bf2f..66359ef2 100644 --- a/src/NadekoBot/Services/Database/IUnitOfWork.cs +++ b/src/NadekoBot/Services/Database/IUnitOfWork.cs @@ -1,8 +1,5 @@ using NadekoBot.Services.Database.Repositories; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Services.Database diff --git a/src/NadekoBot/Services/Database/Impl/NadekoSqlServerContext.cs b/src/NadekoBot/Services/Database/Impl/NadekoSqlServerContext.cs deleted file mode 100644 index c2469b1f..00000000 --- a/src/NadekoBot/Services/Database/Impl/NadekoSqlServerContext.cs +++ /dev/null @@ -1,18 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using System.Threading.Tasks; -//using Microsoft.EntityFrameworkCore; - -//namespace NadekoBot.Services.Database.Impl -//{ -// public class NadekoSqlServerContext : NadekoContext -// { -// protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) -// { -// //CONFIGURE SQL SERVER HERE -// optionsBuilder.UseSqlite("Filename=./NadekoBot.db"); -// } -// } -//} diff --git a/src/NadekoBot/Services/Database/Impl/NadekoSqliteContext.cs b/src/NadekoBot/Services/Database/Impl/NadekoSqliteContext.cs deleted file mode 100644 index c60d0a7c..00000000 --- a/src/NadekoBot/Services/Database/Impl/NadekoSqliteContext.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; - -namespace NadekoBot.Services.Database.Impl -{ - public class NadekoSqliteContext : NadekoContext - { - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - optionsBuilder.UseSqlite(NadekoBot.Credentials.Db.ConnectionString); - } - } -} diff --git a/src/NadekoBot/Services/Database/Models/BotConfig.cs b/src/NadekoBot/Services/Database/Models/BotConfig.cs index b3686b27..e8216c7e 100644 --- a/src/NadekoBot/Services/Database/Models/BotConfig.cs +++ b/src/NadekoBot/Services/Database/Models/BotConfig.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/ClashCaller.cs b/src/NadekoBot/Services/Database/Models/ClashCaller.cs index 719ef9ee..88ad4b78 100644 --- a/src/NadekoBot/Services/Database/Models/ClashCaller.cs +++ b/src/NadekoBot/Services/Database/Models/ClashCaller.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/ClashWar.cs b/src/NadekoBot/Services/Database/Models/ClashWar.cs index 77c77994..8322f5a3 100644 --- a/src/NadekoBot/Services/Database/Models/ClashWar.cs +++ b/src/NadekoBot/Services/Database/Models/ClashWar.cs @@ -1,11 +1,7 @@ using Discord; -using Discord.WebSocket; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/CommandCooldown.cs b/src/NadekoBot/Services/Database/Models/CommandCooldown.cs index e5048f70..6adcf2ad 100644 --- a/src/NadekoBot/Services/Database/Models/CommandCooldown.cs +++ b/src/NadekoBot/Services/Database/Models/CommandCooldown.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class CommandCooldown : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/ConvertUnit.cs b/src/NadekoBot/Services/Database/Models/ConvertUnit.cs index 01b01acd..f31c4ad3 100644 --- a/src/NadekoBot/Services/Database/Models/ConvertUnit.cs +++ b/src/NadekoBot/Services/Database/Models/ConvertUnit.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; +using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/Currency.cs b/src/NadekoBot/Services/Database/Models/Currency.cs index 5bc8b8d5..b86e32e1 100644 --- a/src/NadekoBot/Services/Database/Models/Currency.cs +++ b/src/NadekoBot/Services/Database/Models/Currency.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class Currency : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs b/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs index be36ca5f..243539a3 100644 --- a/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs +++ b/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class CurrencyTransaction : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CustomReaction.cs b/src/NadekoBot/Services/Database/Models/CustomReaction.cs index 3b436060..9ae3ab3b 100644 --- a/src/NadekoBot/Services/Database/Models/CustomReaction.cs +++ b/src/NadekoBot/Services/Database/Models/CustomReaction.cs @@ -1,10 +1,5 @@ -using Discord; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; +using System.ComponentModel.DataAnnotations.Schema; using System.Text.RegularExpressions; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/DbEntity.cs b/src/NadekoBot/Services/Database/Models/DbEntity.cs index 5580f39a..5c7dda6b 100644 --- a/src/NadekoBot/Services/Database/Models/DbEntity.cs +++ b/src/NadekoBot/Services/Database/Models/DbEntity.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/Donator.cs b/src/NadekoBot/Services/Database/Models/Donator.cs index 5376e6f9..da5cd390 100644 --- a/src/NadekoBot/Services/Database/Models/Donator.cs +++ b/src/NadekoBot/Services/Database/Models/Donator.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class Donator : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/FollowedStream.cs b/src/NadekoBot/Services/Database/Models/FollowedStream.cs index b1e8d245..817f003f 100644 --- a/src/NadekoBot/Services/Database/Models/FollowedStream.cs +++ b/src/NadekoBot/Services/Database/Models/FollowedStream.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class FollowedStream : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/GuildConfig.cs b/src/NadekoBot/Services/Database/Models/GuildConfig.cs index fc2bbe43..d8ac0ddc 100644 --- a/src/NadekoBot/Services/Database/Models/GuildConfig.cs +++ b/src/NadekoBot/Services/Database/Models/GuildConfig.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs b/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs index 9a6c384f..40198c7f 100644 --- a/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs +++ b/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class IgnoredLogChannel : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/LogSetting.cs b/src/NadekoBot/Services/Database/Models/LogSetting.cs index 03735dae..b5e841fb 100644 --- a/src/NadekoBot/Services/Database/Models/LogSetting.cs +++ b/src/NadekoBot/Services/Database/Models/LogSetting.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs b/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs index d14d3c01..6978c1f3 100644 --- a/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs +++ b/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/Permission.cs b/src/NadekoBot/Services/Database/Models/Permission.cs index b88de0d3..e12d6d5c 100644 --- a/src/NadekoBot/Services/Database/Models/Permission.cs +++ b/src/NadekoBot/Services/Database/Models/Permission.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; +using System.ComponentModel.DataAnnotations.Schema; using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/PlaylistSong.cs b/src/NadekoBot/Services/Database/Models/PlaylistSong.cs index 166bedd0..06cbb919 100644 --- a/src/NadekoBot/Services/Database/Models/PlaylistSong.cs +++ b/src/NadekoBot/Services/Database/Models/PlaylistSong.cs @@ -1,9 +1,4 @@ using NadekoBot.Modules.Music.Classes; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/Quote.cs b/src/NadekoBot/Services/Database/Models/Quote.cs index 0d769c12..f8a3e308 100644 --- a/src/NadekoBot/Services/Database/Models/Quote.cs +++ b/src/NadekoBot/Services/Database/Models/Quote.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/Reminder.cs b/src/NadekoBot/Services/Database/Models/Reminder.cs index 693cac31..63600de9 100644 --- a/src/NadekoBot/Services/Database/Models/Reminder.cs +++ b/src/NadekoBot/Services/Database/Models/Reminder.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/Repeater.cs b/src/NadekoBot/Services/Database/Models/Repeater.cs index ba5552f9..cf887b43 100644 --- a/src/NadekoBot/Services/Database/Models/Repeater.cs +++ b/src/NadekoBot/Services/Database/Models/Repeater.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Models { diff --git a/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs b/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs index df2593c8..93e70223 100644 --- a/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs +++ b/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class SelfAssignedRole : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs b/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs index a6937c4e..75bced37 100644 --- a/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs +++ b/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Services.Database.Models { public class IgnoredVoicePresenceChannel : DbEntity { diff --git a/src/NadekoBot/Services/Database/NadekoContext.cs b/src/NadekoBot/Services/Database/NadekoContext.cs index 156df04a..5e33bb64 100644 --- a/src/NadekoBot/Services/Database/NadekoContext.cs +++ b/src/NadekoBot/Services/Database/NadekoContext.cs @@ -1,15 +1,12 @@ using Microsoft.EntityFrameworkCore; -using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; -using JetBrains.Annotations; using NadekoBot.Services.Database.Models; using NadekoBot.Extensions; namespace NadekoBot.Services.Database { - public abstract class NadekoContext : DbContext + public class NadekoContext : DbContext { public DbSet Quotes { get; set; } public DbSet Donators { get; set; } @@ -39,7 +36,12 @@ namespace NadekoBot.Services.Database public NadekoContext() { this.Database.Migrate(); - EnsureSeedData(); + } + + public NadekoContext(DbContextOptions options) : base(options) + { + this.Database.Migrate(); + EnsureSeedData(); } public void EnsureSeedData() @@ -214,6 +216,5 @@ namespace NadekoBot.Services.Database #endregion } - protected abstract override void OnConfiguring(DbContextOptionsBuilder optionsBuilder); } } diff --git a/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs index c82ed462..7f9f3dd5 100644 --- a/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs b/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs index 31a4574c..756e9789 100644 --- a/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs @@ -1,9 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs b/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs index c6e545df..1658a16a 100644 --- a/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs @@ -1,9 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs b/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs index 9cada99b..dd583ed9 100644 --- a/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs b/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs index a5daccfc..83d10990 100644 --- a/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs b/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs index 2fb86ea7..d0cfd699 100644 --- a/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs @@ -1,9 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs index 8ca24dde..ca3b651a 100644 --- a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs @@ -1,10 +1,5 @@ using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Database.Repositories.Impl; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs b/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs index 58c870c8..d14b27c2 100644 --- a/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs @@ -1,9 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs b/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs index 7dd06e8b..a3a92efd 100644 --- a/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs @@ -1,8 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories diff --git a/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs b/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs index 8a1ef365..7c643ec7 100644 --- a/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IRepeaterRepository.cs b/src/NadekoBot/Services/Database/Repositories/IRepeaterRepository.cs index 7bd5c67f..2446c275 100644 --- a/src/NadekoBot/Services/Database/Repositories/IRepeaterRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IRepeaterRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IRepository.cs b/src/NadekoBot/Services/Database/Repositories/IRepository.cs index 0beccfb5..d66aae87 100644 --- a/src/NadekoBot/Services/Database/Repositories/IRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IRepository.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.EntityFrameworkCore; +using System.Collections.Generic; using NadekoBot.Services.Database.Models; namespace NadekoBot.Services.Database.Repositories diff --git a/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs b/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs index 805a1537..249ece0a 100644 --- a/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs @@ -1,9 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs b/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs index 147f38d8..527f0de1 100644 --- a/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs @@ -1,8 +1,5 @@ using NadekoBot.Services.Database.Models; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs index 78c4e086..e1ab3893 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs @@ -1,9 +1,5 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs index bbe12205..54a391fa 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs @@ -1,9 +1,6 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs index f9bcdbe7..aac59172 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs @@ -1,9 +1,6 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs index 8a8bffe8..85a23a47 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs index f4c1b5d2..f9b7c819 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs index 5cce62ae..b5c8c269 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using NadekoBot.Services.Database.Models; diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs index 32f88f9d..d90662ba 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs @@ -1,9 +1,6 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using NadekoBot.Modules.Permissions; diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs index 572461ce..50347593 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs @@ -2,8 +2,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs index d0cf8ae9..df8bddb6 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs @@ -1,11 +1,8 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database; namespace NadekoBot.Services.Database.Repositories.Impl { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs index d2e74452..fc7c28ff 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/RepeaterRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/RepeaterRepository.cs index 33885856..94827f95 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/RepeaterRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/RepeaterRepository.cs @@ -1,9 +1,4 @@ using NadekoBot.Services.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs index cf35dec6..b90cf154 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs @@ -1,10 +1,7 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services.Database.Repositories.Impl { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs index 17c4caf0..77926648 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs @@ -1,9 +1,6 @@ using NadekoBot.Services.Database.Models; -using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs index 846fe524..2e3caa50 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs @@ -1,8 +1,6 @@ using NadekoBot.Services.Database.Models; using System; -using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace NadekoBot.Services.Database.Repositories.Impl diff --git a/src/NadekoBot/Services/Database/UnitOfWork.cs b/src/NadekoBot/Services/Database/UnitOfWork.cs index b4dd1e8b..7ba343ee 100644 --- a/src/NadekoBot/Services/Database/UnitOfWork.cs +++ b/src/NadekoBot/Services/Database/UnitOfWork.cs @@ -1,9 +1,6 @@ using NadekoBot.Services.Database.Repositories; using NadekoBot.Services.Database.Repositories.Impl; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; namespace NadekoBot.Services.Database diff --git a/src/NadekoBot/Services/DbHandler.cs b/src/NadekoBot/Services/DbHandler.cs index 169066ba..03d12a94 100644 --- a/src/NadekoBot/Services/DbHandler.cs +++ b/src/NadekoBot/Services/DbHandler.cs @@ -1,27 +1,23 @@ -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Impl; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using NadekoBot.Services.Database; namespace NadekoBot.Services { public class DbHandler { - private Type dbType; - private static DbHandler _instance = null; public static DbHandler Instance = _instance ?? (_instance = new DbHandler()); + private readonly DbContextOptions options; private string connectionString { get; } static DbHandler() { } private DbHandler() { - dbType = typeof(NadekoSqliteContext); connectionString = NadekoBot.Credentials.Db.ConnectionString; + var optionsBuilder = new DbContextOptionsBuilder(); + optionsBuilder.UseSqlite(NadekoBot.Credentials.Db.ConnectionString); + options = optionsBuilder.Options; //switch (NadekoBot.Credentials.Db.Type.ToUpperInvariant()) //{ // case "SQLITE": @@ -37,7 +33,7 @@ namespace NadekoBot.Services } public NadekoContext GetDbContext() => - new NadekoSqliteContext(); + new NadekoContext(options); public IUnitOfWork GetUnitOfWork() => new UnitOfWork(GetDbContext()); diff --git a/src/NadekoBot/Services/IBotCredentials.cs b/src/NadekoBot/Services/IBotCredentials.cs index 1803c315..88bc5986 100644 --- a/src/NadekoBot/Services/IBotCredentials.cs +++ b/src/NadekoBot/Services/IBotCredentials.cs @@ -1,6 +1,4 @@ using Discord; -using System.Collections.Generic; -using System.Linq; namespace NadekoBot.Services { diff --git a/src/NadekoBot/Services/IStatsService.cs b/src/NadekoBot/Services/IStatsService.cs index f43a1cf2..b1cb948f 100644 --- a/src/NadekoBot/Services/IStatsService.cs +++ b/src/NadekoBot/Services/IStatsService.cs @@ -1,9 +1,4 @@ -using Discord.WebSocket; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Threading.Tasks; namespace NadekoBot.Services { diff --git a/src/NadekoBot/Services/Impl/BotCredentials.cs b/src/NadekoBot/Services/Impl/BotCredentials.cs index d1d0d1d4..df2ea353 100644 --- a/src/NadekoBot/Services/Impl/BotCredentials.cs +++ b/src/NadekoBot/Services/Impl/BotCredentials.cs @@ -1,6 +1,5 @@ using Newtonsoft.Json; using System; -using System.Collections.Generic; using System.IO; using Discord; using System.Linq; diff --git a/src/NadekoBot/Services/Impl/GoogleApiService.cs b/src/NadekoBot/Services/Impl/GoogleApiService.cs index 860a379c..cb401476 100644 --- a/src/NadekoBot/Services/Impl/GoogleApiService.cs +++ b/src/NadekoBot/Services/Impl/GoogleApiService.cs @@ -8,7 +8,6 @@ using System.Text.RegularExpressions; using Google.Apis.Urlshortener.v1; using Google.Apis.Urlshortener.v1.Data; using NLog; -using System.Collections; namespace NadekoBot.Services.Impl { diff --git a/src/NadekoBot/Services/Impl/Localization.cs b/src/NadekoBot/Services/Impl/Localization.cs index 7be58e16..0bcecd45 100644 --- a/src/NadekoBot/Services/Impl/Localization.cs +++ b/src/NadekoBot/Services/Impl/Localization.cs @@ -1,6 +1,4 @@ -using System; - -namespace NadekoBot.Services +namespace NadekoBot.Services { public class Localization : ILocalization { diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index f24bbc96..cc567f2e 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -3,10 +3,8 @@ using Discord.WebSocket; using NadekoBot.Extensions; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Net.Http; -using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/src/NadekoBot/Services/NadekoRandom.cs b/src/NadekoBot/Services/NadekoRandom.cs index b75e32fe..0d42c065 100644 --- a/src/NadekoBot/Services/NadekoRandom.cs +++ b/src/NadekoBot/Services/NadekoRandom.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Services { diff --git a/src/NadekoBot/ShardedDiscordClient.cs b/src/NadekoBot/ShardedDiscordClient.cs index afe84ca2..e7b43881 100644 --- a/src/NadekoBot/ShardedDiscordClient.cs +++ b/src/NadekoBot/ShardedDiscordClient.cs @@ -3,13 +3,8 @@ using Discord.WebSocket; using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; -using Discord.API; -using Discord.Logging; -using System.IO; using NLog; -using NadekoBot.Extensions; namespace NadekoBot { diff --git a/src/NadekoBot/TypeReaders/BotCommandTypeReader.cs b/src/NadekoBot/TypeReaders/BotCommandTypeReader.cs index 1ab7869f..91763e8a 100644 --- a/src/NadekoBot/TypeReaders/BotCommandTypeReader.cs +++ b/src/NadekoBot/TypeReaders/BotCommandTypeReader.cs @@ -1,8 +1,5 @@ using Discord.Commands; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; diff --git a/src/NadekoBot/TypeReaders/GuildTypeReader.cs b/src/NadekoBot/TypeReaders/GuildTypeReader.cs index 8863aa00..ab9a5259 100644 --- a/src/NadekoBot/TypeReaders/GuildTypeReader.cs +++ b/src/NadekoBot/TypeReaders/GuildTypeReader.cs @@ -1,11 +1,7 @@ using Discord.Commands; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; -using Discord.WebSocket; namespace NadekoBot.TypeReaders { diff --git a/src/NadekoBot/TypeReaders/ModuleTypeReader.cs b/src/NadekoBot/TypeReaders/ModuleTypeReader.cs index acd3e5a5..366429ec 100644 --- a/src/NadekoBot/TypeReaders/ModuleTypeReader.cs +++ b/src/NadekoBot/TypeReaders/ModuleTypeReader.cs @@ -1,8 +1,5 @@ using Discord.Commands; -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; diff --git a/src/NadekoBot/TypeReaders/PermissionActionTypeReader.cs b/src/NadekoBot/TypeReaders/PermissionActionTypeReader.cs index 1beff942..209f69b1 100644 --- a/src/NadekoBot/TypeReaders/PermissionActionTypeReader.cs +++ b/src/NadekoBot/TypeReaders/PermissionActionTypeReader.cs @@ -1,8 +1,4 @@ using Discord.Commands; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; using NadekoBot.Modules.Permissions; diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/src/NadekoBot/_Extensions/Extensions.cs index 0bf551b8..d2917856 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/src/NadekoBot/_Extensions/Extensions.cs @@ -2,13 +2,11 @@ using Discord.WebSocket; using ImageProcessorCore; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Net; using System.Net.Http; using System.Security.Cryptography; using System.Text;