1
Fork 0
mirror of https://gitlab.com/Kwoth/nadekobot.git synced 2024-10-03 04:23:13 +00:00

fix to gift being character limited (!302), and fixes UserUpdated and UserPresence not correctly ignoring users that are logignored.

This commit is contained in:
Ene 2023-09-04 04:08:07 +00:00 committed by Kwoth
parent 9b09f223d9
commit 97ae7b5a5b
No known key found for this signature in database
2 changed files with 11 additions and 6 deletions

View file

@ -98,7 +98,8 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
if (!GuildLogSettings.TryGetValue(gu.Guild.Id, out var logSetting)
|| before is null
|| after is null)
|| after is null
|| logSetting.LogIgnores.Any(ilc => ilc.LogItemId == gu.Id && ilc.ItemType == IgnoredItemType.User))
return;
ITextChannel? logChannel;
@ -350,7 +351,7 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
var g = after.Guild;
if (!GuildLogSettings.TryGetValue(g.Id, out var logSetting) || logSetting.UserUpdatedId is null)
if (!GuildLogSettings.TryGetValue(g.Id, out var logSetting) || logSetting.UserUpdatedId is null || logSetting.LogIgnores.Any(ilc => ilc.LogItemId == after.Id && ilc.ItemType == IgnoredItemType.User))
return;
ITextChannel? logChannel;

View file

@ -250,8 +250,9 @@ public partial class Gambling
? "-"
: string.Join("\n",
itemList.Where(x => waifuItems.TryGetValue(x.ItemEmoji, out _))
.OrderBy(x => waifuItems[x.ItemEmoji].Price)
.OrderByDescending(x => waifuItems[x.ItemEmoji].Price)
.GroupBy(x => x.ItemEmoji)
.Take(60)
.Select(x => $"{x.Key} x{x.Count(),-3}")
.Chunk(2)
.Select(x => string.Join(" ", x)));
@ -264,7 +265,10 @@ public partial class Gambling
var fansList = await _service.GetFansNames(wi.WaifuId);
var fansStr = fansList
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x).Join('\n');
.Shuffle()
.Take(30)
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x)
.Join('\n');
if (string.IsNullOrWhiteSpace(fansStr))