Implicit usings and more global usings

This commit is contained in:
Kwoth
2021-12-21 02:19:21 +01:00
parent 9223d78849
commit c66e491ce9
317 changed files with 272 additions and 1425 deletions

View File

@@ -1,17 +1,9 @@
using Discord; using Microsoft.Extensions.DependencyInjection;
using Discord.Commands;
using Discord.WebSocket;
using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Common;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Diagnostics; using System.Diagnostics;
using System.Net.Http;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks;
using Discord.Net;
using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Common.Configs; using NadekoBot.Common.Configs;
using NadekoBot.Db; using NadekoBot.Db;
@@ -82,11 +74,11 @@ public sealed class Bot
{ {
var startingGuildIdList = GetCurrentGuildIds(); var startingGuildIdList = GetCurrentGuildIds();
var sw = Stopwatch.StartNew(); var sw = Stopwatch.StartNew();
var _bot = Client.CurrentUser; var bot = Client.CurrentUser;
using (var uow = _db.GetDbContext()) using (var uow = _db.GetDbContext())
{ {
uow.EnsureUserCreated(_bot.Id, _bot.Username, _bot.Discriminator, _bot.AvatarId); uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId);
AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList).ToImmutableArray(); AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList).ToImmutableArray();
} }
@@ -199,7 +191,7 @@ public sealed class Bot
} }
var filteredTypes = allTypes var filteredTypes = allTypes
.Where(x => x.IsSubclassOf(typeof(TypeReader)) .Where(x => x.IsSubclassOf(typeof(TypeReader))
&& x.BaseType.GetGenericArguments().Length > 0 && x.BaseType?.GetGenericArguments().Length > 0
&& !x.IsAbstract); && !x.IsAbstract);
var toReturn = new List<object>(); var toReturn = new List<object>();
@@ -207,6 +199,8 @@ public sealed class Bot
{ {
var x = (TypeReader)ActivatorUtilities.CreateInstance(Services, ft); var x = (TypeReader)ActivatorUtilities.CreateInstance(Services, ft);
var baseType = ft.BaseType; var baseType = ft.BaseType;
if (baseType is null)
continue;
var typeArgs = baseType.GetGenericArguments(); var typeArgs = baseType.GetGenericArguments();
_commandService.AddTypeReader(typeArgs[0], x); _commandService.AddTypeReader(typeArgs[0], x);
toReturn.Add(x); toReturn.Add(x);

View File

@@ -1,5 +1,4 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,5 +1,4 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Discord.Commands;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,6 +1,4 @@
using Discord.Commands; namespace Discord;
namespace Discord;
public class BotPermAttribute : RequireBotPermissionAttribute public class BotPermAttribute : RequireBotPermissionAttribute
{ {

View File

@@ -1,6 +1,4 @@
using System.IO; namespace NadekoBot.Common.Attributes;
namespace NadekoBot.Common.Attributes;
public static class CommandNameLoadHelper public static class CommandNameLoadHelper
{ {

View File

@@ -1,6 +1,4 @@
using Discord.Commands; namespace NadekoBot.Common.Attributes;
namespace NadekoBot.Common.Attributes;
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public sealed class DescriptionAttribute : SummaryAttribute public sealed class DescriptionAttribute : SummaryAttribute

View File

@@ -1,5 +1,4 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Discord.Commands;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,6 +1,4 @@
using Discord.Commands; namespace NadekoBot.Common.Attributes;
namespace NadekoBot.Common.Attributes;
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
sealed class NadekoModuleAttribute : GroupAttribute sealed class NadekoModuleAttribute : GroupAttribute

View File

@@ -1,8 +1,5 @@
using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection;
using Discord.Commands;
using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Services;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,7 +1,4 @@
using Discord.Commands; using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Services;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
namespace NadekoBot.Common.Attributes; namespace NadekoBot.Common.Attributes;

View File

@@ -1,6 +1,4 @@
using Discord.Commands; namespace NadekoBot.Common.Attributes;
namespace NadekoBot.Common.Attributes;
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public sealed class UsageAttribute : RemarksAttribute public sealed class UsageAttribute : RemarksAttribute

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection;
using Discord.Commands;
using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
namespace Discord; namespace Discord;

View File

@@ -3,7 +3,6 @@
using System.Collections; using System.Collections;
using System.Diagnostics; using System.Diagnostics;
using System.Threading;
namespace NadekoBot.Common.Collections; namespace NadekoBot.Common.Collections;

View File

@@ -1,10 +1,4 @@
using NadekoBot.Services; namespace NadekoBot.Common;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
using Discord;
namespace NadekoBot.Common;
public class DownloadTracker : INService public class DownloadTracker : INService
{ {

View File

@@ -1,6 +1,4 @@
using Discord; namespace NadekoBot.Extensions;
namespace NadekoBot.Extensions;
public static class BotCredentialsExtensions public static class BotCredentialsExtensions
{ {

View File

@@ -1,8 +1,6 @@
using System.Reflection; using System.Reflection;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Common;
using NadekoBot.Modules.Music; using NadekoBot.Modules.Music;
using NadekoBot.Services;
using NadekoBot.Modules.Music.Resolvers; using NadekoBot.Modules.Music.Resolvers;
using NadekoBot.Modules.Music.Services; using NadekoBot.Modules.Music.Services;
using StackExchange.Redis; using StackExchange.Redis;

View File

@@ -1,6 +1,4 @@
using NadekoBot.Common; namespace NadekoBot;
namespace NadekoBot;
public interface IBotCredentials public interface IBotCredentials
{ {

View File

@@ -1,6 +1,4 @@
using Discord; namespace NadekoBot;
namespace NadekoBot;
public interface IEmbedBuilder public interface IEmbedBuilder
{ {

View File

@@ -1,6 +1,5 @@
using System.Net; using System.Net;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Discord.Net;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.ModuleBehaviors;
using Discord;
namespace NadekoBot.Common.ModuleBehaviors;
/// <summary> /// <summary>
/// Implemented by modules which block execution before anything is executed /// Implemented by modules which block execution before anything is executed

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.ModuleBehaviors;
using Discord;
namespace NadekoBot.Common.ModuleBehaviors;
public interface IInputTransformer public interface IInputTransformer
{ {

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.ModuleBehaviors;
using Discord.Commands;
namespace NadekoBot.Common.ModuleBehaviors;
public interface ILateBlocker public interface ILateBlocker
{ {

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.ModuleBehaviors;
using Discord;
namespace NadekoBot.Common.ModuleBehaviors;
/// <summary> /// <summary>
/// Last thing to be executed, won't stop further executions /// Last thing to be executed, won't stop further executions

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.ModuleBehaviors;
namespace NadekoBot.Common.ModuleBehaviors;
/// <summary> /// <summary>
/// All services which need to execute something after /// All services which need to execute something after

View File

@@ -1,10 +1,5 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Services;
using NadekoBot.Extensions;
using System.Globalization; using System.Globalization;
using System.Threading.Tasks;
namespace NadekoBot.Modules; namespace NadekoBot.Modules;

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common;
using Discord.Commands;
namespace NadekoBot.Common;
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
public sealed class NoPublicBotAttribute : PreconditionAttribute public sealed class NoPublicBotAttribute : PreconditionAttribute

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common;
namespace NadekoBot.Common;
public class EventPubSub : IPubSub public class EventPubSub : IPubSub
{ {

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common;
namespace NadekoBot.Common;
public interface IPubSub public interface IPubSub
{ {

View File

@@ -1,5 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Extensions;
using NadekoBot.Extensions;
using StackExchange.Redis; using StackExchange.Redis;
namespace NadekoBot.Common; namespace NadekoBot.Common;

View File

@@ -1,12 +1,8 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Collections.Concurrent;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace NadekoBot.Common.Replacements; namespace NadekoBot.Common;
public class ReplacementBuilder public class ReplacementBuilder
{ {

View File

@@ -1,6 +1,6 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace NadekoBot.Common.Replacements; namespace NadekoBot.Common;
public class Replacer public class Replacer
{ {

View File

@@ -1,5 +1,4 @@
using Discord; using NadekoBot.Extensions;
using NadekoBot.Extensions;
namespace NadekoBot; namespace NadekoBot;

View File

@@ -1,8 +1,4 @@
using Discord; namespace NadekoBot.Common;
using Discord.WebSocket;
using System.Threading.Tasks;
namespace NadekoBot.Common;
public sealed class ReactionEventWrapper : IDisposable public sealed class ReactionEventWrapper : IDisposable
{ {

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Modules.CustomReactions.Services;
using Discord.Commands;
using NadekoBot.Services;
using NadekoBot.Modules.CustomReactions.Services;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,8 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.TypeReaders;
using Discord;
using Discord.Commands;
namespace NadekoBot.Common.TypeReaders;
public sealed class EmoteTypeReader : NadekoTypeReader<Emote> public sealed class EmoteTypeReader : NadekoTypeReader<Emote>
{ {

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Modules.Administration.Services;
using Discord.Commands;
using NadekoBot.Modules.Administration.Services;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,9 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.TypeReaders;
using Discord.Commands;
using Discord.WebSocket;
using Discord;
namespace NadekoBot.Common.TypeReaders;
public sealed class GuildTypeReader : NadekoTypeReader<IGuild> public sealed class GuildTypeReader : NadekoTypeReader<IGuild>
{ {

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.TypeReaders;
using Discord.Commands;
namespace NadekoBot.Common.TypeReaders;
public sealed class KwumTypeReader : NadekoTypeReader<kwum> public sealed class KwumTypeReader : NadekoTypeReader<kwum>
{ {

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Extensions;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,7 +1,4 @@
using System.Threading.Tasks; namespace NadekoBot.Common.TypeReaders;
using Discord.Commands;
namespace NadekoBot.Common.TypeReaders;
public abstract class NadekoTypeReader<T> : TypeReader public abstract class NadekoTypeReader<T> : TypeReader
{ {

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Common.TypeReaders.Models;
using Discord.Commands;
using NadekoBot.Common.TypeReaders.Models;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,8 +1,5 @@
using System.Threading.Tasks; namespace NadekoBot.Common.TypeReaders;
using Discord.Commands; using Color = SixLabors.ImageSharp.Color;
using SixLabors.ImageSharp;
namespace NadekoBot.Common.TypeReaders;
public sealed class Rgba32TypeReader : NadekoTypeReader<Color> public sealed class Rgba32TypeReader : NadekoTypeReader<Color>
{ {

View File

@@ -1,9 +1,6 @@
using Discord.Commands; using System.Text.RegularExpressions;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using NadekoBot.Db; using NadekoBot.Db;
using NadekoBot.Modules.Gambling.Services; using NadekoBot.Modules.Gambling.Services;
using NadekoBot.Services;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,6 +1,4 @@
using Discord.Commands; using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Common.TypeReaders.Models;
using System.Threading.Tasks;
namespace NadekoBot.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders;

View File

@@ -1,6 +1,5 @@
using NadekoBot.Db.Models; using NadekoBot.Db.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Discord;
using LinqToDB; using LinqToDB;
using LinqToDB.EntityFrameworkCore; using LinqToDB.EntityFrameworkCore;
using NadekoBot.Services.Database; using NadekoBot.Services.Database;

View File

@@ -1,5 +1,4 @@
using System.Threading.Tasks; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,7 +1,5 @@
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Common;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,6 +1,5 @@
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
namespace NadekoBot.Db; namespace NadekoBot.Db;

View File

@@ -1,6 +1,4 @@
using Discord; namespace NadekoBot.Services.Database.Models;
namespace NadekoBot.Services.Database.Models;
public class DiscordPermOverride : DbEntity public class DiscordPermOverride : DbEntity
{ {

View File

@@ -4,15 +4,26 @@ public class FilterChannelId : DbEntity
{ {
public ulong ChannelId { get; set; } public ulong ChannelId { get; set; }
public override bool Equals(object obj) public bool Equals(FilterChannelId other)
{ => ChannelId == other.ChannelId;
return obj is FilterChannelId f
? f.ChannelId == ChannelId
: false;
}
public override int GetHashCode() public override bool Equals(object obj)
{ => obj is FilterChannelId fci && Equals(fci);
return ChannelId.GetHashCode();
} public override int GetHashCode()
=> ChannelId.GetHashCode();
}
public class FilterInvitesChannelId : DbEntity
{
public ulong ChannelId { get; set; }
public bool Equals(FilterInvitesChannelId other)
=> ChannelId == other.ChannelId;
public override bool Equals(object obj)
=> obj is FilterInvitesChannelId fci && Equals(fci);
public override int GetHashCode()
=> ChannelId.GetHashCode();
} }

View File

@@ -5,14 +5,9 @@ public class FilterLinksChannelId : DbEntity
public ulong ChannelId { get; set; } public ulong ChannelId { get; set; }
public override bool Equals(object obj) public override bool Equals(object obj)
{ => obj is FilterLinksChannelId f
return obj is FilterLinksChannelId f && f.ChannelId == ChannelId;
? f.ChannelId == ChannelId
: false;
}
public override int GetHashCode() public override int GetHashCode()
{ => ChannelId.GetHashCode();
return ChannelId.GetHashCode();
}
} }

View File

@@ -1,6 +1,4 @@
using Discord; namespace NadekoBot.Services.Database.Models;
namespace NadekoBot.Services.Database.Models;
public class RotatingPlayingStatus : DbEntity public class RotatingPlayingStatus : DbEntity
{ {

View File

@@ -2,7 +2,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design; using Microsoft.EntityFrameworkCore.Design;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using System.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NadekoBot.Db.Models; using NadekoBot.Db.Models;

View File

@@ -0,0 +1,13 @@
global using Serilog;
global using NadekoBot;
global using NadekoBot.Services;
global using NadekoBot.Common;
global using NadekoBot.Common.Attributes;
global using Discord;
global using Discord.Commands;
global using Discord.Net;
global using Discord.WebSocket;
global using System.Collections.Concurrent;

View File

@@ -1,11 +1,6 @@
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Common.Attributes;
using NadekoBot.Common.TypeReaders.Models; using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,8 +1,4 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Extensions;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,7 +1,4 @@
using System.Collections.Concurrent; using NadekoBot.Common.Collections;
using System.Threading;
using Discord;
using NadekoBot.Common.Collections;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Administration.Common; namespace NadekoBot.Modules.Administration.Common;

View File

@@ -1,5 +1,4 @@
using Discord; using NadekoBot.Services.Database.Models;
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Administration.Common; namespace NadekoBot.Modules.Administration.Common;

View File

@@ -1,8 +1,4 @@
using System.Collections.Concurrent; namespace NadekoBot.Modules.Administration.Common;
using System.Threading;
using Discord;
namespace NadekoBot.Modules.Administration.Common;
public sealed class UserSpamStats : IDisposable public sealed class UserSpamStats : IDisposable
{ {

View File

@@ -1,8 +1,4 @@
using Discord.Commands; using NadekoBot.Extensions;
using NadekoBot.Common.Attributes;
using NadekoBot.Extensions;
using System.Threading.Tasks;
using Discord;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
#if !GLOBAL_NADEKO #if !GLOBAL_NADEKO

View File

@@ -1,8 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Common.TypeReaders;
using Discord;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Common.TypeReaders;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;

View File

@@ -1,8 +1,4 @@
using Discord; using NadekoBot.Modules.Administration.Services;
using Discord.Commands;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Administration.Services;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,9 +1,5 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Extensions;
using System.Globalization; using System.Globalization;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,12 +1,7 @@
using Discord; using NadekoBot.Common.TypeReaders.Models;
using Discord.Commands;
using NadekoBot.Common;
using NadekoBot.Common.Attributes;
using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,10 +1,5 @@
using Discord; using NadekoBot.Common.TypeReaders.Models;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
using Discord.WebSocket;
using NadekoBot.Extensions; using NadekoBot.Extensions;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,8 +1,4 @@
using Discord.Commands; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Administration.Services;
using Discord;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,9 +1,4 @@
using Discord; namespace NadekoBot.Modules.Administration;
using Discord.Commands;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
namespace NadekoBot.Modules.Administration;
public partial class Administration public partial class Administration
{ {

View File

@@ -1,11 +1,7 @@
using Discord; using NadekoBot.Services.Database.Models;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Common; using NadekoBot.Modules.Administration.Common;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
using NadekoBot.Common.TypeReaders.Models; using NadekoBot.Common.TypeReaders.Models;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,8 +1,4 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Extensions;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using ITextChannel = Discord.ITextChannel; using ITextChannel = Discord.ITextChannel;

View File

@@ -1,14 +1,8 @@
using Discord; using NadekoBot.Services.Database.Models;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Common;
using NadekoBot.Common.Attributes;
using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using System.Net; using System.Net;
using System.Threading.Tasks;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,8 +1,4 @@
using System.Text; using System.Text;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using NadekoBot.Extensions; using NadekoBot.Extensions;

View File

@@ -1,14 +1,6 @@
using Discord;
using Discord.Commands;
using Discord.Net;
using Discord.WebSocket;
using NadekoBot.Common.Attributes;
using NadekoBot.Common.Replacements;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
using NadekoBot.Services;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,9 +1,4 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Extensions;
using NadekoBot.Services;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,14 +1,7 @@
using Discord; using Microsoft.EntityFrameworkCore;
using Discord.Commands;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.Collections; using NadekoBot.Common.Collections;
using NadekoBot.Common.Replacements;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using NadekoBot.Db; using NadekoBot.Db;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,8 +1,4 @@
using System.Collections.Concurrent; using System.Threading.Channels;
using System.Threading.Tasks;
using Discord.WebSocket;
using NadekoBot.Services;
using System.Threading.Channels;
using LinqToDB; using LinqToDB;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;

View File

@@ -1,6 +1,4 @@
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Services;
using LinqToDB; using LinqToDB;
using LinqToDB.EntityFrameworkCore; using LinqToDB.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;

View File

@@ -1,10 +1,5 @@
using System.Collections.Concurrent; using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;

View File

@@ -1,8 +1,5 @@
using System.Threading.Tasks; using NadekoBot.Common.Collections;
using Discord.WebSocket;
using NadekoBot.Common.Collections;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Services;
using NadekoBot.Db; using NadekoBot.Db;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,9 +1,5 @@
using System.Collections.Concurrent; using NadekoBot.Extensions;
using Discord.WebSocket;
using NadekoBot.Extensions;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using System.Threading.Tasks;
using NadekoBot.Db; using NadekoBot.Db;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,16 +1,10 @@
using System.Collections.Concurrent; using System.Net;
using System.Net;
using System.Threading.Channels; using System.Threading.Channels;
using System.Threading.Tasks;
using Discord;
using Discord.Net;
using Discord.WebSocket;
using LinqToDB; using LinqToDB;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
using NadekoBot.Common.Collections; using NadekoBot.Common.Collections;
using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Services;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,12 +1,6 @@
using System.Collections.Concurrent; using Microsoft.EntityFrameworkCore;
using System.Threading;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
using NadekoBot.Common.Collections; using NadekoBot.Common.Collections;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Db; using NadekoBot.Db;
using NadekoBot.Extensions; using NadekoBot.Extensions;

View File

@@ -1,12 +1,6 @@
using System.Collections.Concurrent; using Microsoft.EntityFrameworkCore;
using System.Threading;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.Collections; using NadekoBot.Common.Collections;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Db; using NadekoBot.Db;

View File

@@ -1,12 +1,5 @@
using System.Threading; using NadekoBot.Services.Database.Models;
using Discord.WebSocket;
using NadekoBot.Common.Replacements;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models;
using Discord;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Common;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,10 +1,5 @@
using System.Collections.Concurrent; using System.Threading.Channels;
using System.Threading.Channels;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using NadekoBot.Modules.Administration.Common; using NadekoBot.Modules.Administration.Common;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;

View File

@@ -1,8 +1,5 @@
using System.Threading.Tasks; using NadekoBot.Common.Collections;
using Discord;
using NadekoBot.Common.Collections;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Services;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,16 +1,10 @@
using Discord; using Microsoft.EntityFrameworkCore;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.Collections; using NadekoBot.Common.Collections;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using LinqToDB; using LinqToDB;
using LinqToDB.EntityFrameworkCore; using LinqToDB.EntityFrameworkCore;
using NadekoBot.Db; using NadekoBot.Db;
using System.Threading;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,7 +1,4 @@
using Discord; using NadekoBot.Services.Database.Models;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Db; using NadekoBot.Db;
using NadekoBot.Modules.Xp; using NadekoBot.Modules.Xp;

View File

@@ -1,16 +1,8 @@
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Services;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using System.Threading;
using System.Collections.Concurrent;
using System.Net.Http;
using NadekoBot.Common;
namespace NadekoBot.Modules.Administration.Services; namespace NadekoBot.Modules.Administration.Services;

View File

@@ -1,12 +1,5 @@
using System.Threading;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.Replacements;
using NadekoBot.Common.TypeReaders.Models; using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Db; using NadekoBot.Db;
using NadekoBot.Extensions; using NadekoBot.Extensions;

View File

@@ -1,9 +1,4 @@
using System.Collections.Concurrent; using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Db; using NadekoBot.Db;

View File

@@ -1,8 +1,4 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Extensions;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,14 +1,8 @@
using CommandLine; using CommandLine;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Common.Attributes;
using NadekoBot.Common;
using NadekoBot.Common.TypeReaders.Models; using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
using System.Threading.Tasks;
using NadekoBot.Modules.Permissions.Services; using NadekoBot.Modules.Permissions.Services;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,10 +1,4 @@
using System.Collections.Concurrent; using NadekoBot.Extensions;
using Discord;
using Discord.Commands;
using System.Threading.Tasks;
using Discord.WebSocket;
using NadekoBot.Common.Attributes;
using NadekoBot.Extensions;
using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Administration.Services;
namespace NadekoBot.Modules.Administration; namespace NadekoBot.Modules.Administration;

View File

@@ -1,5 +1,4 @@
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Common;
namespace NadekoBot.Modules.CustomReactions; namespace NadekoBot.Modules.CustomReactions;

View File

@@ -1,11 +1,5 @@
using Discord; using NadekoBot.Extensions;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Extensions;
using NadekoBot.Modules.CustomReactions.Services; using NadekoBot.Modules.CustomReactions.Services;
using System.Net.Http;
using System.Threading.Tasks;
using NadekoBot.Common;
namespace NadekoBot.Modules.CustomReactions; namespace NadekoBot.Modules.CustomReactions;

View File

@@ -1,10 +1,6 @@
using Discord; using NadekoBot.Services.Database.Models;
using Discord.WebSocket;
using NadekoBot.Common.Replacements;
using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace NadekoBot.Modules.CustomReactions.Extensions; namespace NadekoBot.Modules.CustomReactions.Extensions;

View File

@@ -1,16 +1,10 @@
using Discord; using NadekoBot.Common.ModuleBehaviors;
using Discord.WebSocket;
using NadekoBot.Common;
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models; using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using NadekoBot.Modules.CustomReactions.Extensions; using NadekoBot.Modules.CustomReactions.Extensions;
using NadekoBot.Modules.Permissions.Common; using NadekoBot.Modules.Permissions.Common;
using NadekoBot.Modules.Permissions.Services; using NadekoBot.Modules.Permissions.Services;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.Yml; using NadekoBot.Common.Yml;
using NadekoBot.Db; using NadekoBot.Db;

View File

@@ -1,11 +1,4 @@
using System.Threading.Tasks; using NadekoBot.Modules.Gambling.Common;
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Common.Attributes;
using NadekoBot.Common;
using NadekoBot.Services;
using NadekoBot.Modules.Gambling.Common;
using NadekoBot.Modules.Gambling.Common.AnimalRacing; using NadekoBot.Modules.Gambling.Common.AnimalRacing;
using NadekoBot.Modules.Gambling.Services; using NadekoBot.Modules.Gambling.Services;
using NadekoBot.Extensions; using NadekoBot.Extensions;

View File

@@ -1,13 +1,7 @@
using Discord; using NadekoBot.Modules.Gambling.Common;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Common;
using NadekoBot.Modules.Gambling.Common;
using NadekoBot.Modules.Gambling.Common.Blackjack; using NadekoBot.Modules.Gambling.Common.Blackjack;
using NadekoBot.Modules.Gambling.Services; using NadekoBot.Modules.Gambling.Services;
using NadekoBot.Extensions; using NadekoBot.Extensions;
using System.Threading.Tasks;
using NadekoBot.Services;
namespace NadekoBot.Modules.Gambling; namespace NadekoBot.Modules.Gambling;

View File

@@ -1,8 +1,4 @@
using System.Threading; using NadekoBot.Extensions;
using System.Threading.Tasks;
using NadekoBot.Common;
using NadekoBot.Services;
using NadekoBot.Extensions;
using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
using NadekoBot.Modules.Games.Common; using NadekoBot.Modules.Games.Common;

Some files were not shown because too many files have changed in this diff Show More