mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
#nullable disable
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
@@ -86,4 +87,4 @@ public sealed class BehaviorExecutor : IBehaviourExecutor, INService
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
#nullable disable
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using NadekoBot.Common.Yml;
|
||||
using Newtonsoft.Json;
|
||||
@@ -173,4 +174,4 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||
}
|
||||
|
||||
public IBotCredentials GetCreds() => _creds;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Services.Database;
|
||||
#nullable disable
|
||||
using NadekoBot.Services.Database;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
using NadekoBot.Db;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
@@ -143,4 +144,4 @@ public class CurrencyService : ICurrencyService, INService
|
||||
|
||||
public Task<bool> RemoveAsync(IUser user, string reason, long amount, bool sendMessage = false, bool gamble = false)
|
||||
=> InternalRemoveAsync(user.Id, user.Username, user.Discriminator, user.AvatarId, reason, amount, gamble);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using SixLabors.Fonts;
|
||||
#nullable disable
|
||||
using SixLabors.Fonts;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
@@ -59,4 +60,4 @@ public class FontProvider : INService
|
||||
/// </summary>
|
||||
public Font RipFont { get; }
|
||||
public List<FontFamily> FallBackFonts { get; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Google;
|
||||
#nullable disable
|
||||
using Google;
|
||||
using Google.Apis.Customsearch.v1;
|
||||
using Google.Apis.Services;
|
||||
using Google.Apis.Urlshortener.v1;
|
||||
@@ -378,4 +379,4 @@ public class GoogleApiService : IGoogleApiService, INService
|
||||
Languages.TryGetValue(language, out var mode);
|
||||
return mode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Globalization;
|
||||
#nullable disable
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using NadekoBot.Db;
|
||||
|
||||
@@ -107,4 +108,4 @@ public class Localization : ILocalization, INService
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
#nullable disable
|
||||
using Newtonsoft.Json;
|
||||
using StackExchange.Redis;
|
||||
using System.Net;
|
||||
|
||||
@@ -205,4 +206,4 @@ public class RedisCache : IDataCache
|
||||
|
||||
db.StringSet($"{_redisKey}_last_currency_decay", JsonConvert.SerializeObject(DateTime.UtcNow));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Services;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
public static class RedisImageExtensions
|
||||
{
|
||||
@@ -7,4 +8,4 @@ public static class RedisImageExtensions
|
||||
|
||||
public static Uri ToNewCdn(this Uri uri)
|
||||
=> new(uri.ToString().Replace(OldCdnUrl, NewCdnUrl));
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
#nullable disable
|
||||
using Newtonsoft.Json;
|
||||
using StackExchange.Redis;
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
using NadekoBot.Common.Yml;
|
||||
@@ -275,4 +276,4 @@ public sealed class RedisImagesCache : IImageCache, IReadyExecutor
|
||||
|
||||
private RedisKey GetRedisKey(ImageKeys key)
|
||||
=> _creds.RedisKey() + "_image_" + key;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Common.Pokemon;
|
||||
#nullable disable
|
||||
using NadekoBot.Common.Pokemon;
|
||||
using NadekoBot.Modules.Games.Common.Trivia;
|
||||
using Newtonsoft.Json;
|
||||
using StackExchange.Redis;
|
||||
@@ -89,4 +90,4 @@ public class RedisLocalDataCache : ILocalDataCache
|
||||
|
||||
private void Set(string key, object obj)
|
||||
=> _con.GetDatabase().StringSet($"{_creds.RedisKey()}_localdata_{key}", JsonConvert.SerializeObject(obj));
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Grpc.Core;
|
||||
#nullable disable
|
||||
using Grpc.Core;
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
using NadekoBot.Coordinator;
|
||||
|
||||
@@ -129,4 +130,4 @@ public class RemoteGrpcCoordinator : ICoordinator, IReadyExecutor
|
||||
ConnState.Connected => ConnectionState.Connected,
|
||||
_ => ConnectionState.Disconnected
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
#nullable disable
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
@@ -53,4 +54,4 @@ public class SingleProcessCoordinator : ICoordinator
|
||||
|
||||
public Task Reload()
|
||||
=> Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
#nullable disable
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
@@ -68,4 +69,4 @@ public class SoundCloudUser
|
||||
{
|
||||
[JsonProperty("username")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Immutable;
|
||||
#nullable disable
|
||||
using System.Collections.Immutable;
|
||||
using System.Collections;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
@@ -15,4 +16,4 @@ public class StartingGuildsService : IEnumerable<ulong>, INService
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() =>
|
||||
_guilds.GetEnumerator();
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
#nullable disable
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
@@ -169,4 +170,4 @@ public class StatsService : IStatsService, IReadyExecutor, INService, IDisposabl
|
||||
_currentProcess.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
@@ -70,4 +71,4 @@ public class YtdlOperation
|
||||
while((line = await process.StandardOutput.ReadLineAsync()) != null)
|
||||
yield return line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user