dev: Removed some unused code, no functional change

This commit is contained in:
Kwoth
2024-08-05 13:18:44 +00:00
parent f8da25a6f3
commit 15fe8b5daf
7 changed files with 15 additions and 113 deletions

View File

@@ -8,12 +8,11 @@ namespace NadekoBot.Common;
public partial class ImageUrls : ICloneable<ImageUrls>
{
[Comment("DO NOT CHANGE")]
public int Version { get; set; } = 4;
public int Version { get; set; } = 5;
public CoinData Coins { get; set; }
public Uri[] Currency { get; set; }
public Uri[] Dice { get; set; }
public RategirlData Rategirl { get; set; }
public XpData Xp { get; set; }
public SlotData Slots { get; set; }
@@ -30,12 +29,6 @@ public partial class ImageUrls : ICloneable<ImageUrls>
public Uri[] Tails { get; set; }
}
public class RategirlData
{
public Uri Matrix { get; set; }
public Uri Dot { get; set; }
}
public class XpData
{
public Uri Bg { get; set; }

View File

@@ -6,8 +6,6 @@ public interface IImageCache
Task<byte[]?> GetTailsImageAsync();
Task<byte[]?> GetCurrencyImageAsync();
Task<byte[]?> GetXpBackgroundImageAsync();
Task<byte[]?> GetRategirlBgAsync();
Task<byte[]?> GetRategirlDotAsync();
Task<byte[]?> GetDiceAsync(int num);
Task<byte[]?> GetSlotEmojiAsync(int number);
Task<byte[]?> GetSlotBgAsync();

View File

@@ -15,5 +15,17 @@ public sealed class ImagesConfig : ConfigServiceBase<ImageUrls>
public ImagesConfig(IConfigSeria serializer, IPubSub pubSub)
: base(PATH, serializer, pubSub, _changeKey)
{
Migrate();
}
private void Migrate()
{
if (data.Version < 5)
{
ModifyConfig(c =>
{
c.Version = 5;
});
}
}
}