To those who are facing a problem with the connection between the bot and the program you need to create Console Application .Net Core (not Framework).
Thank you very good tutorial but i have some issu can you help please i want to create buttom in web page tath if i click it will send message to the bot group i make in the telegram how can i do it ?
Thank you for this! Can I check how to retrieve multiple responses. Example bot ask what is your name? User response “John” Bot ask where do u live? User response “England” How can I retrieve these two responses or more?
Hi, you have to save the responses of the users per user Id, Simple case: use a map which maps userId to {message,date} array, or use a database (sqlite)
Hi thanks for this video its so helpful. I have a question if I want my Bot delete The join massage in group What I should Write or if is so long get me a link for help me . thanks again and sorry for my language I can not write good.
i dont know why, i make exact like this video but my bot doesnt run. I have check break point but it doesnt even step into the function Bot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs e).
@@codewithibrahim9995 static TelegramBotClient Bot = new TelegramBotClient(""); static void Main(string[] args) { Bot.StartReceiving(); Bot.OnMessage += Bot_OnMessage; Console.ReadLine(); } private static void Bot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs e) { if (e.Message.Type == Telegram.Bot.Types.Enums.MessageType.Text) Bot.SendTextMessageAsync(e.Message.Chat.Id, "hello"); } i surely put it in. Here is my code
You cant, if the program isnt running how will the bot know what to do? If you really need to have it running 24/7 then ull need to get a machine which u can always keep on and run the program on
I fixed the error using async and await. And was necessary to write something more. Thank you Ibrahim Sammour for your video and your support throw Telegram, this video was introduction for mi.
@Teseer Al-khatiB Follow this video (ruclips.net/video/49iaHuzPvwg/видео.html), upon you add ServicesPointManager need to write 'async' betwwen private and statict word in OnMessage method, also write await before Bot.SentTextMessageAsync(... Try this and let mi know. Apologie fore the code, but at this time I haven't the code on my hand.
Thank you!! Very helpful tutorial, I always look at it when implementing Telegram in my projects. Also your English improved a lot!
That's guide nice for begginers!
Thanks Bro!
Thanks Ibrahim, I can listen to a group through a program, but I want to listen to the same group with more than one program at the same time.
To those who are facing a problem with the connection between the bot and the program
you need to create Console Application .Net Core (not Framework).
Thanks Bro
@@sahelraziq9368
Welcome ❤️
Hi, Brother I am still having the same problem, my breakpoint not gonna hit, I tried making console application for both Core3.1 and Core 2.1
Hey bro very good tutorial and video in general, I will look forward to a new video on this topic. Thank you
Thanks Ibrahim, this is what I have been looking for.
Thanks, Ibrahim. Very informative and it works for me very well!
Very helpful, Thank you sir
just gotta say I really appreciate you mentioning what shortcuts you are using as you are doing the coding. Primo behaviour that is :)
Thank you!! Very helpful tutorial,
Nice explained
Great!
That's guide pretty good for begginers!
Thanks!
Thank you so much for your work
can you post a call back query tutorial video
Thank you for your good tutorials
I have a question, how do I make the bot only respond to replies, or ignore them?
Is it possible to make an video for texting an emoji?
Thanks in advance!!
يسلمو معلم بس ياريت شارح بالعربي كان احسن 😂
Thank you very good tutorial but i have some issu can you help please i want to create buttom in web page tath if i click it will send message to the bot group i make in the telegram how can i do it ?
Thank you for this! Can I check how to retrieve multiple responses. Example
bot ask what is your name?
User response “John”
Bot ask where do u live?
User response “England”
How can I retrieve these two responses or more?
Hi, you have to save the responses of the users per user Id, Simple case: use a map which maps userId to {message,date} array, or use a database (sqlite)
@@codewithibrahim9995 thank you for your reply. I think I may have asked wrongly. It’s just for a single user
WYMO Wai Yan in all cases you have to maintain the user Id in order to answer this exact user and avoid strangers
@@codewithibrahim9995 noted with thanks. where/how would you recommend to deploy this .net to a server?
Hi
thanks for this video its so helpful.
I have a question if I want my Bot delete The join massage in group What I should Write or if is so long get me a link for help me .
thanks again and sorry for my language I can not write good.
is it possible to get all my channel member ids and add it to a List with api ?
Thank you. How can i hold for user input?
finally
i dont know why, i make exact like this video but my bot doesnt run. I have check break point but it doesnt even step into the function Bot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs e).
Make sure you add Bot.StartReceiving()
@@codewithibrahim9995
static TelegramBotClient Bot = new TelegramBotClient("");
static void Main(string[] args)
{
Bot.StartReceiving();
Bot.OnMessage += Bot_OnMessage;
Console.ReadLine();
}
private static void Bot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs e)
{
if (e.Message.Type == Telegram.Bot.Types.Enums.MessageType.Text)
Bot.SendTextMessageAsync(e.Message.Chat.Id, "hello");
}
i surely put it in. Here is my code
put “await” before Bot.SendTextMessageAsync(). Also make the function async by writing private static async void Bot_OnMessage
@@codewithibrahim9995 it does not work at all
Ok. Please double check your bot token, add a Console.WriteLine() to confirm that you are receiving messages from your bot.
got a video about API request/response?
Hello. How do i implement listening after the user has already typed a listened answer?
Can you explain more please
is there any way to integrate it in web api
Thank you, great tutorial, i have a cuestion, How can I get the users (chat id) who use the bot?
with getUpdates get only this:{"ok":true,"result":[]}
how can get phone number for sender ???
any reference for java??
How can we host the Application to keep it running.
If you built the application on .net core you can host it on any operating system (linux based servers for example)
How to send picture?
So how do you deploy it to the users?
You need a server, aka a computer connected to the internet 7/24
you can give me the code or book
hello bro how can we make this bot run continuously so even if the program is not running
You cant, if the program isnt running how will the bot know what to do? If you really need to have it running 24/7 then ull need to get a machine which u can always keep on and run the program on
Use raspberry pi. It is a small cpu which works 7/24 for you.
i write this code but not work why??????
Share any errors or output please, if none, share your code.
Not work for me, I did all that you say
I fixed the error using async and await. And was necessary to write something more. Thank you Ibrahim Sammour for your video and your support throw Telegram, this video was introduction for mi.
@@raulcuello2529
send me the code plz, still not working for me !!!
@Teseer Al-khatiB Follow this video (ruclips.net/video/49iaHuzPvwg/видео.html), upon you add ServicesPointManager need to write 'async' betwwen private and statict word in OnMessage method, also write await before Bot.SentTextMessageAsync(... Try this and let mi know. Apologie fore the code, but at this time I haven't the code on my hand.
@@raulcuello2529
Thx