DM send by the bot when being the target of a .give command will now once again contain amount.

This commit is contained in:
Kwoth
2022-05-07 09:32:22 +02:00
parent a8767f1136
commit 91ee0d121c
3 changed files with 9 additions and 4 deletions

View File

@@ -9,6 +9,10 @@ Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.
- `.clubdesc <msg>` will now have a nicer response
### Fixed
- `.give` DM will once again show an amount
## [4.1.4] - 06-05-2022
### Fixed

View File

@@ -363,7 +363,7 @@ public partial class Gambling : GamblingModule<GamblingService>
return;
}
if (!await _cs.TransferAsync(_eb, ctx.User, receiver, amount, msg))
if (!await _cs.TransferAsync(_eb, ctx.User, receiver, amount, msg, N(amount)))
{
await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
return;

View File

@@ -17,7 +17,8 @@ public static class CurrencyServiceExtensions
IUser from,
IUser to,
long amount,
string? note)
string? note,
string formattedAmount)
{
var fromWallet = await cs.GetWalletAsync(from.Id);
var toWallet = await cs.GetWalletAsync(to.Id);
@@ -28,8 +29,8 @@ public static class CurrencyServiceExtensions
{
await to.SendConfirmAsync(ebs,
string.IsNullOrWhiteSpace(note)
? $"Gift from {from}"
: $"Gift from {from}: {note}");
? $"Received {formattedAmount} from {from} "
: $"Received {formattedAmount} from {from}: {note}");
return true;
}