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,10 +1,5 @@
using Discord;
using Discord.Commands;
using NadekoBot.Common.Attributes;
using NadekoBot.Extensions;
using NadekoBot.Extensions;
using NadekoBot.Modules.Xp.Services;
using System.Threading.Tasks;
using NadekoBot.Db.Models;
namespace NadekoBot.Modules.Xp;

View File

@@ -1,5 +1,4 @@
using Cloneable;
using NadekoBot.Common;
using NadekoBot.Common.Yml;
namespace NadekoBot.Modules.Xp;

View File

@@ -1,5 +1,4 @@
using Newtonsoft.Json;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
namespace NadekoBot.Modules.Xp;
@@ -285,7 +284,7 @@ public class XpRgba32Converter : JsonConverter<Rgba32>
{
public override Rgba32 ReadJson(JsonReader reader, Type objectType, Rgba32 existingValue, bool hasExistingValue, JsonSerializer serializer)
{
return Color.ParseHex(reader.Value.ToString());
return SixLabors.ImageSharp.Color.ParseHex(reader.Value?.ToString());
}
public override void WriteJson(JsonWriter writer, Rgba32 value, JsonSerializer serializer)

View File

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

View File

@@ -1,9 +1,5 @@
using NadekoBot.Db.Models;
using Discord;
using NadekoBot.Extensions;
using System.Net.Http;
using System.Threading.Tasks;
using NadekoBot.Services;
using NadekoBot.Db;
namespace NadekoBot.Modules.Xp.Services;

View File

@@ -1,6 +1,4 @@
using Discord;
namespace NadekoBot.Modules.Xp.Services;
namespace NadekoBot.Modules.Xp.Services;
public class UserCacheItem
{

View File

@@ -1,6 +1,4 @@
using NadekoBot.Common;
using NadekoBot.Common.Configs;
using NadekoBot.Services;
using NadekoBot.Common.Configs;
namespace NadekoBot.Modules.Xp.Services;

View File

@@ -1,6 +1,3 @@
using Discord;
using Discord.WebSocket;
using NadekoBot.Common;
using NadekoBot.Common.Collections;
using NadekoBot.Db.Models;
using NadekoBot.Extensions;
@@ -11,12 +8,7 @@ using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using System.Collections.Concurrent;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services;
using NadekoBot.Services.Database.Models;
using NadekoBot.Db;
using StackExchange.Redis;

View File

@@ -1,12 +1,6 @@
using Discord;
using Discord.Commands;
using Discord.WebSocket;
using NadekoBot.Common.Attributes;
using NadekoBot.Common;
using NadekoBot.Services.Database.Models;
using NadekoBot.Services.Database.Models;
using NadekoBot.Extensions;
using NadekoBot.Modules.Xp.Services;
using System.Threading.Tasks;
using NadekoBot.Modules.Gambling.Services;
namespace NadekoBot.Modules.Xp;