mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- Cleaned up completed todos
- Config Data won't be copied every time it's accessed now, but YamlDotNet doesnt' support records, so data is dangerously mutable, needs solution
This commit is contained in:
@@ -13,7 +13,6 @@ using YamlDotNet.Serialization;
|
|||||||
|
|
||||||
namespace NadekoBot.Coordinator
|
namespace NadekoBot.Coordinator
|
||||||
{
|
{
|
||||||
// todo future: test graceful and update bot to not wait for coord exit
|
|
||||||
public sealed class CoordinatorRunner : BackgroundService
|
public sealed class CoordinatorRunner : BackgroundService
|
||||||
{
|
{
|
||||||
private const string CONFIG_PATH = "coord.yml";
|
private const string CONFIG_PATH = "coord.yml";
|
||||||
|
@@ -34,7 +34,6 @@ namespace NadekoBot
|
|||||||
public DiscordSocketClient Client { get; }
|
public DiscordSocketClient Client { get; }
|
||||||
public ImmutableArray<GuildConfig> AllGuildConfigs { get; private set; }
|
public ImmutableArray<GuildConfig> AllGuildConfigs { get; private set; }
|
||||||
|
|
||||||
// todo change configs to records
|
|
||||||
// todo remove colors from here
|
// todo remove colors from here
|
||||||
public static Color OkColor { get; set; }
|
public static Color OkColor { get; set; }
|
||||||
public static Color ErrorColor { get; set; }
|
public static Color ErrorColor { get; set; }
|
||||||
@@ -177,7 +176,6 @@ namespace NadekoBot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo di typereaders
|
|
||||||
private IEnumerable<object> LoadTypeReaders(Assembly assembly)
|
private IEnumerable<object> LoadTypeReaders(Assembly assembly)
|
||||||
{
|
{
|
||||||
Type[] allTypes;
|
Type[] allTypes;
|
||||||
|
@@ -8,7 +8,6 @@ using NadekoBot.Services;
|
|||||||
|
|
||||||
namespace NadekoBot.Common.TypeReaders
|
namespace NadekoBot.Common.TypeReaders
|
||||||
{
|
{
|
||||||
// todo test max/half/all
|
|
||||||
public sealed class ShmartNumberTypeReader : NadekoTypeReader<ShmartNumber>
|
public sealed class ShmartNumberTypeReader : NadekoTypeReader<ShmartNumber>
|
||||||
{
|
{
|
||||||
private readonly DbService _db;
|
private readonly DbService _db;
|
||||||
|
@@ -40,7 +40,6 @@ namespace NadekoBot.Services
|
|||||||
public ConcurrentHashSet<ulong> UsersOnShortCooldown { get; } = new ConcurrentHashSet<ulong>();
|
public ConcurrentHashSet<ulong> UsersOnShortCooldown { get; } = new ConcurrentHashSet<ulong>();
|
||||||
private readonly Timer _clearUsersOnShortCooldown;
|
private readonly Timer _clearUsersOnShortCooldown;
|
||||||
|
|
||||||
// todo move behaviours to a separate service
|
|
||||||
public CommandHandler(
|
public CommandHandler(
|
||||||
DiscordSocketClient client,
|
DiscordSocketClient client,
|
||||||
DbService db,
|
DbService db,
|
||||||
|
@@ -28,7 +28,9 @@ namespace NadekoBot.Services
|
|||||||
private readonly TypedKey<TSettings> _changeKey;
|
private readonly TypedKey<TSettings> _changeKey;
|
||||||
|
|
||||||
protected TSettings _data;
|
protected TSettings _data;
|
||||||
public TSettings Data => CreateCopy();
|
|
||||||
|
// todo this has to be protected from mutation
|
||||||
|
public TSettings Data => _data;
|
||||||
|
|
||||||
public abstract string Name { get; }
|
public abstract string Name { get; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user