forked from TeamInklings/Octobot
/about: Use Markdown.Hyperlink instead of custom extension (#229)
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
c0b43c6a18
commit
f79968fdc2
2 changed files with 2 additions and 14 deletions
|
@ -15,6 +15,7 @@ using Remora.Discord.Commands.Contexts;
|
|||
using Remora.Discord.Commands.Feedback.Messages;
|
||||
using Remora.Discord.Commands.Feedback.Services;
|
||||
using Remora.Discord.Extensions.Embeds;
|
||||
using Remora.Discord.Extensions.Formatting;
|
||||
using Remora.Rest.Core;
|
||||
using Remora.Results;
|
||||
|
||||
|
@ -90,7 +91,7 @@ public class AboutCommandGroup : CommandGroup
|
|||
guildId, dev.Id, ct);
|
||||
var tag = guildMemberResult.IsSuccess
|
||||
? $"<@{dev.Id}>"
|
||||
: MarkdownExtensions.Hyperlink($"@{dev.Username}", $"https://github.com/{dev.Username}");
|
||||
: Markdown.Hyperlink($"@{dev.Username}", $"https://github.com/{dev.Username}");
|
||||
|
||||
builder.AppendBulletPointLine($"{tag} — {$"AboutDeveloper@{dev.Username}".Localized()}");
|
||||
}
|
||||
|
|
|
@ -13,17 +13,4 @@ public static class MarkdownExtensions
|
|||
{
|
||||
return $"- {text}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formats a string to use Markdown Hyperlink formatting.
|
||||
/// </summary>
|
||||
/// <param name="text">The input text to format.</param>
|
||||
/// <param name="url">The URL to use in formatting.</param>
|
||||
/// <returns>
|
||||
/// A markdown-formatted Hyperlink string.
|
||||
/// </returns>
|
||||
public static string Hyperlink(string text, string url)
|
||||
{
|
||||
return $"[{text}]({url})";
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue