mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 06:47:56 +00:00
feat: add raw and plaintext formats to member avatar, proxy avatar, and guild avatar
This commit is contained in:
parent
2d17582e05
commit
2c4dea29be
3 changed files with 35 additions and 6 deletions
|
|
@ -15,6 +15,10 @@ public static class ContextAvatarExt
|
|||
return new ParsedImage { Url = url, Source = AvatarSource.User, SourceUser = user };
|
||||
}
|
||||
|
||||
// If we have raw or plaintext, don't try to parse as a URL
|
||||
if (ctx.PeekMatchFormat() != ReplyFormat.Standard)
|
||||
return null;
|
||||
|
||||
// If we have a positional argument, try to parse it as a URL
|
||||
var arg = ctx.RemainderOrNull();
|
||||
if (arg != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue