From a2d7075db633807eb8a86c4c11d22ed2589b9de3 Mon Sep 17 00:00:00 2001 From: Macintosh II Date: Fri, 6 Oct 2023 15:00:36 +0300 Subject: [PATCH] Resolving conversations Signed-off-by: Macintosh II --- locale/Messages.resx | 5 +---- locale/Messages.ru.resx | 3 --- locale/Messages.tt-ru.resx | 3 --- src/Commands/ToolsCommandGroup.cs | 6 ++---- src/Extensions.cs | 5 ++++- src/Messages.Designer.cs | 8 -------- 6 files changed, 7 insertions(+), 23 deletions(-) diff --git a/locale/Messages.resx b/locale/Messages.resx index ef24a02..da1496e 100644 --- a/locale/Messages.resx +++ b/locale/Messages.resx @@ -552,11 +552,8 @@ Creation date - - Guild's language - - Guild's owner + Guild owner Server Boost diff --git a/locale/Messages.ru.resx b/locale/Messages.ru.resx index 1bd82dc..e3f507e 100644 --- a/locale/Messages.ru.resx +++ b/locale/Messages.ru.resx @@ -552,9 +552,6 @@ Дата создания - - Язык сервера - Владелец сервера diff --git a/locale/Messages.tt-ru.resx b/locale/Messages.tt-ru.resx index 7e9b867..1e784d9 100644 --- a/locale/Messages.tt-ru.resx +++ b/locale/Messages.tt-ru.resx @@ -552,9 +552,6 @@ создался - - язык гильдии - админ гильдии diff --git a/src/Commands/ToolsCommandGroup.cs b/src/Commands/ToolsCommandGroup.cs index 4db026e..d8f0723 100644 --- a/src/Commands/ToolsCommandGroup.cs +++ b/src/Commands/ToolsCommandGroup.cs @@ -230,7 +230,7 @@ public class ToolsCommandGroup : CommandGroup } /// - /// A slash command that shows information about guild. + /// A slash command that shows guild information. /// /// /// Information in the output: @@ -287,10 +287,8 @@ public class ToolsCommandGroup : CommandGroup description.Append("- ").AppendLine(Messages.GuildInfoCreatedAt) .AppendLine(Markdown.Timestamp(guild.ID.Timestamp)) - .Append("- ").AppendLine(Messages.GuildInfoLocale) - .AppendLine(Markdown.InlineCode(guild.PreferredLocale)) .Append("- ").AppendLine(Messages.GuildInfoOwner) - .AppendLine($"<@{guild.OwnerID}>"); + .AppendLine(Mention.User(guild.OwnerID)); var embedColor = ColorsList.Cyan; diff --git a/src/Extensions.cs b/src/Extensions.cs index 940fdd0..00d3d36 100644 --- a/src/Extensions.cs +++ b/src/Extensions.cs @@ -84,7 +84,10 @@ public static class Extensions public static EmbedBuilder WithLargeGuildIcon( this EmbedBuilder builder, IGuild iconSource) { - return builder.WithThumbnailUrl(CDN.GetGuildIconUrl(iconSource, imageSize: 256).Entity.AbsoluteUri); + var iconUrlResult = CDN.GetGuildIconUrl(iconSource, imageSize: 256); + return iconUrlResult.IsSuccess + ? builder.WithThumbnailUrl(iconUrlResult.Entity.AbsoluteUri) + : builder; } /// diff --git a/src/Messages.Designer.cs b/src/Messages.Designer.cs index 990170f..83d596b 100644 --- a/src/Messages.Designer.cs +++ b/src/Messages.Designer.cs @@ -949,14 +949,6 @@ namespace Octobot { } } - internal static string GuildInfoLocale - { - get - { - return ResourceManager.GetString("GuildInfoLocale", resourceCulture); - } - } - internal static string GuildInfoOwner { get