feat: rename Commands/Token to Commands/Api
This commit is contained in:
parent
71aec0d419
commit
c1f05eecf8
@ -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;
|
@ -152,9 +152,9 @@ namespace PluralKit.Bot
|
||||
return ctx.Execute<SystemLink>(Unlink, m => m.UnlinkAccount(ctx));
|
||||
if (ctx.Match("token"))
|
||||
if (ctx.Match("refresh", "renew", "invalidate", "reroll", "regen"))
|
||||
return ctx.Execute<Token>(TokenRefresh, m => m.RefreshToken(ctx));
|
||||
return ctx.Execute<Api>(TokenRefresh, m => m.RefreshToken(ctx));
|
||||
else
|
||||
return ctx.Execute<Token>(TokenGet, m => m.GetToken(ctx));
|
||||
return ctx.Execute<Api>(TokenGet, m => m.GetToken(ctx));
|
||||
if (ctx.Match("import"))
|
||||
return ctx.Execute<ImportExport>(Import, m => m.Import(ctx));
|
||||
if (ctx.Match("export"))
|
||||
|
@ -68,6 +68,7 @@ namespace PluralKit.Bot
|
||||
// Commands
|
||||
builder.RegisterType<CommandTree>().AsSelf();
|
||||
builder.RegisterType<Admin>().AsSelf();
|
||||
builder.RegisterType<Api>().AsSelf();
|
||||
builder.RegisterType<Autoproxy>().AsSelf();
|
||||
builder.RegisterType<Checks>().AsSelf();
|
||||
builder.RegisterType<Fun>().AsSelf();
|
||||
@ -89,7 +90,6 @@ namespace PluralKit.Bot
|
||||
builder.RegisterType<SystemFront>().AsSelf();
|
||||
builder.RegisterType<SystemLink>().AsSelf();
|
||||
builder.RegisterType<SystemList>().AsSelf();
|
||||
builder.RegisterType<Token>().AsSelf();
|
||||
|
||||
// Bot core
|
||||
builder.RegisterType<Bot>().AsSelf().SingleInstance();
|
||||
|
Loading…
Reference in New Issue
Block a user