private async Task Balance(SocketMessage message) { var author = message.Author; var eth = await balanceService.GetBalances(author.Id); var ethCourses = await coursesService.GetCryptoCourses(); var ethUsd = eth.Eth * ethCourses.ETH.USD; var ethText = FormatBalance("ETH", "Ethereum", eth.Eth, ethUsd); var bnb = await balanceService.GetBnbBalance(author.Id); var bnbCourse = 27.61m; var bnbUsd = bnb * bnbCourse; var bnbText = FormatBalance("BNB", " Binance Coin", bnb, bnbUsd); var totalSum = $"Total ≈ {ethUsd + bnbUsd:0.00}$"; var answer = $"{ethText}{bnbText}{totalSum}"; await message.Channel.SendMessageAsync(answer); }
private async Task Balance(SocketMessage message) { var author = message.Author; var bnb = await balanceService.GetBnbBalance(author.Id); var bnbCourse = 27.61m; var bnbUsd = bnb * bnbCourse; var bnbText = FormatBalance("BNB", " Binance Coin", bnb, bnbUsd); var answer = $"{bnbText}"; await message.Channel.SendMessageAsync(answer); }