Skip to content

Commit

Permalink
Nits and picks
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Feb 10, 2024
1 parent 7b1c46c commit 35928c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Commands/Common/InfoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public async Task EmojiInfoAsync(CommandContext context, string emoji)
{
embedBuilder.AddField("Emoji Name", _unicodeEmojis(null!).First(x => x.Value == discordEmoji.Name).Key.Replace(":", "\\:"), true);
embedBuilder.AddField("Unicode", $"\\{discordEmoji.Name}", true);
embedBuilder.ImageUrl = $"https://raw.githubusercontent.com/twitter/twemoji/master/assets/72x72/{char.ConvertToUtf32(discordEmoji.Name, 0).ToString("X4").ToLower(CultureInfo.InvariantCulture)}.png";
embedBuilder.ImageUrl = $"https://raw.githubusercontent.com/twitter/twemoji/master/assets/72x72/{char.ConvertToUtf32(discordEmoji.Name, 0).ToString("X4", CultureInfo.InvariantCulture).ToLower(CultureInfo.InvariantCulture)}.png";
}
else if (DiscordEmoji.TryFromName(context.Client, emoji, out discordEmoji))
{
Expand Down Expand Up @@ -248,7 +248,7 @@ public async Task GuildInfoAsync(CommandContext context, ulong? guildId = null)
Color = new DiscordColor("#6b73db"),
Author = new()
{
Name = context.Member?.DisplayName ?? context.User.Username,
Name = context.User.GetDisplayName(),
IconUrl = context.User.AvatarUrl,
Url = context.User.AvatarUrl
},
Expand All @@ -272,7 +272,6 @@ public async Task GuildInfoAsync(CommandContext context, ulong? guildId = null)

embedBuilder.Title = guildPreview.Name;
embedBuilder.Footer = new() { IconUrl = $"https://cdn.discordapp.com/splashes/{guildId}/{guildPreview.Splash}.png" };

if (guildPreview.Icon is not null)
{
embedBuilder.Thumbnail = new() { Url = $"https://cdn.discordapp.com/icons/{guildId}/{guildPreview.Icon}.{(guildPreview.Icon.StartsWith("a_") ? "gif" : "png")}" };
Expand Down

0 comments on commit 35928c5

Please sign in to comment.