Пример #1
0
        public async Task Top(int count, [Remainder] string username = "")
        {
            var topScores = await _api.GetUserBestAndBeatmapByUsernameAsync(username, limit : count);

            var user = await _api.GetUserByNameAsync(username);

            if (topScores.Count < 1)
            {
                return;
            }
            if (count == 1)
            {
                await ReplyAsync($"**Top play for {user.Username}:**", embed : CreateSinglePlayEmbed(user, topScores[0].UserBest, topScores[0].Beatmap));
            }
            else
            {
                await ReplyAsync($"**Most recent plays for {user.Username}:**", embed : CreateMultiplePlayEmbed(user, topScores));
            }
        }