diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs index 8afb886..9fca94e 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs @@ -252,18 +252,18 @@ public partial class Gambling var claimer = "no one"; string status; - var waifuUsername = w.Username.TrimTo(20); - var claimerUsername = w.Claimer?.TrimTo(20); + var waifuUsername = w.WaifuName.TrimTo(20); + var claimerUsername = w.ClaimerName?.TrimTo(20); - if (w.Claimer is not null) - claimer = $"{claimerUsername}#{w.ClaimerDiscrim}"; + if (w.ClaimerName is not null) + claimer = $"{claimerUsername}"; if (w.Affinity is null) status = $"... but {waifuUsername}'s heart is empty"; - else if (w.Affinity + w.AffinityDiscrim == w.Claimer + w.ClaimerDiscrim) + else if (w.Affinity == w.ClaimerName) status = $"... and {waifuUsername} likes {claimerUsername} too <3"; else - status = $"... but {waifuUsername}'s heart belongs to {w.Affinity.TrimTo(20)}#{w.AffinityDiscrim}"; - return $"**{waifuUsername}#{w.Discrim}** - claimed by **{claimer}**\n\t{status}"; + status = $"... but {waifuUsername}'s heart belongs to {w.Affinity.TrimTo(20)}"; + return $"**{waifuUsername}** - claimed by **{claimer}**\n\t{status}"; } [Cmd] diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs index d0615eb..a134635 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuExtensions.cs @@ -40,12 +40,17 @@ public static class WaifuExtensions .Take(count) .Select(x => new WaifuLbResult { - Affinity = x.Affinity == null ? null : x.Affinity.Username, - AffinityDiscrim = x.Affinity == null ? null : x.Affinity.Discriminator, - Claimer = x.Claimer == null ? null : x.Claimer.Username, - ClaimerDiscrim = x.Claimer == null ? null : x.Claimer.Discriminator, - Username = x.Waifu.Username, - Discrim = x.Waifu.Discriminator, + Affinity = x.Affinity == null + ? null + : x.Affinity.Username + + (x.Affinity.Discriminator != "0000" ? "#" + x.Affinity.Discriminator : ""), + ClaimerName = + x.Claimer == null + ? null + : x.Claimer.Username + + (x.Claimer.Discriminator != "0000" ? "#" + x.Claimer.Discriminator : ""), + WaifuName = x.Waifu.Username + + (x.Waifu.Discriminator != "0000" ? "#" + x.Waifu.Discriminator : ""), Price = x.Price }) .ToListAsyncEF(); diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs index f83af4f..02c83f2 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs @@ -3,14 +3,11 @@ namespace EllieBot.Db.Models; public class WaifuLbResult { - public string Username { get; set; } - public string Discrim { get; set; } + public string WaifuName { get; set; } - public string Claimer { get; set; } - public string ClaimerDiscrim { get; set; } + public string ClaimerName { get; set; } public string Affinity { get; set; } - public string AffinityDiscrim { get; set; } public long Price { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApi/OtherSvc.cs b/src/EllieBot/Services/GrpcApi/OtherSvc.cs index 8865c6d..febcfc5 100644 --- a/src/EllieBot/Services/GrpcApi/OtherSvc.cs +++ b/src/EllieBot/Services/GrpcApi/OtherSvc.cs @@ -134,10 +134,10 @@ public sealed class OtherSvc : GrpcOther.GrpcOtherBase, IEService var reply = new WaifuLbReply(); reply.Entries.AddRange(waifus.Select(x => new WaifuLbEntry() { - ClaimedBy = x.Claimer ?? string.Empty, - IsMutual = x.Claimer == x.Affinity, + ClaimedBy = x.ClaimerName ?? string.Empty, + IsMutual = x.ClaimerName == x.Affinity, Value = x.Price, - User = x.Username, + User = x.WaifuName, })); return reply; }