PluralKit/Myriad/Extensions/UserExtensions.cs

12 lines
372 B
C#
Raw Normal View History

2021-08-27 15:03:47 +00:00
using Myriad.Types;
2020-12-22 12:15:26 +00:00
namespace Myriad.Extensions
{
public static class UserExtensions
{
public static string Mention(this User user) => $"<@{user.Id}>";
2021-08-27 15:03:47 +00:00
public static string AvatarUrl(this User user, string? format = "png", int? size = 128) =>
2020-12-24 13:52:44 +00:00
$"https://cdn.discordapp.com/avatars/{user.Id}/{user.Avatar}.{format}?size={size}";
2020-12-22 12:15:26 +00:00
}
}