private async Task AddInfractionsToEmbedAsync(ulong userId, StringBuilder builder) { builder.AppendLine(); builder.AppendLine($"**\u276F Infractions [See here](https://mod.gg/infractions?subject={userId})**"); if (!(Context.Channel as IGuildChannel).IsPublic()) { var counts = await _moderationService.GetInfractionCountsForUserAsync(userId); builder.AppendLine(FormatUtilities.FormatInfractionCounts(counts)); } else { builder.AppendLine("Infractions cannot be listed in public channels."); } }
private async Task AddInfractionsToEmbedAsync(ulong userId, StringBuilder builder) { // https://modix.gg/infractions?subject=1234 var url = new UriBuilder(_config.WebsiteBaseUrl) { Path = "/infractions", Query = $"subject={userId}" }.RemoveDefaultPort().ToString(); builder.AppendLine(); builder.AppendLine($"**\u276F Infractions [See here]({url})**"); if (!(Context.Channel as IGuildChannel).IsPublic()) { var counts = await _moderationService.GetInfractionCountsForUserAsync(userId); builder.AppendLine(FormatUtilities.FormatInfractionCounts(counts)); } else { builder.AppendLine("Infractions cannot be listed in public channels."); } }