fixed .sclr again

This commit is contained in:
Toastie 2024-11-29 17:57:33 +13:00
parent 73f2312a1c
commit 861b1251a5
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
3 changed files with 31 additions and 2 deletions

View file

@ -2,6 +2,19 @@
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
## [5.2.2] - 29.11.2024
### Changed
- Button roles are now non-exclusive by default
### Fixed
- Fixed sar migration, again (this time correctly)
- Fixed `.sclr` not updating unless bot is restarted, the changes should be immediate now for warn and error
- Fixed group buttons exclusivity message always saying groups are exclusive
## [5.2.1] - 28.11.2024
### Fixed

View file

@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Version>5.2.1</Version>
<Version>5.2.2</Version>
<!-- Output/build -->
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>

View file

@ -75,6 +75,14 @@ public sealed class GuildColorsService : IReadyExecutor, IGuildColorsService, IE
{
GuildId = guildId
});
if (!_colors.TryAdd(guildId, new Colors(null, null, color?.ToDiscordColor())))
{
_colors[guildId] = _colors[guildId] with
{
Error = color?.ToDiscordColor()
};
}
}
public async Task SetPendingColor(ulong guildId, Rgba32? color)
@ -95,6 +103,14 @@ public sealed class GuildColorsService : IReadyExecutor, IGuildColorsService, IE
{
GuildId = guildId
});
if (!_colors.TryAdd(guildId, new Colors(null, color?.ToDiscordColor(), null)))
{
_colors[guildId] = _colors[guildId] with
{
Pending = color?.ToDiscordColor()
};
}
}
public async Task OnReadyAsync()
@ -127,4 +143,4 @@ public sealed class GuildColorsService : IReadyExecutor, IGuildColorsService, IE
return clr.ToDiscordColor();
}
}
}