feat: implement system avatar commands

This commit is contained in:
dusk 2025-04-04 03:50:07 +09:00
parent 293570c91c
commit b62340cbb3
No known key found for this signature in database
11 changed files with 155 additions and 101 deletions

View file

@ -10,6 +10,14 @@ namespace PluralKit.Bot;
public static class ContextEntityArgumentsExt
{
public static async Task<User> ParseUser(this Context ctx, string arg)
{
if (arg.TryParseMention(out var id))
return await ctx.Cache.GetOrFetchUser(ctx.Rest, id);
return null;
}
public static async Task<User> MatchUser(this Context ctx)
{
var text = ctx.PeekArgument();