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,5 @@
using NadekoBot.Common.TypeReaders;
#nullable disable
using NadekoBot.Common.TypeReaders;
using NadekoBot.Services.Database.Models;
using NadekoBot.Modules.Permissions.Services;
@@ -142,4 +143,4 @@ public partial class Permissions
Format.Code(id.ToString())));
}
}
}
}

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
#nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models;
using NadekoBot.Common.TypeReaders;
using NadekoBot.Db;
@@ -85,4 +86,4 @@ public partial class Permissions
await channel.SendTableAsync("", localSet.Select(c => c.CommandName + ": " + c.Seconds + GetText(strs.sec)), s => $"{s,-30}", 2).ConfigureAwait(false);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Services.Database.Models;
#nullable disable
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Permissions.Common;
@@ -7,4 +8,4 @@ public class PermissionCache
public string PermRole { get; set; }
public bool Verbose { get; set; } = true;
public PermissionsCollection<Permissionv2> Permissions { get; set; }
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Services.Database.Models;
#nullable disable
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Permissions.Common;
@@ -117,4 +118,4 @@ public static class PermissionExtensions
return prefix + com;
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.Collections;
#nullable disable
using NadekoBot.Common.Collections;
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Permissions.Common;
@@ -67,4 +68,4 @@ public class PermissionsCollection<T> : IndexedCollection<T> where T : class, II
}
}
}
}
}

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
#nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Modules.Permissions.Services;
using NadekoBot.Services.Database.Models;
using NadekoBot.Db;
@@ -283,4 +284,4 @@ public partial class Permissions
, fws.Length, 10).ConfigureAwait(false);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.TypeReaders;
#nullable disable
using NadekoBot.Common.TypeReaders;
using NadekoBot.Modules.Permissions.Services;
namespace NadekoBot.Modules.Permissions;
@@ -77,4 +78,4 @@ public partial class Permissions
await ReplyConfirmLocalizedAsync(strs.gcmd_remove(Format.Bold(cmd.Name))).ConfigureAwait(false);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Services.Database.Models;
#nullable disable
using NadekoBot.Services.Database.Models;
using NadekoBot.Common.TypeReaders;
using NadekoBot.Common.TypeReaders.Models;
using NadekoBot.Db;
@@ -560,4 +561,4 @@ public partial class Permissions : NadekoModule<PermissionService>
await ReplyConfirmLocalizedAsync(strs.asm_disable).ConfigureAwait(false);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Modules.Permissions.Services;
#nullable disable
using NadekoBot.Modules.Permissions.Services;
namespace NadekoBot.Modules.Permissions;
@@ -33,4 +34,4 @@ public partial class Permissions
await ReplyConfirmLocalizedAsync(strs.global_perms_reset).ConfigureAwait(false);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.ModuleBehaviors;
#nullable disable
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Services.Database.Models;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Db;
@@ -126,4 +127,4 @@ public sealed class BlacklistService : IEarlyBehavior
Reload(true);
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.ModuleBehaviors;
#nullable disable
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Permissions.Services;
@@ -67,4 +68,4 @@ public class ActiveCooldown
{
public string Command { get; set; }
public ulong UserId { get; set; }
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.ModuleBehaviors;
#nullable disable
using NadekoBot.Common.ModuleBehaviors;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models;
using NadekoBot.Db;
@@ -216,4 +217,4 @@ public sealed class FilterService : IEarlyBehavior
}
return false;
}
}
}

View File

@@ -1,4 +1,5 @@
using NadekoBot.Common.ModuleBehaviors;
#nullable disable
using NadekoBot.Common.ModuleBehaviors;
namespace NadekoBot.Modules.Permissions.Services;
@@ -90,4 +91,4 @@ public class GlobalPermissionService : ILateBlocker, INService
return Task.CompletedTask;
}
}
}

View File

@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
#nullable disable
using Microsoft.EntityFrameworkCore;
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Modules.Permissions.Common;
using NadekoBot.Services.Database.Models;
@@ -170,4 +171,4 @@ public class PermissionService : ILateBlocker, INService
await uow.SaveChangesAsync();
UpdateCache(config);
}
}
}