mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Using generic attributes for NadekoOptions now. Updated packages
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NonBlocking" Version="2.1.0" />
|
<PackageReference Include="NonBlocking" Version="2.1.1" />
|
||||||
|
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Discord.Net.Core" Version="3.104.0" />
|
<PackageReference Include="Discord.Net.Core" Version="3.104.0" />
|
||||||
<PackageReference Include="Serilog" Version="2.11.0" />
|
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
<PackageReference Include="YamlDotNet" Version="12.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Version)' == '' ">
|
<PropertyGroup Condition=" '$(Version)' == '' ">
|
||||||
|
@@ -10,11 +10,11 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Grpc.AspNetCore" Version="2.47.0" />
|
<PackageReference Include="Grpc.AspNetCore" Version="2.51.0" />
|
||||||
<PackageReference Include="Serilog" Version="2.11.0" />
|
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
<PackageReference Include="YamlDotNet" Version="12.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -1,336 +0,0 @@
|
|||||||
// #nullable enable
|
|
||||||
// using System;
|
|
||||||
// using System.CodeDom.Compiler;
|
|
||||||
// using System.Collections.Generic;
|
|
||||||
// using System.Collections.Immutable;
|
|
||||||
// using System.Collections.ObjectModel;
|
|
||||||
// using System.Diagnostics;
|
|
||||||
// using System.IO;
|
|
||||||
// using System.Linq;
|
|
||||||
// using System.Text;
|
|
||||||
// using System.Threading;
|
|
||||||
// using Microsoft.CodeAnalysis;
|
|
||||||
// using Microsoft.CodeAnalysis.CSharp;
|
|
||||||
// using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
||||||
// using Microsoft.CodeAnalysis.Text;
|
|
||||||
//
|
|
||||||
// namespace NadekoBot.Generators.Command;
|
|
||||||
//
|
|
||||||
// [Generator]
|
|
||||||
// public class CommandAttributesGenerator : IIncrementalGenerator
|
|
||||||
// {
|
|
||||||
// public const string ATTRIBUTE = @"// <AutoGenerated />
|
|
||||||
//
|
|
||||||
// namespace NadekoBot.Common;
|
|
||||||
//
|
|
||||||
// [System.AttributeUsage(System.AttributeTargets.Method)]
|
|
||||||
// public class CmdAttribute : System.Attribute
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// }";
|
|
||||||
//
|
|
||||||
// public class MethodModel
|
|
||||||
// {
|
|
||||||
// public string? Namespace { get; }
|
|
||||||
// public IReadOnlyCollection<string> Classes { get; }
|
|
||||||
// public string ReturnType { get; }
|
|
||||||
// public string MethodName { get; }
|
|
||||||
// public IEnumerable<string> Params { get; }
|
|
||||||
//
|
|
||||||
// public MethodModel(string? ns, IReadOnlyCollection<string> classes, string returnType, string methodName, IEnumerable<string> @params)
|
|
||||||
// {
|
|
||||||
// Namespace = ns;
|
|
||||||
// Classes = classes;
|
|
||||||
// ReturnType = returnType;
|
|
||||||
// MethodName = methodName;
|
|
||||||
// Params = @params;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public class FileModel
|
|
||||||
// {
|
|
||||||
// public string? Namespace { get; }
|
|
||||||
// public IReadOnlyCollection<string> ClassHierarchy { get; }
|
|
||||||
// public IReadOnlyCollection<MethodModel> Methods { get; }
|
|
||||||
//
|
|
||||||
// public FileModel(string? ns, IReadOnlyCollection<string> classHierarchy, IReadOnlyCollection<MethodModel> methods)
|
|
||||||
// {
|
|
||||||
// Namespace = ns;
|
|
||||||
// ClassHierarchy = classHierarchy;
|
|
||||||
// Methods = methods;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void Initialize(IncrementalGeneratorInitializationContext context)
|
|
||||||
// {
|
|
||||||
// // #if DEBUG
|
|
||||||
// // if (!Debugger.IsAttached)
|
|
||||||
// // Debugger.Launch();
|
|
||||||
// // // SpinWait.SpinUntil(() => Debugger.IsAttached);
|
|
||||||
// // #endif
|
|
||||||
// context.RegisterPostInitializationOutput(static ctx => ctx.AddSource(
|
|
||||||
// "CmdAttribute.g.cs",
|
|
||||||
// SourceText.From(ATTRIBUTE, Encoding.UTF8)));
|
|
||||||
//
|
|
||||||
// var methods = context.SyntaxProvider
|
|
||||||
// .CreateSyntaxProvider(
|
|
||||||
// static (node, _) => node is MethodDeclarationSyntax { AttributeLists.Count: > 0 },
|
|
||||||
// static (ctx, cancel) => Transform(ctx, cancel))
|
|
||||||
// .Where(static m => m is not null)
|
|
||||||
// .Where(static m => m?.ChildTokens().Any(static x => x.IsKind(SyntaxKind.PublicKeyword)) ?? false);
|
|
||||||
//
|
|
||||||
// var compilationMethods = context.CompilationProvider.Combine(methods.Collect());
|
|
||||||
//
|
|
||||||
// context.RegisterSourceOutput(compilationMethods,
|
|
||||||
// static (ctx, tuple) => RegisterAction(in ctx, tuple.Left, in tuple.Right));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private static void RegisterAction(in SourceProductionContext ctx,
|
|
||||||
// Compilation comp,
|
|
||||||
// in ImmutableArray<MethodDeclarationSyntax?> methods)
|
|
||||||
// {
|
|
||||||
// if (methods is { IsDefaultOrEmpty: true })
|
|
||||||
// return;
|
|
||||||
//
|
|
||||||
// var models = GetModels(comp, methods, ctx.CancellationToken);
|
|
||||||
//
|
|
||||||
// foreach (var model in models)
|
|
||||||
// {
|
|
||||||
// var name = $"{model.Namespace}.{string.Join(".", model.ClassHierarchy)}.g.cs";
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// var source = GetSourceText(model);
|
|
||||||
// ctx.AddSource(name, SourceText.From(source, Encoding.UTF8));
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// Console.WriteLine($"Error writing source file {name}\n" + ex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private static string GetSourceText(FileModel model)
|
|
||||||
// {
|
|
||||||
// using var sw = new StringWriter();
|
|
||||||
// using var tw = new IndentedTextWriter(sw);
|
|
||||||
//
|
|
||||||
// tw.WriteLine("// <AutoGenerated />");
|
|
||||||
// tw.WriteLine("#pragma warning disable CS1066");
|
|
||||||
//
|
|
||||||
// if (model.Namespace is not null)
|
|
||||||
// {
|
|
||||||
// tw.WriteLine($"namespace {model.Namespace};");
|
|
||||||
// tw.WriteLine();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// foreach (var className in model.ClassHierarchy)
|
|
||||||
// {
|
|
||||||
// tw.WriteLine($"public partial class {className}");
|
|
||||||
// tw.WriteLine("{");
|
|
||||||
// tw.Indent ++;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// foreach (var method in model.Methods)
|
|
||||||
// {
|
|
||||||
// tw.WriteLine("[NadekoCommand]");
|
|
||||||
// tw.WriteLine("[NadekoDescription]");
|
|
||||||
// tw.WriteLine("[Aliases]");
|
|
||||||
// tw.WriteLine($"public partial {method.ReturnType} {method.MethodName}({string.Join(", ", method.Params)});");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// foreach (var _ in model.ClassHierarchy)
|
|
||||||
// {
|
|
||||||
// tw.Indent --;
|
|
||||||
// tw.WriteLine("}");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// tw.Flush();
|
|
||||||
// return sw.ToString();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private static IReadOnlyCollection<FileModel> GetModels(Compilation compilation,
|
|
||||||
// in ImmutableArray<MethodDeclarationSyntax?> inputMethods,
|
|
||||||
// CancellationToken cancel)
|
|
||||||
// {
|
|
||||||
// var models = new List<FileModel>();
|
|
||||||
//
|
|
||||||
// var methods = inputMethods
|
|
||||||
// .Where(static x => x is not null)
|
|
||||||
// .Distinct();
|
|
||||||
//
|
|
||||||
// var methodModels = methods
|
|
||||||
// .Select(x => MethodDeclarationToMethodModel(compilation, x!))
|
|
||||||
// .Where(static x => x is not null)
|
|
||||||
// .Cast<MethodModel>();
|
|
||||||
//
|
|
||||||
// var groups = methodModels
|
|
||||||
// .GroupBy(static x => $"{x.Namespace}.{string.Join(".", x.Classes)}");
|
|
||||||
//
|
|
||||||
// foreach (var group in groups)
|
|
||||||
// {
|
|
||||||
// if (cancel.IsCancellationRequested)
|
|
||||||
// return new Collection<FileModel>();
|
|
||||||
//
|
|
||||||
// if (group is null)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// var elems = group.ToList();
|
|
||||||
// if (elems.Count is 0)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// var model = new FileModel(
|
|
||||||
// methods: elems,
|
|
||||||
// ns: elems[0].Namespace,
|
|
||||||
// classHierarchy: elems![0].Classes
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// models.Add(model);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// return models;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private static MethodModel? MethodDeclarationToMethodModel(Compilation comp, MethodDeclarationSyntax decl)
|
|
||||||
// {
|
|
||||||
// // SpinWait.SpinUntil(static () => Debugger.IsAttached);
|
|
||||||
//
|
|
||||||
// SemanticModel semanticModel;
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// semanticModel = comp.GetSemanticModel(decl.SyntaxTree);
|
|
||||||
// }
|
|
||||||
// catch
|
|
||||||
// {
|
|
||||||
// // for some reason this method can throw "Not part of this compilation" argument exception
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// var methodModel = new MethodModel(
|
|
||||||
// @params: decl.ParameterList.Parameters
|
|
||||||
// .Where(p => p.Type is not null)
|
|
||||||
// .Select(p =>
|
|
||||||
// {
|
|
||||||
// var prefix = p.Modifiers.Any(static x => x.IsKind(SyntaxKind.ParamsKeyword))
|
|
||||||
// ? "params "
|
|
||||||
// : string.Empty;
|
|
||||||
//
|
|
||||||
// var type = semanticModel
|
|
||||||
// .GetTypeInfo(p.Type!)
|
|
||||||
// .Type
|
|
||||||
// ?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// var name = p.Identifier.Text;
|
|
||||||
//
|
|
||||||
// var suffix = string.Empty;
|
|
||||||
// if (p.Default is not null)
|
|
||||||
// {
|
|
||||||
// if (p.Default.Value is LiteralExpressionSyntax)
|
|
||||||
// {
|
|
||||||
// suffix = " = " + p.Default.Value;
|
|
||||||
// }
|
|
||||||
// else if (p.Default.Value is MemberAccessExpressionSyntax maes)
|
|
||||||
// {
|
|
||||||
// var maesSemModel = comp.GetSemanticModel(maes.SyntaxTree);
|
|
||||||
// var sym = maesSemModel.GetSymbolInfo(maes.Name);
|
|
||||||
// if (sym.Symbol is null)
|
|
||||||
// {
|
|
||||||
// suffix = " = " + p.Default.Value;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// suffix = " = " + sym.Symbol.ToDisplayString();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return $"{prefix}{type} {name}{suffix}";
|
|
||||||
// })
|
|
||||||
// .ToList(),
|
|
||||||
// methodName: decl.Identifier.Text,
|
|
||||||
// returnType: decl.ReturnType.ToString(),
|
|
||||||
// ns: GetNamespace(decl),
|
|
||||||
// classes: GetClasses(decl)
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// return methodModel;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //https://github.com/andrewlock/NetEscapades.EnumGenerators/blob/main/src/NetEscapades.EnumGenerators/EnumGenerator.cs
|
|
||||||
// static string? GetNamespace(MethodDeclarationSyntax declarationSyntax)
|
|
||||||
// {
|
|
||||||
// // determine the namespace the class is declared in, if any
|
|
||||||
// string? nameSpace = null;
|
|
||||||
// var parentOfInterest = declarationSyntax.Parent;
|
|
||||||
// while (parentOfInterest is not null)
|
|
||||||
// {
|
|
||||||
// parentOfInterest = parentOfInterest.Parent;
|
|
||||||
//
|
|
||||||
// if (parentOfInterest is BaseNamespaceDeclarationSyntax ns)
|
|
||||||
// {
|
|
||||||
// nameSpace = ns.Name.ToString();
|
|
||||||
// while (true)
|
|
||||||
// {
|
|
||||||
// if (ns.Parent is not NamespaceDeclarationSyntax parent)
|
|
||||||
// {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// ns = parent;
|
|
||||||
// nameSpace = $"{ns.Name}.{nameSpace}";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return nameSpace;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return nameSpace;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// static IReadOnlyCollection<string> GetClasses(MethodDeclarationSyntax declarationSyntax)
|
|
||||||
// {
|
|
||||||
// // determine the namespace the class is declared in, if any
|
|
||||||
// var classes = new LinkedList<string>();
|
|
||||||
// var parentOfInterest = declarationSyntax.Parent;
|
|
||||||
// while (parentOfInterest is not null)
|
|
||||||
// {
|
|
||||||
// if (parentOfInterest is ClassDeclarationSyntax cds)
|
|
||||||
// {
|
|
||||||
// classes.AddFirst(cds.Identifier.ToString());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// parentOfInterest = parentOfInterest.Parent;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Debug.WriteLine($"Method {declarationSyntax.Identifier.Text} has {classes.Count} classes");
|
|
||||||
//
|
|
||||||
// return classes;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private static MethodDeclarationSyntax? Transform(GeneratorSyntaxContext ctx, CancellationToken cancel)
|
|
||||||
// {
|
|
||||||
// var methodDecl = ctx.Node as MethodDeclarationSyntax;
|
|
||||||
// if (methodDecl is null)
|
|
||||||
// return default;
|
|
||||||
//
|
|
||||||
// foreach (var attListSyntax in methodDecl.AttributeLists)
|
|
||||||
// {
|
|
||||||
// foreach (var attSyntax in attListSyntax.Attributes)
|
|
||||||
// {
|
|
||||||
// if (cancel.IsCancellationRequested)
|
|
||||||
// return default;
|
|
||||||
//
|
|
||||||
// var symbol = ctx.SemanticModel.GetSymbolInfo(attSyntax).Symbol;
|
|
||||||
// if (symbol is not IMethodSymbol attSymbol)
|
|
||||||
// continue;
|
|
||||||
//
|
|
||||||
// if (attSymbol.ContainingType.ToDisplayString() == "NadekoBot.Common.CmdAttribute")
|
|
||||||
// return methodDecl;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return default;
|
|
||||||
// }
|
|
||||||
// }
|
|
@@ -5,12 +5,13 @@
|
|||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||||
<IsRoslynComponent>true</IsRoslynComponent>
|
<IsRoslynComponent>true</IsRoslynComponent>
|
||||||
|
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" PrivateAssets="all" GeneratePathProperty="true" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" PrivateAssets="all" GeneratePathProperty="true" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MorseCode.ITask" Version="2.0.3" />
|
<PackageReference Include="MorseCode.ITask" Version="2.0.3" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -1,10 +1,7 @@
|
|||||||
namespace NadekoBot.Common.Attributes;
|
namespace NadekoBot.Common.Attributes;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Method)]
|
[AttributeUsage(AttributeTargets.Method)]
|
||||||
public sealed class NadekoOptionsAttribute : Attribute
|
public sealed class NadekoOptionsAttribute<TOption> : Attribute
|
||||||
|
where TOption: INadekoCommandOptions
|
||||||
{
|
{
|
||||||
public Type OptionType { get; set; }
|
|
||||||
|
|
||||||
public NadekoOptionsAttribute(Type t)
|
|
||||||
=> OptionType = t;
|
|
||||||
}
|
}
|
@@ -27,10 +27,10 @@ public partial class Administration
|
|||||||
//deletes her own messages, no perm required
|
//deletes her own messages, no perm required
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptions(typeof(PruneOptions))]
|
[NadekoOptions<PruneOptions>]
|
||||||
public async Task Prune(params string[] args)
|
public async Task Prune(params string[] args)
|
||||||
{
|
{
|
||||||
var (opts, _) = OptionsParser.ParseFrom<PruneOptions>(new PruneOptions(), args);
|
var (opts, _) = OptionsParser.ParseFrom(new PruneOptions(), args);
|
||||||
|
|
||||||
var user = await ctx.Guild.GetCurrentUserAsync();
|
var user = await ctx.Guild.GetCurrentUserAsync();
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public partial class Administration
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(ChannelPerm.ManageMessages)]
|
[UserPerm(ChannelPerm.ManageMessages)]
|
||||||
[BotPerm(ChannelPerm.ManageMessages)]
|
[BotPerm(ChannelPerm.ManageMessages)]
|
||||||
[NadekoOptions(typeof(PruneOptions))]
|
[NadekoOptions<PruneOptions>]
|
||||||
[Priority(1)]
|
[Priority(1)]
|
||||||
public async Task Prune(int count, params string[] args)
|
public async Task Prune(int count, params string[] args)
|
||||||
{
|
{
|
||||||
@@ -70,7 +70,7 @@ public partial class Administration
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(ChannelPerm.ManageMessages)]
|
[UserPerm(ChannelPerm.ManageMessages)]
|
||||||
[BotPerm(ChannelPerm.ManageMessages)]
|
[BotPerm(ChannelPerm.ManageMessages)]
|
||||||
[NadekoOptions(typeof(PruneOptions))]
|
[NadekoOptions<PruneOptions>]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public Task Prune(IGuildUser user, int count = 100, params string[] args)
|
public Task Prune(IGuildUser user, int count = 100, params string[] args)
|
||||||
=> Prune(user.Id, count, args);
|
=> Prune(user.Id, count, args);
|
||||||
@@ -80,7 +80,7 @@ public partial class Administration
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(ChannelPerm.ManageMessages)]
|
[UserPerm(ChannelPerm.ManageMessages)]
|
||||||
[BotPerm(ChannelPerm.ManageMessages)]
|
[BotPerm(ChannelPerm.ManageMessages)]
|
||||||
[NadekoOptions(typeof(PruneOptions))]
|
[NadekoOptions<PruneOptions>]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public async Task Prune(ulong userId, int count = 100, params string[] args)
|
public async Task Prune(ulong userId, int count = 100, params string[] args)
|
||||||
{
|
{
|
||||||
|
@@ -97,7 +97,7 @@ public partial class Administration
|
|||||||
{
|
{
|
||||||
var logSetting = _service.GetGuildLogSettings(ctx.Guild.Id);
|
var logSetting = _service.GetGuildLogSettings(ctx.Guild.Id);
|
||||||
var str = string.Join("\n",
|
var str = string.Join("\n",
|
||||||
Enum.GetNames(typeof(LogType))
|
Enum.GetNames<LogType>()
|
||||||
.Select(x =>
|
.Select(x =>
|
||||||
{
|
{
|
||||||
var val = logSetting is null ? null : GetLogProperty(logSetting, Enum.Parse<LogType>(x));
|
var val = logSetting is null ? null : GetLogProperty(logSetting, Enum.Parse<LogType>(x));
|
||||||
|
@@ -114,7 +114,7 @@ public partial class Administration
|
|||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(GuildPerm.Administrator)]
|
[UserPerm(GuildPerm.Administrator)]
|
||||||
[NadekoOptions(typeof(WarnExpireOptions))]
|
[NadekoOptions<WarnExpireOptions>]
|
||||||
[Priority(1)]
|
[Priority(1)]
|
||||||
public async Task WarnExpire()
|
public async Task WarnExpire()
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ public partial class Administration
|
|||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[UserPerm(GuildPerm.Administrator)]
|
[UserPerm(GuildPerm.Administrator)]
|
||||||
[NadekoOptions(typeof(WarnExpireOptions))]
|
[NadekoOptions<WarnExpireOptions>]
|
||||||
[Priority(2)]
|
[Priority(2)]
|
||||||
public async Task WarnExpire(int days, params string[] args)
|
public async Task WarnExpire(int days, params string[] args)
|
||||||
{
|
{
|
||||||
|
@@ -34,7 +34,7 @@ public partial class Gambling
|
|||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptionsAttribute(typeof(RaceOptions))]
|
[NadekoOptions<RaceOptions>]
|
||||||
public Task Race(params string[] args)
|
public Task Race(params string[] args)
|
||||||
{
|
{
|
||||||
var (options, _) = OptionsParser.ParseFrom(new RaceOptions(), args);
|
var (options, _) = OptionsParser.ParseFrom(new RaceOptions(), args);
|
||||||
|
@@ -44,7 +44,7 @@ public partial class Gambling
|
|||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptionsAttribute(typeof(Connect4Game.Options))]
|
[NadekoOptions<Connect4Game.Options>]
|
||||||
public async Task Connect4(params string[] args)
|
public async Task Connect4(params string[] args)
|
||||||
{
|
{
|
||||||
var (options, _) = OptionsParser.ParseFrom(new Connect4Game.Options(), args);
|
var (options, _) = OptionsParser.ParseFrom(new Connect4Game.Options(), args);
|
||||||
|
@@ -18,7 +18,7 @@ public partial class Gambling
|
|||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptionsAttribute(typeof(EventOptions))]
|
[NadekoOptions<EventOptions>]
|
||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
public async Task EventStart(CurrencyEvent.Type ev, params string[] options)
|
public async Task EventStart(CurrencyEvent.Type ev, params string[] options)
|
||||||
{
|
{
|
||||||
|
@@ -710,13 +710,13 @@ public partial class Gambling : GamblingModule<GamblingService>
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[NadekoOptions(typeof(LbOpts))]
|
[NadekoOptions<LbOpts>]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public Task Leaderboard(params string[] args)
|
public Task Leaderboard(params string[] args)
|
||||||
=> Leaderboard(1, args);
|
=> Leaderboard(1, args);
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[NadekoOptions(typeof(LbOpts))]
|
[NadekoOptions<LbOpts>]
|
||||||
[Priority(1)]
|
[Priority(1)]
|
||||||
public async Task Leaderboard(int page = 1, params string[] args)
|
public async Task Leaderboard(int page = 1, params string[] args)
|
||||||
{
|
{
|
||||||
|
@@ -17,7 +17,7 @@ public partial class Games
|
|||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptions(typeof(AcrophobiaGame.Options))]
|
[NadekoOptions<AcrophobiaGame.Options>]
|
||||||
public async Task Acrophobia(params string[] args)
|
public async Task Acrophobia(params string[] args)
|
||||||
{
|
{
|
||||||
var (options, _) = OptionsParser.ParseFrom(new AcrophobiaGame.Options(), args);
|
var (options, _) = OptionsParser.ParseFrom(new AcrophobiaGame.Options(), args);
|
||||||
|
@@ -20,7 +20,7 @@ public partial class Games
|
|||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptionsAttribute(typeof(TypingGame.Options))]
|
[NadekoOptions<TypingGame.Options>]
|
||||||
public async Task TypeStart(params string[] args)
|
public async Task TypeStart(params string[] args)
|
||||||
{
|
{
|
||||||
var (options, _) = OptionsParser.ParseFrom(new TypingGame.Options(), args);
|
var (options, _) = OptionsParser.ParseFrom(new TypingGame.Options(), args);
|
||||||
|
@@ -17,7 +17,7 @@ public partial class Games
|
|||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[NadekoOptions(typeof(TicTacToe.Options))]
|
[NadekoOptions<TicTacToe.Options>]
|
||||||
public async Task TicTacToe(params string[] args)
|
public async Task TicTacToe(params string[] args)
|
||||||
{
|
{
|
||||||
var (options, _) = OptionsParser.ParseFrom(new TicTacToe.Options(), args);
|
var (options, _) = OptionsParser.ParseFrom(new TicTacToe.Options(), args);
|
||||||
|
@@ -30,7 +30,7 @@ public partial class Games
|
|||||||
[Cmd]
|
[Cmd]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
[NadekoOptions(typeof(TriviaOptions))]
|
[NadekoOptions<TriviaOptions>]
|
||||||
public async Task Trivia(params string[] args)
|
public async Task Trivia(params string[] args)
|
||||||
{
|
{
|
||||||
var (opts, _) = OptionsParser.ParseFrom(new TriviaOptions(), args);
|
var (opts, _) = OptionsParser.ParseFrom(new TriviaOptions(), args);
|
||||||
|
@@ -88,7 +88,7 @@ public partial class Help : NadekoModule<HelpService>
|
|||||||
embed = embed.WithOkColor().WithDescription(GetText(strs.module_page_empty));
|
embed = embed.WithOkColor().WithDescription(GetText(strs.module_page_empty));
|
||||||
return embed;
|
return embed;
|
||||||
}
|
}
|
||||||
|
|
||||||
localModules.OrderBy(module => module.Name)
|
localModules.OrderBy(module => module.Name)
|
||||||
.ToList()
|
.ToList()
|
||||||
.ForEach(module => embed.AddField($"{GetModuleEmoji(module.Name)} {module.Name}",
|
.ForEach(module => embed.AddField($"{GetModuleEmoji(module.Name)} {module.Name}",
|
||||||
@@ -111,10 +111,11 @@ public partial class Help : NadekoModule<HelpService>
|
|||||||
if (key.Key == strs.module_description_missing.Key)
|
if (key.Key == strs.module_description_missing.Key)
|
||||||
{
|
{
|
||||||
var desc = _medusae
|
var desc = _medusae
|
||||||
.GetLoadedMedusae(Culture)
|
.GetLoadedMedusae(Culture)
|
||||||
.FirstOrDefault(m => m.Sneks
|
.FirstOrDefault(m => m.Sneks
|
||||||
.Any(x => x.Name.Equals(moduleName, StringComparison.InvariantCultureIgnoreCase)))
|
.Any(x => x.Name.Equals(moduleName,
|
||||||
?.Description;
|
StringComparison.InvariantCultureIgnoreCase)))
|
||||||
|
?.Description;
|
||||||
|
|
||||||
if (desc is not null)
|
if (desc is not null)
|
||||||
return desc;
|
return desc;
|
||||||
@@ -122,7 +123,7 @@ public partial class Help : NadekoModule<HelpService>
|
|||||||
|
|
||||||
return GetText(key);
|
return GetText(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
private LocStr GetModuleLocStr(string moduleName)
|
private LocStr GetModuleLocStr(string moduleName)
|
||||||
{
|
{
|
||||||
switch (moduleName.ToLowerInvariant())
|
switch (moduleName.ToLowerInvariant())
|
||||||
@@ -189,7 +190,7 @@ public partial class Help : NadekoModule<HelpService>
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[NadekoOptions(typeof(CommandsOptions))]
|
[NadekoOptions<CommandsOptions>]
|
||||||
public async Task Commands(string module = null, params string[] args)
|
public async Task Commands(string module = null, params string[] args)
|
||||||
{
|
{
|
||||||
module = module?.Trim().ToUpperInvariant();
|
module = module?.Trim().ToUpperInvariant();
|
||||||
@@ -374,9 +375,8 @@ public partial class Help : NadekoModule<HelpService>
|
|||||||
.Select(com =>
|
.Select(com =>
|
||||||
{
|
{
|
||||||
List<string> optHelpStr = null;
|
List<string> optHelpStr = null;
|
||||||
var opt = ((NadekoOptionsAttribute)com.Attributes.FirstOrDefault(static x
|
|
||||||
=> x is NadekoOptionsAttribute))
|
var opt = HelpService.GetNadekoOptionType(com.Attributes);
|
||||||
?.OptionType;
|
|
||||||
if (opt is not null)
|
if (opt is not null)
|
||||||
optHelpStr = HelpService.GetCommandOptionHelpList(opt);
|
optHelpStr = HelpService.GetCommandOptionHelpList(opt);
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@ public partial class Help : NadekoModule<HelpService>
|
|||||||
customId: "donate:selfhosting",
|
customId: "donate:selfhosting",
|
||||||
label: "Selfhosting"),
|
label: "Selfhosting"),
|
||||||
SelfhostAction));
|
SelfhostAction));
|
||||||
|
|
||||||
var eb = _eb.Create(ctx)
|
var eb = _eb.Create(ctx)
|
||||||
.WithOkColor()
|
.WithOkColor()
|
||||||
.WithTitle("Thank you for considering to donate to the NadekoBot project!");
|
.WithTitle("Thank you for considering to donate to the NadekoBot project!");
|
||||||
|
@@ -86,7 +86,7 @@ public class HelpService : IExecNoCommand, INService
|
|||||||
.WithFooter(GetText(strs.module(com.Module.GetTopLevelModule().Name), guild))
|
.WithFooter(GetText(strs.module(com.Module.GetTopLevelModule().Name), guild))
|
||||||
.WithOkColor();
|
.WithOkColor();
|
||||||
|
|
||||||
var opt = ((NadekoOptionsAttribute)com.Attributes.FirstOrDefault(x => x is NadekoOptionsAttribute))?.OptionType;
|
var opt = GetNadekoOptionType(com.Attributes);
|
||||||
if (opt is not null)
|
if (opt is not null)
|
||||||
{
|
{
|
||||||
var hs = GetCommandOptionHelp(opt);
|
var hs = GetCommandOptionHelp(opt);
|
||||||
@@ -97,6 +97,14 @@ public class HelpService : IExecNoCommand, INService
|
|||||||
return em;
|
return em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Type GetNadekoOptionType(IEnumerable<Attribute> attributes)
|
||||||
|
=> attributes
|
||||||
|
.Select(a => a.GetType())
|
||||||
|
.Where(a => a.IsGenericType
|
||||||
|
&& a.GetGenericTypeDefinition() == typeof(NadekoOptionsAttribute<>))
|
||||||
|
.Select(a => a.GenericTypeArguments[0])
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
public static string GetCommandOptionHelp(Type opt)
|
public static string GetCommandOptionHelp(Type opt)
|
||||||
{
|
{
|
||||||
var strs = GetCommandOptionHelpList(opt);
|
var strs = GetCommandOptionHelpList(opt);
|
||||||
|
@@ -18,7 +18,7 @@ public partial class Searches
|
|||||||
Xoart //http://xoart.link
|
Xoart //http://xoart.link
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly string _typesStr = string.Join(", ", Enum.GetNames(typeof(PlaceType)));
|
private static readonly string _typesStr = string.Join(", ", Enum.GetNames<PlaceType>());
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
public async Task Placelist()
|
public async Task Placelist()
|
||||||
|
@@ -12,7 +12,7 @@ public partial class Utility
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[BotPerm(ChannelPerm.CreateInstantInvite)]
|
[BotPerm(ChannelPerm.CreateInstantInvite)]
|
||||||
[UserPerm(ChannelPerm.CreateInstantInvite)]
|
[UserPerm(ChannelPerm.CreateInstantInvite)]
|
||||||
[NadekoOptions(typeof(InviteService.Options))]
|
[NadekoOptions<InviteService.Options>]
|
||||||
public async Task InviteCreate(params string[] args)
|
public async Task InviteCreate(params string[] args)
|
||||||
{
|
{
|
||||||
var (opts, success) = OptionsParser.ParseFrom(new InviteService.Options(), args);
|
var (opts, success) = OptionsParser.ParseFrom(new InviteService.Options(), args);
|
||||||
|
@@ -155,14 +155,14 @@ public partial class Xp : NadekoModule<XpService>
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[NadekoOptions(typeof(LbOpts))]
|
[NadekoOptions<LbOpts>]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
public Task XpLeaderboard(params string[] args)
|
public Task XpLeaderboard(params string[] args)
|
||||||
=> XpLeaderboard(1, args);
|
=> XpLeaderboard(1, args);
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
[NadekoOptions(typeof(LbOpts))]
|
[NadekoOptions<LbOpts>]
|
||||||
[Priority(1)]
|
[Priority(1)]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
public async Task XpLeaderboard(int page = 1, params string[] args)
|
public async Task XpLeaderboard(int page = 1, params string[] args)
|
||||||
|
@@ -17,71 +17,71 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AngleSharp" Version="0.17.1">
|
<PackageReference Include="AngleSharp" Version="1.0.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Publish>True</Publish>
|
<Publish>True</Publish>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="AWSSDK.S3" Version="3.7.9.25" />
|
<PackageReference Include="AWSSDK.S3" Version="3.7.101.58" />
|
||||||
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.4" />
|
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.4" />
|
||||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||||
<PackageReference Include="CsvHelper" Version="28.0.1" />
|
<PackageReference Include="CsvHelper" Version="30.0.1" />
|
||||||
<PackageReference Include="Discord.Net" Version="3.104.0" />
|
<PackageReference Include="Discord.Net" Version="3.104.0" />
|
||||||
<PackageReference Include="CoreCLR-NCalc" Version="2.2.110" />
|
<PackageReference Include="CoreCLR-NCalc" Version="2.2.110" />
|
||||||
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
|
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
|
||||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.57.0.2749" />
|
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.58.0.2874" />
|
||||||
<PackageReference Include="Google.Apis.Customsearch.v1" Version="1.49.0.2084" />
|
<PackageReference Include="Google.Apis.Customsearch.v1" Version="1.49.0.2084" />
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.21.2" />
|
<PackageReference Include="Google.Protobuf" Version="3.21.12" />
|
||||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.47.0" />
|
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.51.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.47.0">
|
<PackageReference Include="Grpc.Tools" Version="2.51.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Html2Markdown" Version="5.0.2.561" />
|
<PackageReference Include="Html2Markdown" Version="5.1.0.703" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.2.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.4.0" />
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||||
<PackageReference Include="MorseCode.ITask" Version="2.0.3" />
|
<PackageReference Include="MorseCode.ITask" Version="2.0.3" />
|
||||||
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="2.2.0" />
|
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
|
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="NonBlocking" Version="2.1.0" />
|
<PackageReference Include="NonBlocking" Version="2.1.1" />
|
||||||
<PackageReference Include="OneOf" Version="3.0.223" />
|
<PackageReference Include="OneOf" Version="3.0.223" />
|
||||||
<PackageReference Include="Scrutor" Version="4.2.0" />
|
<PackageReference Include="Scrutor" Version="4.2.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Seq" Version="5.1.1" />
|
<PackageReference Include="Serilog.Sinks.Seq" Version="5.2.2" />
|
||||||
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta17" />
|
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta17" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta14" />
|
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta14" />
|
||||||
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0009" />
|
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0009" />
|
||||||
<PackageReference Include="StackExchange.Redis" Version="2.6.48" />
|
<PackageReference Include="StackExchange.Redis" Version="2.6.90" />
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
<PackageReference Include="YamlDotNet" Version="12.3.1" />
|
||||||
|
|
||||||
<PackageReference Include="Humanizer" Version="2.14.1">
|
<PackageReference Include="Humanizer" Version="2.14.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Publish>True</Publish>
|
<Publish>True</Publish>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
|
||||||
|
|
||||||
<!-- Db-related packages -->
|
<!-- Db-related packages -->
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.7">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
||||||
<PackageReference Include="linq2db.EntityFrameworkCore" Version="6.8.0" />
|
<PackageReference Include="linq2db.EntityFrameworkCore" Version="7.1.0" />
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.2" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.5" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.1" />
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||||
|
|
||||||
<!-- Used by stream notifications -->
|
<!-- Used by stream notifications -->
|
||||||
<PackageReference Include="TwitchLib.Api" Version="3.4.1" />
|
<PackageReference Include="TwitchLib.Api" Version="3.4.1" />
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
<!-- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>-->
|
<!-- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>-->
|
||||||
<!-- </PackageReference>-->
|
<!-- </PackageReference>-->
|
||||||
|
|
||||||
<PackageReference Include="EFCore.NamingConventions" Version="6.0.0" />
|
<PackageReference Include="EFCore.NamingConventions" Version="7.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -7,8 +7,8 @@
|
|||||||
<Version>1.0.2</Version>
|
<Version>1.0.2</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="Serilog" Version="2.11.0" />
|
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||||
<PackageReference Include="System.Threading.Channels" Version="6.0.0" />
|
<PackageReference Include="System.Threading.Channels" Version="7.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Reference in New Issue
Block a user