Add primitive GetAvatarUrl function to a resolved interaction user
This commit is contained in:
parent
31f12a4110
commit
6d39c2d33f
1 changed files with 10 additions and 0 deletions
|
@ -50,5 +50,15 @@ namespace Geekbot.Core.Interactions.Resolved
|
||||||
public int PublicFlags { get; set; }
|
public int PublicFlags { get; set; }
|
||||||
|
|
||||||
public string Mention => $"<@{Id}>";
|
public string Mention => $"<@{Id}>";
|
||||||
|
|
||||||
|
public string GetAvatarUrl()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(Avatar))
|
||||||
|
{
|
||||||
|
return "https://discordapp.com/assets/6debd47ed13483642cf09e832ed0bc1b.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $"https://cdn.discordapp.com/avatars/{Id}/{Avatar}.webp";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue