Exemple #1
0
        public async Task GetTopThreads2ch(string board, int count)
        {
            var threads = await BoardHandler.GetTopThreads(board, count);

            if (threads.Count == 0)
            {
                await ReplyAsync("Nothing to show, check input");
            }

            foreach (var thread in threads)
            {
                await ReplyAsync($"Тема: {thread.Subject}");

                if (thread.Comment.Length < 1900)
                {
                    await ReplyAsync($"Пост {thread.Comment}");
                }

                if (thread.Files.Count != 0)
                {
                    foreach (var file in thread.Files)
                    {
                        await ReplyAsync($"{file}");
                    }
                }

                await ReplyAsync($"Ссылка: {thread.Url}");
            }
        }