c# Телеграмм Бот

Доброе время суток, Хотел создать Бота для телеграмма, но подключение к боту не происходит. Вот сообственно код.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telegram.Bot;
using Telegram.Bot.Args;

namespace WindowsFormsApplication6
{
    public partial class Form1 : Form
    {
        static ITelegramBotClient botClient;
        public Form1()
        {
            InitializeComponent();
        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            
            botClient = new TelegramBotClient("1482817782:AAHrDRmSl9U8ck7OXHKQPSF636bgsLXv-YU");
            var me = botClient.GetMeAsync().Result;
            Console.WriteLine($"Hello, World! I am user {me.Id} and my name is {me.FirstName}.");
            botClient.OnMessage += Bot_OnMessage;
            botClient.StartReceiving();

        }

        static async void Bot_OnMessage(object sender, MessageEventArgs e)
        {
            if (e.Message.Text != null)
            {
                Console.WriteLine($"Received a text message in chat {e.Message.Chat.Id}.");

                await botClient.SendTextMessageAsync(
                  chatId: e.Message.Chat,
                  text: "You said:\n" + e.Message.Text
                );
            }

        }

       
    }
}


Output


Ответы (0 шт):