skip to Main Content

namespace "FileToSend" does not exist – Telegram API

Hi I want to send a photo with my telegram bot but my VS doesn't recognize "FileToSend" and my error is : int chatId = int.Parse(dgReport.CurrentRow.Cells[0].Value.ToString()); FileStream imageFile = System.IO.File.Open(txtFilePath.Text,FileMode.Open); bot.SendPhotoAsync(chatId, new FileToSend("1234.jpg", imageFile), txtmessage.Text); CS0246 The type or namespace…

VIEW QUESTION

basic telegram bot example

I am recreating the basic telegram bot example from here, but I am having a slight problem. import logging from telegram.ext import Updater, CommandHandler, MessageHandler, Filters # Enable logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',level=logging.INFO) logger = logging.getLogger(__name__) #…

VIEW QUESTION
Back To Top
Search