mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	.betstats now looks uwu
This commit is contained in:
		@@ -76,11 +76,15 @@ public partial class Gambling : GamblingModule<GamblingService>
 | 
				
			|||||||
        var eb = _eb.Create(ctx)
 | 
					        var eb = _eb.Create(ctx)
 | 
				
			||||||
            .WithOkColor();
 | 
					            .WithOkColor();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        var str = "**Feature |      Bet      |   Paid  Out   | Payout %** \n";
 | 
					        var str = "` Feature `|`   Bet  `|`Paid Out`|`  RoI  `\n";
 | 
				
			||||||
 | 
					        str += "――――――――――――――――――――\n";
 | 
				
			||||||
        foreach (var stat in stats)
 | 
					        foreach (var stat in stats)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var perc = (stat.PaidOut / stat.Bet).ToString("P2", Culture);
 | 
					            var perc = (stat.PaidOut / stat.Bet).ToString("P2", Culture);
 | 
				
			||||||
            str += $"`{stat.Feature}` | {N(stat.Bet)} | {N(stat.PaidOut)} | {perc}\n";
 | 
					            str += $"`{stat.Feature.PadBoth(9)}`" +
 | 
				
			||||||
 | 
					                   $"|`{stat.Bet.ToString("N0").PadLeft(8, ' ')}`" +
 | 
				
			||||||
 | 
					                   $"|`{stat.PaidOut.ToString("N0").PadLeft(8, ' ')}`" +
 | 
				
			||||||
 | 
					                   $"|`{perc.PadLeft(6, ' ')}`\n";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        var bet = stats.Sum(x => x.Bet);
 | 
					        var bet = stats.Sum(x => x.Bet);
 | 
				
			||||||
@@ -90,8 +94,11 @@ public partial class Gambling : GamblingModule<GamblingService>
 | 
				
			|||||||
            bet = 1;
 | 
					            bet = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        var tPerc = (paidOut / bet).ToString("P2", Culture);
 | 
					        var tPerc = (paidOut / bet).ToString("P2", Culture);
 | 
				
			||||||
        str += "--------------------------------------------\n";
 | 
					        str += "――――――――――――――――――――\n";
 | 
				
			||||||
        str += $"**TOTAL** | {N(bet)} | {N(paidOut)} | {tPerc}";
 | 
					        str += $"` {("TOTAL").PadBoth(7)}` " +
 | 
				
			||||||
 | 
					               $"|**{N(bet).PadLeft(8, ' ')}**" +
 | 
				
			||||||
 | 
					               $"|**{N(paidOut).PadLeft(8, ' ')}**" +
 | 
				
			||||||
 | 
					               $"|`{tPerc.PadLeft(6, ' ')}`";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        eb.WithDescription(str);
 | 
					        eb.WithDescription(str);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -990,5 +997,4 @@ public partial class Gambling : GamblingModule<GamblingService>
 | 
				
			|||||||
            sb.ToString(),
 | 
					            sb.ToString(),
 | 
				
			||||||
            footer: $"Total Bet: {tests} | Payout: {payout:F0} | {payout * 1.0M / tests * 100}%");
 | 
					            footer: $"Total Bet: {tests} | Payout: {payout:F0} | {payout * 1.0M / tests * 100}%");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -24,7 +24,7 @@ public static class StringExtensions
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        var spaces = length - str.Length;
 | 
					        var spaces = length - str.Length;
 | 
				
			||||||
        var padLeft = (spaces / 2) + str.Length;
 | 
					        var padLeft = (spaces / 2) + str.Length;
 | 
				
			||||||
        return str.PadLeft(padLeft, '_').PadRight(length, '_');
 | 
					        return str.PadLeft(padLeft, ' ').PadRight(length, ' ');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static T? MapJson<T>(this string str)
 | 
					    public static T? MapJson<T>(this string str)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user