public async Task DonateAsync(decimal amount, string pot) { if (QTCommands.CheckBalance(Context.User.Id, amount)) { if (pot.Contains("dev")) { var resp = QTCommands.Withdraw(Context.User.Id, "FWN1qdiRrymSR6jbpbanLYqZpjkEaZouHN", amount); if (string.IsNullOrEmpty(resp.Error)) { await ReplyAsync($"Donation successful! The {Preferences.BaseCurrency} Team thanks you! Transaction: {Preferences.ExplorerPrefix}{resp.Result}{Preferences.ExplorerSuffix}"); } } else if (pot.Contains("market")) { var resp = QTCommands.Withdraw(Context.User.Id, "FqkPKgvb2jFv6GdVphgyVY2iFPcHHi3dx7", amount); if (string.IsNullOrEmpty(resp.Error)) { await ReplyAsync($"Donation successful! The {Preferences.BaseCurrency} Team thanks you! Transaction: {Preferences.ExplorerPrefix}{resp.Result}{Preferences.ExplorerSuffix}"); } } else { await ReplyAsync($"No Donation Fund found for {pot}! Options: `dev`, `marketing`"); } } else { await ReplyAsync("Not enough balance!"); } }
public async Task WithdrawAsync(string address) { if (CanRunTipCommands) { if (address.StartsWith("F") || address.StartsWith("3") || address.StartsWith("grs1")) { var resp = QTCommands.Withdraw(Context.User.Id, address); if (string.IsNullOrEmpty(resp.Error)) { await ReplyAsync($"Withdrawn successfully! Transaction: {Preferences.ExplorerPrefix}{resp.Result}{Preferences.ExplorerSuffix}"); } else { await ReplyAsync(resp.Error); } } else { await ReplyAsync("Invalid Address"); } } else { await ReplyAsync($"Please use the <#{Preferences.TipBotChannel}> channel"); } }
public async Task DonateAsync(decimal amount) { if (QTCommands.CheckBalance(Context.User.Id, amount)) { var resp = QTCommands.Withdraw(Context.User.Id, "FWN1qdiRrymSR6jbpbanLYqZpjkEaZouHN", amount); if (string.IsNullOrEmpty(resp.Error)) { await ReplyAsync($"Donation successful! The {Preferences.BaseCurrency} Team thanks you! Transaction: {Preferences.ExplorerPrefix}{resp.Result}{Preferences.ExplorerSuffix}"); } } else { await ReplyAsync("Not enough balance!"); } }
public async Task WithdrawAsync(string address, decimal amount) { if (CanRunTipCommands) { if (address.StartsWith("F") || address.StartsWith("3") || address.StartsWith("grs1")) { if (QTCommands.CheckBalance(Context.User.Id, amount)) { if (amount <= QTCommands.MinimumWithdraw) { await ReplyAsync($"Minimum Withdrawal: {QTCommands.MinimumWithdraw:N8}"); return; } var resp = QTCommands.Withdraw(Context.User.Id, address, amount); if (string.IsNullOrEmpty(resp.Error)) { await ReplyAsync($"Withdrawn successfully! Transaction: {Preferences.ExplorerPrefix}{resp.Result}{Preferences.ExplorerSuffix}"); } else { await ReplyAsync(resp.Error); } } else { await ReplyAsync("Not enough balance!"); } } else { await ReplyAsync("Invalid Address"); } } else { await ReplyAsync($"Please use the <#{Preferences.TipBotChannel}> channel"); } }