diff --git a/src/Ellie.Bot.Common/Attributes/EllieOptionsAttribute.cs b/src/Ellie.Bot.Common/Attributes/EllieOptionsAttribute.cs index 49e39c4..d4a51c4 100644 --- a/src/Ellie.Bot.Common/Attributes/EllieOptionsAttribute.cs +++ b/src/Ellie.Bot.Common/Attributes/EllieOptionsAttribute.cs @@ -1,7 +1,7 @@ namespace Ellie.Common.Attributes; [AttributeUsage(AttributeTargets.Method)] -public sealed class NadekoOptionsAttribute : Attribute +public sealed class EllieOptionsAttribute : Attribute where TOption: IEllieCommandOptions { } \ No newline at end of file diff --git a/src/Ellie.Bot.Common/Attributes/OnlyPublicBotAttribute.cs b/src/Ellie.Bot.Common/Attributes/OnlyPublicBotAttribute.cs index ad0192c..b706c28 100644 --- a/src/Ellie.Bot.Common/Attributes/OnlyPublicBotAttribute.cs +++ b/src/Ellie.Bot.Common/Attributes/OnlyPublicBotAttribute.cs @@ -12,7 +12,7 @@ public sealed class OnlyPublicBotAttribute : PreconditionAttribute CommandInfo command, IServiceProvider services) { -#if GLOBAL_NADEKO || DEBUG +#if GLOBAL_ELLIE || DEBUG return Task.FromResult(PreconditionResult.FromSuccess()); #else return Task.FromResult(PreconditionResult.FromError("Only available on the public bot.")); diff --git a/src/Ellie.Bot.Common/Common/DownloadTracker.cs b/src/Ellie.Bot.Common/Common/DownloadTracker.cs index 239abe1..521871b 100644 --- a/src/Ellie.Bot.Common/Common/DownloadTracker.cs +++ b/src/Ellie.Bot.Common/Common/DownloadTracker.cs @@ -13,7 +13,7 @@ public class DownloadTracker : IEService /// Task representing download state public async Task EnsureUsersDownloadedAsync(IGuild guild) { -#if GLOBAL_NADEKO +#if GLOBAL_ELLIE return; #endif await _downloadUsersSemaphore.WaitAsync(); diff --git a/src/Ellie.Bot.Common/Extensions/DbExtensions.cs b/src/Ellie.Bot.Common/Extensions/DbExtensions.cs index 9fc595a..ac10ba6 100644 --- a/src/Ellie.Bot.Common/Extensions/DbExtensions.cs +++ b/src/Ellie.Bot.Common/Extensions/DbExtensions.cs @@ -1,6 +1,6 @@ using Ellie.Db; using Ellie.Db.Models; -// todo fix these namespaces. It should only be Nadeko.Bot.Db +// todo fix these namespaces. It should only be Ellie.Bot.Db using Ellie.Services.Database; namespace Ellie.Extensions; diff --git a/src/Ellie.Bot.Common/ModuleBehaviors/IExecPostCommand.cs b/src/Ellie.Bot.Common/ModuleBehaviors/IExecPostCommand.cs index 7491cfe..3941a6c 100644 --- a/src/Ellie.Bot.Common/ModuleBehaviors/IExecPostCommand.cs +++ b/src/Ellie.Bot.Common/ModuleBehaviors/IExecPostCommand.cs @@ -2,7 +2,7 @@ /// /// This interface's method is executed after the command successfully finished execution. -/// ***There is no support for this method in NadekoBot services.*** +/// ***There is no support for this method in Ellie services.*** /// It is only meant to be used in medusa system /// public interface IExecPostCommand : IBehavior diff --git a/src/Ellie.Bot.Common/Services/CommandHandler.cs b/src/Ellie.Bot.Common/Services/CommandHandler.cs index 43fb15b..5952e3d 100644 --- a/src/Ellie.Bot.Common/Services/CommandHandler.cs +++ b/src/Ellie.Bot.Common/Services/CommandHandler.cs @@ -224,7 +224,7 @@ public class CommandHandler : IEService, IReadyExecutor, ICommandHandler { try { -#if !GLOBAL_NADEKO +#if !GLOBAL_ELLIE // track how many messages each user is sending UserMessagesSent.AddOrUpdate(usrMsg.Author.Id, 1, (_, old) => ++old); #endif diff --git a/src/Ellie.Bot.Common/Services/Impl/CommandsUtilityService.cs b/src/Ellie.Bot.Common/Services/Impl/CommandsUtilityService.cs index 91f6880..feceb16 100644 --- a/src/Ellie.Bot.Common/Services/Impl/CommandsUtilityService.cs +++ b/src/Ellie.Bot.Common/Services/Impl/CommandsUtilityService.cs @@ -51,7 +51,7 @@ public sealed class CommandsUtilityService : ICommandsUtilityService, IEService .WithFooter(GetText(strs.module(com.Module.GetTopLevelModule().Name), guild)) .WithOkColor(); - var opt = GetNadekoOptionType(com.Attributes); + var opt = GetEllieOptionType(com.Attributes); if (opt is not null) { var hs = GetCommandOptionHelp(opt); @@ -90,11 +90,11 @@ public sealed class CommandsUtilityService : ICommandsUtilityService, IEService return strs; } - public static Type? GetNadekoOptionType(IEnumerable attributes) + public static Type? GetEllieOptionType(IEnumerable attributes) => attributes .Select(a => a.GetType()) .Where(a => a.IsGenericType - && a.GetGenericTypeDefinition() == typeof(NadekoOptionsAttribute<>)) + && a.GetGenericTypeDefinition() == typeof(EllieOptionsAttribute<>)) .Select(a => a.GenericTypeArguments[0]) .FirstOrDefault(); diff --git a/src/Ellie.Bot.Common/Services/Impl/StatsService.cs b/src/Ellie.Bot.Common/Services/Impl/StatsService.cs index aa1cc4c..2e3ef10 100644 --- a/src/Ellie.Bot.Common/Services/Impl/StatsService.cs +++ b/src/Ellie.Bot.Common/Services/Impl/StatsService.cs @@ -3,7 +3,7 @@ using Humanizer.Localisation; using Ellie.Common.ModuleBehaviors; using System.Diagnostics; -namespace NadekoBot.Services; +namespace Ellie.Services; public sealed class StatsService : IStatsService, IReadyExecutor, IEService { diff --git a/src/Ellie.Bot.Common/Services/strings/impl/BotStrings.cs b/src/Ellie.Bot.Common/Services/strings/impl/BotStrings.cs index 4c50be9..9f96cdc 100644 --- a/src/Ellie.Bot.Common/Services/strings/impl/BotStrings.cs +++ b/src/Ellie.Bot.Common/Services/strings/impl/BotStrings.cs @@ -87,7 +87,7 @@ public class BotStrings : IBotStrings } // Log.Warning(@"'{CommandName}' command strings don't exist in '{LanguageName}' culture. -// This message is safe to ignore, however you can ask in Nadeko support server how you can contribute command translations", +// This message is safe to ignore, however you can ask in Ellie support server how you can contribute command translations", // commandName, cultureInfo.Name); return GetCommandStrings(commandName, _usCultureInfo); diff --git a/src/Ellie.Bot.Generators.Cloneable/CloneableGenerator.cs b/src/Ellie.Bot.Generators.Cloneable/CloneableGenerator.cs index fd4a379..8c8cc9a 100644 --- a/src/Ellie.Bot.Generators.Cloneable/CloneableGenerator.cs +++ b/src/Ellie.Bot.Generators.Cloneable/CloneableGenerator.cs @@ -1,7 +1,7 @@ // Code temporarily yeeted from // https://github.com/mostmand/Cloneable/blob/master/Cloneable/CloneableGenerator.cs // because of NRT issue -#nullable disable +#nullable enable using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -255,4 +255,4 @@ namespace {namespaceName} context.AddSource(IGNORE_CLONE_ATTRIBUTE_STRING, SourceText.From(IGNORE_CLONE_PROPERTY_ATTRIBUTE_TEXT, Encoding.UTF8)); } } -} +} \ No newline at end of file diff --git a/src/Ellie.Bot.Generators.Cloneable/SymbolReceiver.cs b/src/Ellie.Bot.Generators.Cloneable/SymbolReceiver.cs index e264fca..ae0d029 100644 --- a/src/Ellie.Bot.Generators.Cloneable/SymbolReceiver.cs +++ b/src/Ellie.Bot.Generators.Cloneable/SymbolReceiver.cs @@ -24,4 +24,4 @@ namespace Cloneable } } } -} +} \ No newline at end of file diff --git a/src/Ellie.Coordinator/README.md b/src/Ellie.Coordinator/README.md index 594585e..111a2d5 100644 --- a/src/Ellie.Coordinator/README.md +++ b/src/Ellie.Coordinator/README.md @@ -1,6 +1,6 @@ # Coordinator project -Grpc-based coordinator useful for sharded NadekoBot. Its purpose is controlling the lifetime and checking status of the shards it creates. +Grpc-based coordinator useful for sharded Ellie. Its purpose is controlling the lifetime and checking status of the shards it creates. ### Supports diff --git a/src/Ellie.Coordinator/Services/CoordinatorRunner.cs b/src/Ellie.Coordinator/Services/CoordinatorRunner.cs index 007fd48..ce47cab 100644 --- a/src/Ellie.Coordinator/Services/CoordinatorRunner.cs +++ b/src/Ellie.Coordinator/Services/CoordinatorRunner.cs @@ -88,7 +88,7 @@ namespace Ellie.Coordinator lock (locker) { var shardIds = Enumerable.Range(0, 1) // shard 0 is always first - .Append((int)((117523346618318850 >> 22) % _config.TotalShards)) // then nadeko server shard + .Append((int)((117523346618318850 >> 22) % _config.TotalShards)) // then ellie server shard .Concat(Enumerable.Range(1, _config.TotalShards - 1) .OrderBy(_ => _rng.Next())) // then all other shards in a random order .Distinct()