NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common

This commit is contained in:
Kwoth
2021-12-28 10:44:00 +01:00
parent 0634470a8a
commit 59f5056035
543 changed files with 1895 additions and 1448 deletions

View File

@@ -1,4 +1,4 @@
namespace NadekoBot.Extensions;
namespace NadekoBot.Extensions;
public static class MessageChannelExtensions
{
@@ -7,8 +7,8 @@ public static class MessageChannelExtensions
public static Task<IUserMessage> SendAsync(
this IMessageChannel channel,
string plainText,
Embed embed,
string? plainText,
Embed? embed,
bool sanitizeAll = false)
{
plainText = sanitizeAll ? plainText?.SanitizeAllMentions() ?? "" : plainText?.SanitizeMentions() ?? "";
@@ -32,8 +32,8 @@ public static class MessageChannelExtensions
IEmbedBuilderService eb,
string title,
string error,
string url = null,
string footer = null)
string? url = null,
string? footer = null)
{
var embed = eb.Create().WithErrorColor().WithDescription(error).WithTitle(title);
@@ -58,8 +58,8 @@ public static class MessageChannelExtensions
IEmbedBuilderService eb,
string title,
string text,
string url = null,
string footer = null)
string? url = null,
string? footer = null)
{
var embed = eb.Create().WithOkColor().WithDescription(text).WithTitle(title);
@@ -223,4 +223,4 @@ public static class MessageChannelExtensions
public static Task WarningAsync(this ICommandContext ctx)
=> ctx.Message.AddReactionAsync(new Emoji("⚠️"));
}
}