Merge branch 'hokutochen-v4-patch-27691' into 'v4'

Notifications will be sent even if dms are off when using .give

See merge request Kwoth/nadekobot!310
This commit is contained in:
Kwoth
2023-11-29 12:26:26 +00:00

View File

@@ -1,4 +1,4 @@
using NadekoBot.Services.Currency; using NadekoBot.Services.Currency;
namespace NadekoBot.Services; namespace NadekoBot.Services;
@@ -27,13 +27,19 @@ public static class CurrencyServiceExtensions
if (await fromWallet.Transfer(amount, toWallet, extra)) if (await fromWallet.Transfer(amount, toWallet, extra))
{ {
await to.SendConfirmAsync(ebs, try
string.IsNullOrWhiteSpace(note) {
? $"Received {formattedAmount} from {from} " await to.SendConfirmAsync(ebs,
: $"Received {formattedAmount} from {from}: {note}"); string.IsNullOrWhiteSpace(note)
? $"Received {formattedAmount} from {from} "
: $"Received {formattedAmount} from {from}: {note}");
}
catch
{
//ignored
}
return true; return true;
} }
return false; return false;
} }
} }