diff --git a/src/EllieBot/Db/Models/Waifu.cs b/src/EllieBot/Db/Models/Waifu.cs index 939f5de..2583afb 100644 --- a/src/EllieBot/Db/Models/Waifu.cs +++ b/src/EllieBot/Db/Models/Waifu.cs @@ -1,7 +1,7 @@ #nullable disable using EllieBot.Db.Models; -namespace Ellieices.Database.Models; +namespace EllieBot.Services.Database.Models; public class WaifuInfo : DbEntity { diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 36762f4..565f586 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -121,6 +121,10 @@ <ExcludeFromSingleFile>true</ExcludeFromSingleFile> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> + <None Update="Migrations/**/*.sql"> + <ExcludeFromSingleFile>true</ExcludeFromSingleFile> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> <None Update="creds_example.yml"> <ExcludeFromSingleFile>true</ExcludeFromSingleFile> <CopyToOutputDirectory>Always</CopyToOutputDirectory> diff --git a/src/EllieBot/EllieBot.csproj.DotSettings b/src/EllieBot/EllieBot.csproj.DotSettings new file mode 100644 index 0000000..3044f67 --- /dev/null +++ b/src/EllieBot/EllieBot.csproj.DotSettings @@ -0,0 +1,17 @@ +<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Canti/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cbtnrole/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cclub/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Ccurrency/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cexpr/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cfilter/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cgiveaway/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cncanvas/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cpunish/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Croles/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cslowmode/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Csupport/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Ctodo/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cuntimer/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cxp/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=modules_005Cadministration_005Cnotify_005Cmodels/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/AdministrationService.cs b/src/EllieBot/Modules/Administration/AdministrationService.cs index 563f710..526eb69 100644 --- a/src/EllieBot/Modules/Administration/AdministrationService.cs +++ b/src/EllieBot/Modules/Administration/AdministrationService.cs @@ -2,12 +2,13 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; +using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; using EllieBot.Modules.Administration._common.results; namespace EllieBot.Modules.Administration; -public class AdministrationService : IEService +public class AdministrationService : IEService, IReadyExecutor { private ConcurrentHashSet<ulong> deleteMessagesOnCommand; private ConcurrentDictionary<ulong, bool> delMsgOnCmdChannels; @@ -35,7 +36,7 @@ public class AdministrationService : IEService _cmdHandler = cmdHandler; } - public async Task ReadyAsync() + public async Task OnReadyAsync() { await using var uow = _db.GetDbContext(); deleteMessagesOnCommand = new(await uow.GetTable<GuildConfig>() diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs index 3a51f7e..b08cdcc 100644 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs +++ b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs @@ -5,10 +5,11 @@ using System.Threading.Channels; using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; +using EllieBot.Common.ModuleBehaviors; namespace EllieBot.Modules.Administration.Services; -public sealed class AutoAssignRoleService : IEService +public sealed class AutoAssignRoleService : IEService, IReadyExecutor { private readonly DiscordSocketClient _client; private readonly DbService _db; diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs index 67dbff0..637fba1 100644 --- a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs +++ b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs @@ -403,12 +403,13 @@ public sealed class FilterService : IExecOnMessage, IReadyExecutor }); await uow.SaveChangesAsync(); + return true; } sfw.TryRemove(word); fc.FilteredWords.RemoveWhere(x => x.Word == word); await uow.SaveChangesAsync(); - return true; + return false; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 039b574..a8d8937 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -611,6 +611,5 @@ public class SearchesService : IEService } return shortLink; - throw new NotImplementedException(); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/TwitchHelixProvider.cs b/src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/TwitchHelixProvider.cs index 660cef4..f369110 100644 --- a/src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/TwitchHelixProvider.cs +++ b/src/EllieBot/Modules/Searches/_common/StreamNotifications/Providers/TwitchHelixProvider.cs @@ -45,6 +45,8 @@ namespace EllieBot.Modules.Searches.Common.StreamNotifications.Providers; // } // } // + +// todo check client id or whatever public sealed class TwitchHelixProvider : Provider { private readonly IHttpClientFactory _httpClientFactory; diff --git a/src/EllieBot/_common/Services/IStatsService.cs b/src/EllieBot/_common/Services/IStatsService.cs index 3f73495..7080cc0 100644 --- a/src/EllieBot/_common/Services/IStatsService.cs +++ b/src/EllieBot/_common/Services/IStatsService.cs @@ -49,7 +49,6 @@ public interface IStatsService /// </summary> double GetPrivateMemoryMegabytes(); - GuildInfo GetGuildInfoAsync(string name); Task<GuildInfo> GetGuildInfoAsync(ulong id); } diff --git a/src/EllieBot/_common/Services/Impl/StatsService.cs b/src/EllieBot/_common/Services/Impl/StatsService.cs index ea80362..62d4a07 100644 --- a/src/EllieBot/_common/Services/Impl/StatsService.cs +++ b/src/EllieBot/_common/Services/Impl/StatsService.cs @@ -180,9 +180,6 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService return _currentProcess.PrivateMemorySize64 / 1.Megabytes(); } - public GuildInfo GetGuildInfoAsync(string name) - => throw new NotImplementedException(); - public async Task<GuildInfo> GetGuildInfoAsync(ulong id) { var g = _client.GetGuild(id);