dev: small cleanup, removed qodana

This commit is contained in:
Kwoth
2024-08-05 14:13:16 +00:00
parent dd49d202b7
commit 764babdf06
13 changed files with 49 additions and 80 deletions

View File

@@ -31,7 +31,6 @@ public class PlantPickService : INService, IExecNoCommand
public PlantPickService(
DbService db,
CommandHandler cmd,
IBotStrings strings,
IImageCache images,
FontProvider fonts,
@@ -107,7 +106,6 @@ public class PlantPickService : INService, IExecNoCommand
/// Get a random currency image stream, with an optional password sticked onto it.
/// </summary>
/// <param name="pass">Optional password to add to top left corner.</param>
/// <param name="extension">Extension of the file, defaults to png</param>
/// <returns>Stream of the currency image</returns>
public async Task<(Stream, string)> GetRandomCurrencyImageAsync(string pass)
{

View File

@@ -3,6 +3,7 @@ using NadekoBot.Modules.Gambling.Common;
using NadekoBot.Modules.Gambling.Common.Waifu;
using NadekoBot.Modules.Gambling.Services;
using NadekoBot.Db.Models;
using System.Globalization;
namespace NadekoBot.Modules.Gambling;
@@ -152,12 +153,12 @@ public partial class Gambling
await Response().Confirm(strs.waifu_divorced_notlike(N(amount))).SendAsync();
else if (result == DivorceResult.NotYourWife)
await Response().Error(strs.waifu_not_yours).SendAsync();
else
else if (remaining is { } rem)
{
await Response()
.Error(strs.waifu_recent_divorce(
Format.Bold(((int)remaining?.TotalHours).ToString()),
Format.Bold(remaining?.Minutes.ToString())))
Format.Bold(((int)rem.TotalHours).ToString()),
Format.Bold(rem.Minutes.ToString())))
.SendAsync();
}
}
@@ -237,7 +238,7 @@ public partial class Gambling
private string GetLbString(WaifuLbResult w)
{
var claimer = "no one";
var status = string.Empty;
string status;
var waifuUsername = w.Username.TrimTo(20);
var claimerUsername = w.Claimer?.TrimTo(20);
@@ -376,14 +377,15 @@ public partial class Gambling
if (sucess)
{
await Response()
.Confirm(strs.waifu_gift(Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"),
.Confirm(strs.waifu_gift(
Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"),
Format.Bold(waifu.ToString())))
.SendAsync();
}
else
await Response().Error(strs.not_enough(CurrencySign)).SendAsync();
}
private static string GetCountString(MultipleWaifuItems items)
=> items.Count > 1
? $"{items.Count}x "