New command: Balance
returns the bots L$ value via smart target.
This commit is contained in:
parent
5ee76f3517
commit
321e3f67db
1 changed files with 17 additions and 0 deletions
17
Core/Commands/Self/Balance.cs
Normal file
17
Core/Commands/Self/Balance.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
namespace BSB.Commands.Self
|
||||
{
|
||||
public class Balance : CoreCommand_SmartReply_1arg
|
||||
{
|
||||
public override string Helpfile { get { return "Requests the current balance and sends that via the smart reply target and then requests the balance to update."; } }
|
||||
public override bool CallFunction(string[] args)
|
||||
{
|
||||
if(bot.GetAllowFunds == true)
|
||||
{
|
||||
bool status = bot.GetCommandsInterface.SmartCommandReply(args[0], bot.GetClient.Self.Balance.ToString(), CommandName);
|
||||
bot.GetClient.Self.RequestBalance();
|
||||
return status;
|
||||
}
|
||||
return bot.GetCommandsInterface.SmartCommandReply(args[0], "0", CommandName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue