mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-29 10:39:53 +03:00
/about: Show link to GitHub profile if Discord member wasn't found (#226)
In this PR, the behavior of the developer list display in /about has been changed. Now, if a developer is not on the same server where the /about command was executed, their username will have a link to their GitHub profile. --------- Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
96eed1a820
commit
c0b43c6a18
2 changed files with 16 additions and 1 deletions
|
@ -88,7 +88,9 @@ public class AboutCommandGroup : CommandGroup
|
|||
{
|
||||
var guildMemberResult = await _guildApi.GetGuildMemberAsync(
|
||||
guildId, dev.Id, ct);
|
||||
var tag = guildMemberResult.IsSuccess ? $"<@{dev.Id}>" : $"@{dev.Username}";
|
||||
var tag = guildMemberResult.IsSuccess
|
||||
? $"<@{dev.Id}>"
|
||||
: MarkdownExtensions.Hyperlink($"@{dev.Username}", $"https://github.com/{dev.Username}");
|
||||
|
||||
builder.AppendBulletPointLine($"{tag} — {$"AboutDeveloper@{dev.Username}".Localized()}");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue