class Program
                  
                  
                      {
                  
                  
                          private static ITelegramBotClient botClient;
                  
                  
                          static void Main(string[] args)
                  
                  
                          {
                  
                  
                  var proxy = new HttpToSocks5Proxy("164.132.98.80", 3128);
                  
                  
                              botClient = new TelegramBotClient("1305129943:AAGhbl - U - DK3xP6ptqMhlhmQCfYu83rHJg4", proxy)
                  
                  
                              { Timeout = TimeSpan.FromSeconds(10) };
                  
                  
                              var me = botClient.GetMeAsync().Result;
                  
                  
                              Console.WriteLine($"Bot id: {me.Id}. Bot Name: {me.FirstName}");
                  
                  
                  
                  
                  
                              botClient.OnMessage += Bot_OnMessage;
                  
                  
                              Console.ReadKey();
                  
                  
                          }
                  
                  
                          private static async void Bot_OnMessage(object sender,MessageEventArgs e)
                  
                  
                          {
                  
                  
                              var text = e?.Message?.Text;
                  
                  
                              if (text == null)
                  
                  
                                  return;
                  
                  
                              Console.WriteLine($"recived text message '{text}' inchat ' {e.Message.Chat.Id}'");
                  
                  
                              await botClient.SendTextMessageAsync(
                  
                  
                                  chatId: e.Message.Chat,
                  
                  
                                  text: $"You said '{text}'"
                  
                  
                                  ).ConfigureAwait(false);
                  
                  
                                  
                  
                  
                          }
                  
                  
                      }
                  
                  
                
дай id паблика или группы, и id админа, я подниму
Обсуждают сегодня