mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Implicit usings and more global usings
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord.Commands;
|
||||
|
||||
namespace Discord;
|
||||
namespace Discord;
|
||||
|
||||
public class BotPermAttribute : RequireBotPermissionAttribute
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.IO;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
public static class CommandNameLoadHelper
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class DescriptionAttribute : SummaryAttribute
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
sealed class NadekoModuleAttribute : GroupAttribute
|
||||
|
@@ -1,8 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Services;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Services;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
namespace NadekoBot.Common.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class UsageAttribute : RemarksAttribute
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NadekoBot.Modules.Administration.Services;
|
||||
|
||||
namespace Discord;
|
||||
|
@@ -3,7 +3,6 @@
|
||||
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace NadekoBot.Common.Collections;
|
||||
|
||||
|
@@ -1,10 +1,4 @@
|
||||
using NadekoBot.Services;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public class DownloadTracker : INService
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
namespace NadekoBot.Extensions;
|
||||
|
||||
public static class BotCredentialsExtensions
|
||||
{
|
||||
|
@@ -1,8 +1,6 @@
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NadekoBot.Common;
|
||||
using NadekoBot.Modules.Music;
|
||||
using NadekoBot.Services;
|
||||
using NadekoBot.Modules.Music.Resolvers;
|
||||
using NadekoBot.Modules.Music.Services;
|
||||
using StackExchange.Redis;
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using NadekoBot.Common;
|
||||
|
||||
namespace NadekoBot;
|
||||
namespace NadekoBot;
|
||||
|
||||
public interface IBotCredentials
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot;
|
||||
namespace NadekoBot;
|
||||
|
||||
public interface IEmbedBuilder
|
||||
{
|
||||
|
@@ -1,6 +1,5 @@
|
||||
using System.Net;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Discord.Net;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
|
||||
/// <summary>
|
||||
/// Implemented by modules which block execution before anything is executed
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
|
||||
public interface IInputTransformer
|
||||
{
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
|
||||
public interface ILateBlocker
|
||||
{
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
|
||||
/// <summary>
|
||||
/// Last thing to be executed, won't stop further executions
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
namespace NadekoBot.Common.ModuleBehaviors;
|
||||
|
||||
/// <summary>
|
||||
/// All services which need to execute something after
|
||||
|
@@ -1,10 +1,5 @@
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Discord.WebSocket;
|
||||
using NadekoBot.Services;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Extensions;
|
||||
using System.Globalization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Modules;
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
|
||||
public sealed class NoPublicBotAttribute : PreconditionAttribute
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public class EventPubSub : IPubSub
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public interface IPubSub
|
||||
{
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Extensions;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
|
@@ -1,12 +1,8 @@
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Discord.WebSocket;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Modules.Administration.Services;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace NadekoBot.Common.Replacements;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public class ReplacementBuilder
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace NadekoBot.Common.Replacements;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public class Replacer
|
||||
{
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using Discord;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot;
|
||||
|
||||
|
@@ -1,8 +1,4 @@
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Common;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public sealed class ReactionEventWrapper : IDisposable
|
||||
{
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Services;
|
||||
using NadekoBot.Modules.CustomReactions.Services;
|
||||
using NadekoBot.Modules.CustomReactions.Services;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
|
@@ -1,8 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
public sealed class EmoteTypeReader : NadekoTypeReader<Emote>
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Modules.Administration.Services;
|
||||
using NadekoBot.Modules.Administration.Services;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
|
@@ -1,9 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using Discord.WebSocket;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
public sealed class GuildTypeReader : NadekoTypeReader<IGuild>
|
||||
{
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
public sealed class KwumTypeReader : NadekoTypeReader<kwum>
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Extensions;
|
||||
using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
public abstract class NadekoTypeReader<T> : TypeReader
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Common.TypeReaders.Models;
|
||||
using NadekoBot.Common.TypeReaders.Models;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
|
@@ -1,8 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord.Commands;
|
||||
using SixLabors.ImageSharp;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
using Color = SixLabors.ImageSharp.Color;
|
||||
|
||||
public sealed class Rgba32TypeReader : NadekoTypeReader<Color>
|
||||
{
|
||||
|
@@ -1,9 +1,6 @@
|
||||
using Discord.Commands;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.RegularExpressions;
|
||||
using NadekoBot.Db;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Services;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Common.TypeReaders.Models;
|
||||
using System.Threading.Tasks;
|
||||
using NadekoBot.Common.TypeReaders.Models;
|
||||
|
||||
namespace NadekoBot.Common.TypeReaders;
|
||||
|
||||
|
Reference in New Issue
Block a user