diff --git a/PluralKit.Bot/Commands/Token.cs b/PluralKit.Bot/Commands/Api.cs similarity index 97% rename from PluralKit.Bot/Commands/Token.cs rename to PluralKit.Bot/Commands/Api.cs index 8b4c8dfd..c34ec9e3 100644 --- a/PluralKit.Bot/Commands/Token.cs +++ b/PluralKit.Bot/Commands/Api.cs @@ -9,11 +9,11 @@ using PluralKit.Core; namespace PluralKit.Bot { - public class Token + public class Api { private readonly IDatabase _db; private readonly ModelRepository _repo; - public Token(IDatabase db, ModelRepository repo) + public Api(IDatabase db, ModelRepository repo) { _db = db; _repo = repo; diff --git a/PluralKit.Bot/Commands/CommandTree.cs b/PluralKit.Bot/Commands/CommandTree.cs index cc9a1916..e484be8e 100644 --- a/PluralKit.Bot/Commands/CommandTree.cs +++ b/PluralKit.Bot/Commands/CommandTree.cs @@ -152,9 +152,9 @@ namespace PluralKit.Bot return ctx.Execute(Unlink, m => m.UnlinkAccount(ctx)); if (ctx.Match("token")) if (ctx.Match("refresh", "renew", "invalidate", "reroll", "regen")) - return ctx.Execute(TokenRefresh, m => m.RefreshToken(ctx)); + return ctx.Execute(TokenRefresh, m => m.RefreshToken(ctx)); else - return ctx.Execute(TokenGet, m => m.GetToken(ctx)); + return ctx.Execute(TokenGet, m => m.GetToken(ctx)); if (ctx.Match("import")) return ctx.Execute(Import, m => m.Import(ctx)); if (ctx.Match("export")) diff --git a/PluralKit.Bot/Modules.cs b/PluralKit.Bot/Modules.cs index 7c54ef4a..5cfd95ec 100644 --- a/PluralKit.Bot/Modules.cs +++ b/PluralKit.Bot/Modules.cs @@ -68,6 +68,7 @@ namespace PluralKit.Bot // Commands builder.RegisterType().AsSelf(); builder.RegisterType().AsSelf(); + builder.RegisterType().AsSelf(); builder.RegisterType().AsSelf(); builder.RegisterType().AsSelf(); builder.RegisterType().AsSelf(); @@ -89,7 +90,6 @@ namespace PluralKit.Bot builder.RegisterType().AsSelf(); builder.RegisterType().AsSelf(); builder.RegisterType().AsSelf(); - builder.RegisterType().AsSelf(); // Bot core builder.RegisterType().AsSelf().SingleInstance();