mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Gifts character limiting fix for V5
This commit is contained in:
@@ -269,8 +269,9 @@ public partial class Gambling
|
|||||||
? "-"
|
? "-"
|
||||||
: string.Join("\n",
|
: string.Join("\n",
|
||||||
itemList.Where(x => waifuItems.TryGetValue(x.ItemEmoji, out _))
|
itemList.Where(x => waifuItems.TryGetValue(x.ItemEmoji, out _))
|
||||||
.OrderBy(x => waifuItems[x.ItemEmoji].Price)
|
.OrderByDescending(x => waifuItems[x.ItemEmoji].Price)
|
||||||
.GroupBy(x => x.ItemEmoji)
|
.GroupBy(x => x.ItemEmoji)
|
||||||
|
.Take(60)
|
||||||
.Select(x => $"{x.Key} x{x.Count(),-3}")
|
.Select(x => $"{x.Key} x{x.Count(),-3}")
|
||||||
.Chunk(2)
|
.Chunk(2)
|
||||||
.Select(x => string.Join(" ", x)));
|
.Select(x => string.Join(" ", x)));
|
||||||
@@ -283,8 +284,10 @@ public partial class Gambling
|
|||||||
|
|
||||||
var fansList = await _service.GetFansNames(wi.WaifuId);
|
var fansList = await _service.GetFansNames(wi.WaifuId);
|
||||||
var fansStr = fansList
|
var fansStr = fansList
|
||||||
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x)
|
.Shuffle()
|
||||||
.Join('\n');
|
.Take(30)
|
||||||
|
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x)
|
||||||
|
.Join('\n');
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(fansStr))
|
if (string.IsNullOrWhiteSpace(fansStr))
|
||||||
@@ -370,4 +373,4 @@ public partial class Gambling
|
|||||||
await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
|
await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user