mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
- Improved .curtrs (It will now have a lot more useful data in the database, show Tx ids, and be partially localized)
- Added .curtr command which lets you see full information about one of your own transactions with the specified id - Added .WithAuthor(IUser) extension for embedbuilder
This commit is contained in:
@@ -5,19 +5,19 @@ public interface IWallet : IDisposable, IAsyncDisposable
|
||||
public ulong UserId { get; }
|
||||
|
||||
public Task<long> GetBalance();
|
||||
public Task<bool> Take(long amount, Extra extra);
|
||||
public Task Add(long amount, Extra extra);
|
||||
public Task<bool> Take(long amount, TxData txData);
|
||||
public Task Add(long amount, TxData txData);
|
||||
|
||||
public async Task<bool> Transfer(
|
||||
long amount,
|
||||
IWallet to,
|
||||
Extra extra)
|
||||
TxData txData)
|
||||
{
|
||||
if (amount <= 0)
|
||||
throw new ArgumentOutOfRangeException(nameof(amount), "Amount must be greater than 0.");
|
||||
|
||||
var succ = await Take(amount,
|
||||
extra with
|
||||
txData with
|
||||
{
|
||||
OtherId = to.UserId
|
||||
});
|
||||
@@ -26,7 +26,7 @@ public interface IWallet : IDisposable, IAsyncDisposable
|
||||
return false;
|
||||
|
||||
await to.Add(amount,
|
||||
extra with
|
||||
txData with
|
||||
{
|
||||
OtherId = UserId
|
||||
});
|
||||
|
Reference in New Issue
Block a user