Fixed .trivia --pokemon showing pokemon with id + 1

This commit is contained in:
Kwoth
2022-06-30 11:32:36 +02:00
parent 11d9db99ff
commit 8acf6b1194
4 changed files with 36 additions and 9 deletions

View File

@@ -160,7 +160,8 @@ public class CmdAttribute : System.Attribute
var methodModels = methods
.Select(x => MethodDeclarationToMethodModel(compilation, x!))
.Where(static x => x is not null);
.Where(static x => x is not null)
.Cast<MethodModel>();
var groups = methodModels
.GroupBy(static x => $"{x.Namespace}.{string.Join(".", x.Classes)}");
@@ -180,7 +181,7 @@ public class CmdAttribute : System.Attribute
var model = new FileModel(
methods: elems,
ns: elems[0].Namespace,
classHierarchy: elems[0].Classes
classHierarchy: elems![0].Classes
);
models.Add(model);