diff --git a/src/EllieBot/Modules/Utility/GuildColors.cs b/src/EllieBot/Modules/Utility/GuildColorsCommands.cs similarity index 100% rename from src/EllieBot/Modules/Utility/GuildColors.cs rename to src/EllieBot/Modules/Utility/GuildColorsCommands.cs diff --git a/src/EllieBot/Modules/Utility/Info/InfoCommands.cs b/src/EllieBot/Modules/Utility/Info/InfoCommands.cs index c9ae861..2640e76 100644 --- a/src/EllieBot/Modules/Utility/Info/InfoCommands.cs +++ b/src/EllieBot/Modules/Utility/Info/InfoCommands.cs @@ -53,7 +53,7 @@ public partial class Utility .WithTitle(guild.Name) .AddField(GetText(strs.id), guild.Id.ToString(), true) .AddField(GetText(strs.owner), ownername.ToString(), true) - .AddField(GetText(strs.members), (guild as SocketGuild)?.MemberCount ?? guild.ApproximateMemberCount, true) + .AddField(GetText(strs.members), (guild as SocketGuild)?.MemberCount.ToString() ?? guild.ApproximateMemberCount?.ToString() ?? "?", true) .AddField(GetText(strs.channels), channels, true) .AddField(GetText(strs.created_at), $"{createdAt:dd.MM.yyyy HH:mm}", true) .AddField(GetText(strs.roles), (guild.Roles.Count - 1).ToString(), true) diff --git a/src/EllieBot/_common/Abstractions/Extensions/SelfAssignableRolesExtensions.cs b/src/EllieBot/_common/Abstractions/Extensions/SelfAssignableRolesExtensions.cs deleted file mode 100644 index f44488f..0000000 --- a/src/EllieBot/_common/Abstractions/Extensions/SelfAssignableRolesExtensions.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Db; - -public static class SelfAssignableRolesExtensions -{ - public static bool DeleteByGuildAndRoleId(this DbSet roles, ulong guildId, ulong roleId) - { - var role = roles.FirstOrDefault(s => s.GuildId == guildId && s.RoleId == roleId); - - if (role is null) - return false; - - roles.Remove(role); - return true; - } - - public static IReadOnlyCollection GetFromGuild( - this DbSet roles, - ulong guildId) - => roles.AsQueryable().Where(s => s.GuildId == guildId).ToArray(); -} \ No newline at end of file